-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from hydrologie/use-cruft
Use cruft and Ouranosinc/cookiecutter-pypackage
- Loading branch information
Showing
66 changed files
with
3,323 additions
and
8,292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
service_name: github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage", | ||
"commit": "64eceda7d95aeb8937fa9961989d3d617a525c04", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"full_name": "Sebastien Langlois", | ||
"email": "[email protected]", | ||
"github_username": "sebastienlanglois", | ||
"project_name": "xdatasets", | ||
"project_slug": "xdatasets", | ||
"project_short_description": "Easy access to Earth observation datasets with xarray.", | ||
"pypi_username": "sebastienlanglois", | ||
"version": "0.3.0", | ||
"use_pytest": "y", | ||
"use_black": "y", | ||
"use_conda": "y", | ||
"add_pyup_badge": "n", | ||
"make_docs": "y", | ||
"command_line_interface": "No command-line interface", | ||
"create_author_file": "y", | ||
"open_source_license": "MIT license", | ||
"generated_with_cruft": "y", | ||
"_template": "https://github.com/Ouranosinc/cookiecutter-pypackage" | ||
} | ||
}, | ||
"directory": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
|
||
[*.bat] | ||
indent_style = tab | ||
end_of_line = crlf | ||
|
||
[LICENSE] | ||
insert_final_newline = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[flake8] | ||
exclude = | ||
.eggs, | ||
.git, | ||
build, | ||
docs, | ||
tests | ||
ignore = | ||
AZ100, | ||
AZ200, | ||
AZ300, | ||
C, | ||
D, | ||
E, | ||
F, | ||
W503 | ||
per-file-ignores = | ||
rst-roles = | ||
doc, | ||
mod, | ||
py:attr, | ||
py:attribute, | ||
py:class, | ||
py:const, | ||
py:data, | ||
py:func, | ||
py:meth, | ||
py:mod, | ||
py:obj, | ||
py:ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,4 +113,4 @@ | |
|
||
# Jupyter Notebooks | ||
# ================= | ||
*.ipynb text | ||
*.ipynb text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* xdatasets version: | ||
* Python version: | ||
* Operating System: | ||
|
||
### Description | ||
|
||
Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen. | ||
|
||
### What I Did | ||
|
||
``` | ||
Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback here. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Generic issue template | ||
description: For detailing generic/uncategorized issues in xdatasets | ||
|
||
body: | ||
- type: textarea | ||
id: generic-issue | ||
attributes: | ||
label: Generic Issue | ||
description: Please fill in the following information fields as needed. | ||
value: | | ||
* xdatasets version: | ||
* Python version: | ||
* Operating System: | ||
### Description | ||
<!--Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen.--> | ||
### What I Did | ||
<!--Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback below.--> | ||
``` | ||
$ pip install foo --bar | ||
``` | ||
### What I Received | ||
<!--Paste the output or the stack trace of the problem you experienced here.--> | ||
``` | ||
Traceback (most recent call last): | ||
File "/path/to/file/script.py", line 3326, in run_code | ||
exec(code_obj, self.user_global_ns, self.user_ns) | ||
File "<ipython-input-2-9e1622b385b6>", line 1, in <module> | ||
1/0 | ||
ZeroDivisionError: division by zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Bug report | ||
description: Help us improve xdatasets | ||
labels: [ "bug" ] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: textarea | ||
id: setup-information | ||
attributes: | ||
label: Setup Information | ||
description: | | ||
What software versions are you running? Example: | ||
- xdatasets version: 0.55.0-gamma | ||
- Python version: 4.2 | ||
- Operating System: Nutmeg Linux 12.34 | macOS 11.0 "Redmond" | ||
value: | | ||
- xdatasets version: | ||
- Python version: | ||
- Operating System: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. | ||
- type: textarea | ||
id: steps-to-reproduce | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Paste the command(s) you ran and the output. If there was a crash, please include the traceback below. | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. | ||
- type: checkboxes | ||
id: submit-pr | ||
attributes: | ||
label: Contribution | ||
description: Do you intend to submit a fix for this bug? (The xdatasets developers will help with code compliance) | ||
options: | ||
- label: I would be willing/able to open a Pull Request to address this bug. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Feature request | ||
description: Suggest an idea for xdatasets | ||
labels: [ "enhancement" ] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this feature request! | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: Addressing a Problem? | ||
description: Is your feature request related to a problem? Please describe it. | ||
- type: textarea | ||
id: potential-solution | ||
attributes: | ||
label: Potential Solution | ||
description: Describe the solution you'd like to see implemented. | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the feature request here. | ||
- type: checkboxes | ||
id: submit-pr | ||
attributes: | ||
label: Contribution | ||
description: Do you intend to submit a fix for this bug? (The xdatasets developers will help with code compliance) | ||
options: | ||
- label: I would be willing/able to open a Pull Request to contribute this feature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Question/Support | ||
description: Ask for help from the developers | ||
labels: [ "support" ] | ||
|
||
body: | ||
- type: textarea | ||
id: setup-information | ||
attributes: | ||
label: Setup Information | ||
description: | | ||
What software versions are you running? Example: | ||
- xdatasets version: 0.55.0-gamma | ||
- Python version: 4.2 | ||
- Operating System: Nutmeg Linux 12.34 | macOS 11.0 "Redmond" | ||
value: | | ||
- xdatasets version: | ||
- Python version: | ||
- Operating System: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Context | ||
description: Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- Please ensure the PR fulfills the following requirements! --> | ||
<!-- If this is your first PR, make sure to add your details to the AUTHORS.rst! --> | ||
### Pull Request Checklist: | ||
- [ ] This PR addresses an already opened issue (for bug fixes / features) | ||
- This PR fixes #xyz | ||
- [ ] (If applicable) Documentation has been added / updated (for bug fixes / features). | ||
- [ ] (If applicable) Tests have been added. | ||
- [ ] CHANGES.rst has been updated (with summary of main changes). | ||
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added. | ||
|
||
### What kind of change does this PR introduce? | ||
|
||
* ... | ||
|
||
### Does this PR introduce a breaking change? | ||
|
||
|
||
### Other information: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: GitHub Actions Version Updater | ||
|
||
on: | ||
schedule: | ||
# 12:00 AM on the first of every month | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
# This requires a personal access token with the privileges to push directly to `main` | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
persist-credentials: true | ||
- name: Run GitHub Actions Version Updater | ||
uses: saadmk11/[email protected] | ||
with: | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
committer_email: 'bumpversion[bot]@ouranos.ca' | ||
committer_username: 'update-github-actions[bot]' | ||
pull_request_title: '[bot] Update GitHub Action Versions' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: First Pull Request | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
welcome: | ||
name: Welcome | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
// Get a list of all issues created by the PR opener | ||
// See: https://octokit.github.io/rest.js/#pagination | ||
const creator = context.payload.sender.login | ||
const opts = github.rest.issues.listForRepo.endpoint.merge({ | ||
...context.issue, | ||
creator, | ||
state: 'all' | ||
}) | ||
const issues = await github.paginate(opts) | ||
for (const issue of issues) { | ||
if (issue.number === context.issue.number) { | ||
continue | ||
} | ||
if (issue.pull_request) { | ||
return // Creator is already a contributor. | ||
} | ||
} | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `**Welcome**, new contributor! | ||
It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the \`AUTHORS.rst\` and \`.zenodo.json\`.: | ||
- [ ] The relevant author information has been added to \`AUTHORS.rst\` and \`.zenodo.json\`. | ||
Please make sure you've read our [contributing guide](CONTRIBUTING.rst). We look forward to reviewing your Pull Request shortly ✨` | ||
}) |
Oops, something went wrong.