Skip to content

Commit

Permalink
Merge branch 'master' into speed-up-quantile
Browse files Browse the repository at this point in the history
  • Loading branch information
coxipi authored Jan 15, 2024
2 parents 500428f + 0c631fb commit f81f484
Show file tree
Hide file tree
Showing 84 changed files with 1,617 additions and 874 deletions.
40 changes: 40 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[flake8]
exclude =
.git,
docs,
build,
.eggs,
tests
ignore =
AZ100,
AZ200,
AZ300,
C,
D,
E,
F,
W503
per-file-ignores =
xclim/core/locales.py:RST399
rst-directives =
bibliography,
autolink-skip
rst-roles =
doc,
mod,
py:attr,
py:attribute,
py:class,
py:const,
py:data,
py:func,
py:indicator,
py:meth,
py:mod,
py:obj,
py:ref,
ref,
cite:cts,
cite:p,
cite:t,
cite:ts
31 changes: 31 additions & 0 deletions .github/DISCUSSION_TEMPLATE/questions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
title: "[Questions] "
labels: [ "support" ]

body:
- type: markdown
attributes:
value: |
Thanks for opening this discussion!
Before you submit, please make sure you have read our [Code of Conduct](https://github.com/Ouranosinc/xclim/blob/master/CODE_OF_CONDUCT.md).
- type: textarea
id: setup-information
attributes:
label: Setup Information
description: |
What xclim version are you running?
value: |
* Xclim version:
- 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.
- 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.
value: |
```
$ pip install foo --bar
```
32 changes: 32 additions & 0 deletions .github/DISCUSSION_TEMPLATE/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: "[Translations] "
labels: [ "docs" ]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help translate Xclim's documentation!
Before you submit, please make sure you have read our [Code of Conduct](https://github.com/Ouranosinc/xclim/blob/master/CODE_OF_CONDUCT.md).
- type: textarea
id: language
attributes:
label: Language
description: What language are you translating to?
- type: textarea
id: translation
attributes:
label: Translation
description: |
Please paste your translation here.
If you are translating a file, please paste the file contents here.
Remember that you can use Markdown formatting in this text box.
value: |
<!-- If translating Indicators, consider the following approach:
1. Copy the structure of `fr.json` from the `xclim/data` directory for the Indicators you wish to translate.
2. Translate the fields to the language of your choice.
3. Paste the translated docstrings below.
4. Edit this post as needed, reflecting comments and suggestions from the maintainers and other contributors.
5. When the translation effort feels concluded, submit a Pull Request with your changes.
Please paste your translation below. -->
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/0004-QUESTION-SUPPORT.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Questions and/or support
about: "For questions or support, please use the Discussions tab"
url: https://www.github.com/Ouranosinc/xclim/discussions/categories/questions
- name: Translation requests
about: "For coordinating translation requests, please use the Discussions tab"
url: https://www.github.com/Ouranosinc/xclim/discussions/categories/translations
- name: PAVICS-related questions
about: "For questions related to PAVICS, the Platform for the Analysis and Visualization of Climate Science, please use the PAVICS email: [email protected]"
url: https://pavics.ouranos.ca/index.html
77 changes: 45 additions & 32 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,53 @@
# we refer here to CI as the 'meta' configuration files for managing the code and integrations with the repository,
# not configurations related to the deployment process itself.

API:
- xclim/cli.py
'API':
- changed-files:
- any-glob-to-any-file:
- 'xclim/cli.py'

CI:
- .editorconfig
- .pre-commit-config.yaml
- .readthedocs.yml
- .yamllint.yml
- .github/workflows/*
- docs/Makefile
- pylintrc
- tox.ini
- Makefile
'CI':
- changed-files:
- any-glob-to-any-file:
- '.editorconfig'
- '.pre-commit-config.yaml'
- '.readthedocs.yml'
- '.yamllint.yml'
- '.github/workflows/*'
- 'docs/Makefile'
- 'pylintrc'
- 'tox.ini'
- 'Makefile'

docs:
- .readthedocs.yml
- docs/**/*
- AUTHORS.rst
- CONTRIBUTING.rst
- ISSUE_TEMPLATE/**/*
- ISSUE_TEMPLATE.md
- PULL_REQUEST_TEMPLATE.md
- README.rst
'docs':
- changed-files:
- any-glob-to-any-file:
- '.readthedocs.yml'
- 'docs/**/*'
- 'AUTHORS.rst'
- 'CONTRIBUTING.rst'
- 'CODE_OF_CONDUCT.md'
- 'DISCUSSION_TEMPLATE/**/*'
- 'ISSUE_TEMPLATE/**/*'
- 'ISSUE_TEMPLATE.md'
- 'PULL_REQUEST_TEMPLATE.md'
- 'README.rst'

indicators:
- xclim/indicators/**/*
- xclim/indicators/**/*
- xclim/indices/**/_*.py
- xclim/data/**/*.json
- xclim/data/**/*.yml
'indicators':
- changed-files:
- any-glob-to-any-file:
- 'xclim/indicators/**/*'
- 'xclim/indices/**/_*.py'
- 'xclim/data/**/*.json'
- 'xclim/data/**/*.yml'

information:
- CONTRIBUTING.rst
'information':
- changed-files:
- any-glob-to-any-file:
- 'CONTRIBUTING.rst'

sdba:
- xclim/sdba/**/*
- tests/test_sdba/*.py
'sdba':
- changed-files:
- any-glob-to-any-file:
- 'xclim/sdba/**/*'
- 'tests/test_sdba/*.py'
26 changes: 22 additions & 4 deletions .github/workflows/actions-versions-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,38 @@ on:
- cron: '0 0 1 * *'
workflow_dispatch:

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
build:
runs-on: ubuntu-latest

permissions:
actions: write
contents: write
pull-requests: write
steps:
- uses: actions/[email protected]
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
token: ${{ secrets.BUMPVERSION_TOKEN }}
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- name: Checkout
uses: actions/[email protected]
with:
token: ${{ secrets.ACTIONS_VERSION_UPDATER_TOKEN }}
persist-credentials: true

- name: Run GitHub Actions Version Updater
uses: saadmk11/[email protected]
with:
token: ${{ secrets.BUMPVERSION_TOKEN }}
token: ${{ secrets.ACTIONS_VERSION_UPDATER_TOKEN }}
committer_email: 'bumpversion[bot]@ouranos.ca'
committer_username: 'update-github-actions[bot]'
pull_request_title: '[bot] Update GitHub Action Versions'
pull_request_team_reviewers: "xclim-core"
update_version_with: "release-commit-sha"
10 changes: 10 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ on:
types:
- opened

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
add-to-project:
name: Add Issue to xclim Project
runs-on: ubuntu-latest
permissions:
contents: read
repository-projects: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/Ouranosinc/projects/6
Expand Down
39 changes: 29 additions & 10 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,41 @@ on:
- master
paths-ignore:
- .*
- .github/**.yml
- .github/*/*.yml
- CHANGES.rst
- Makefile
- docs/**.ipynb
- docs/**.py
- docs/**.rst
- docs/*/*.ipynb
- docs/*/*.py
- docs/*/*.rst
- docs/Makefile
- docs/make.bat
- docs/references.bib
- environment.yml
- pylintrc
- pyproject.toml
- requirements_dev.txt
- requirements_upstream.txt
- setup.cfg
- tox.ini
- xclim/__init__.py

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
bump_patch_version:
name: Bumpversion Patch
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/[email protected]
with:
persist-credentials: false
- uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5.0.0
with:
python-version: "3.x"
- name: Config Commit Bot
Expand All @@ -43,12 +51,23 @@ jobs:
run: |
CURRENT_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
echo "current_version=${CURRENT_VERSION}"
- name: Bump Patch Version
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Install bump-my-version
run: |
python -m pip install bump-my-version
- name: Conditional Bump
id: bump
run: |
python -m pip install bump2version
echo "running `bump2version patch`"
if [[ ${{ env.CURRENT_VERSION }} =~ -dev(\.\d+)? ]]; then
echo "Development version (ends in 'dev(\.\d+)?'), bumping 'build' version"
bump-my-version bump build
else
echo "Version is stable, bumping 'patch' version"
bump-my-version bump patch
fi
NEW_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
echo "new_version=${NEW_VERSION}"
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
- name: Push Changes
uses: ad-m/[email protected]
with:
Expand Down
Loading

0 comments on commit f81f484

Please sign in to comment.