Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping #11

Merged
merged 26 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2a54b25
update workflow actions
Zeitsperre Jun 2, 2023
9fa3824
sync dependencies
Zeitsperre Jun 2, 2023
ca2d3d3
typo fix
Zeitsperre Jun 2, 2023
602cde4
use correct GitHub Action
Zeitsperre Jun 2, 2023
fb6bbcb
cf_xarray on conda-forge, add pip to mute warning
Zeitsperre Jun 2, 2023
3060df5
drop minor and patch version to grab latest v4
Zeitsperre Jun 2, 2023
2fb3d01
template xhydro boilerplate with latest cookicutter template from our…
Zeitsperre Jun 9, 2023
e304074
black/isort changes, update MANIFEST.in
Zeitsperre Jun 9, 2023
7fb8083
relax dev requirement freeze, fix a few autogenerated errors
Zeitsperre Jun 9, 2023
18bc213
update setup.cfg bumpversion for black formatting, add a test for met…
Zeitsperre Jun 9, 2023
edc82e3
fix an error from jinja template in Makefile
Zeitsperre Jun 9, 2023
ab23489
fix another error from jinja template in Makefile
Zeitsperre Jun 9, 2023
e09c3ee
add missing sphinx extensions
Zeitsperre Jun 9, 2023
cdbb2af
temporarily disable testing with tox and add a smoke test
Zeitsperre Jun 9, 2023
e6b217b
more small template-based bugfixes
Zeitsperre Jun 9, 2023
4338bed
add json-related configurations, add TJS to .zenodo.json and AUTHORS.rst
Zeitsperre Jun 12, 2023
c985fb0
fix autogeneration inaccuracies
Zeitsperre Jun 12, 2023
e09ffd1
replace sphinx_rtd_theme with furo, add mock
Zeitsperre Jun 12, 2023
501f163
fast-forward cookiecutter adjustments
Zeitsperre Jun 12, 2023
68dc2f3
cleaner README.rst formatting, point documentation to GitHub.io deplo…
Zeitsperre Jun 12, 2023
828d812
let bumpversion augment the version number ($ bump2version --no-commi…
Zeitsperre Jun 12, 2023
70ea7de
let bumpversion augment the version number ($ bump2version --no-commi…
Zeitsperre Jun 12, 2023
eb1f198
drop Python3.8, specify Python3.9 in many places
Zeitsperre Jun 12, 2023
bfb206a
update cookiecutter version
Zeitsperre Jun 13, 2023
359dedc
fix documentation hyperlinks
Zeitsperre Jun 13, 2023
39c6923
adjust Thomas-Charles's name
Zeitsperre Jun 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveralls.yml
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: github
# repo_token: YOURTOKENHERE
28 changes: 28 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage",
"commit": "49c15f3ab0a7aff9ccb2019abb117b226444dacb",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Thomas-Charles Fortier Filion",
"email": "tcff_hydro@outlook.com",
"github_username": "TC-FF",
"project_name": "xHydro",
"project_slug": "xhydro",
"project_short_description": "Hydrological analysis library built with xarray",
"pypi_username": "TC-FF",
"version": "0.1.3",
"use_pytest": "y",
"use_black": "y",
"use_pypi_deployment_with_travis": "n",
"add_pyup_badge": "n",
"make_docs": "y",
"command_line_interface": "No command-line interface",
"create_author_file": "y",
"open_source_license": "Apache-2.0",
"generated_with_cruft": "y",
"_template": "https://github.com/Ouranosinc/cookiecutter-pypackage"
}
},
"directory": null
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.{yaml,yml}]
indent_size = 2

[*.bat]
indent_style = tab
end_of_line = crlf
Expand Down
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/0001-GENERIC-ISSUE-TEMPLATE.yml
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 xHydro

body:
- type: textarea
id: generic-issue
attributes:
label: Generic Issue
description: Please fill in the following information fields as needed.
value: |
* xhydro 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
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/0002-BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Bug report
description: Help us improve xHydro
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:
- xhydro version: 0.55.0-gamma
- Python version: 4.2
- Operating System: Nutmeg Linux 12.34 | macOS 11.0 "Redmond"
value: |
- xhydro 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 xHydro developers will help with code compliance)
options:
- label: I would be willing/able to open a Pull Request to address this bug.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/0003-FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Feature request
description: Suggest an idea for xHydro
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 xHydro developers will help with code compliance)
options:
- label: I would be willing/able to open a Pull Request to contribute this feature.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/0004-QUESTION-SUPPORT.yml
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:
- xhydro version: 0.55.0-gamma
- Python version: 4.2
- Operating System: Nutmeg Linux 12.34 | macOS 11.0 "Redmond"
value: |
- xhydro 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.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
18 changes: 7 additions & 11 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ on:
- .editorconfig
- .github/**.yml
- .gitignore
- .gitlab-ci.yml
- .gitmodules
- .pre-commit-config.yaml
- .yamllint.yaml
- AUTHORS.rst
- CONTRIBUTING.rst
- docs/notebooks
- HISTORY.rst
- MANIFEST.in
- Makefile
- docs/*.py
- docs/*.rst
- environment-dev.yml
- docs/notebooks
- environment-docs.yml
- environment.yml
- CHANGES.rst
- Makefile
- MANIFEST.in
- requirements_upstream.txt
- requirements_dev.txt
- setup.cfg
- setup.py
- tests/**.py
Expand All @@ -35,8 +33,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v4
with:
python-version: "3.x"
Expand All @@ -57,4 +53,4 @@ jobs:
with:
force: false
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
branch: ${{ github.ref }}
46 changes: 46 additions & 0 deletions .github/workflows/first_pull_request.yml
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 ✨`
})
22 changes: 11 additions & 11 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: Docs
name: Deploy Documentation

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1
with:
persist-credentials: false
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: xhydro
environment-file: environment.yml
mamba-version: "*"
python-version: "3.10"
auto-activate-base: false
cache-environment: true
create-args: >-
python=3.10
- name: Deploy docs
shell: bash -l {0}
run: |
python -m ipykernel install --user --name=xhydro
pip install -e .
make -C docs html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/_build/html # The folder the action should deploy.
folder: docs/_build/html # The folder the action should deploy.
Loading