-
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.
- Loading branch information
Showing
24 changed files
with
814 additions
and
19 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,16 @@ | ||
{ | ||
"template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", | ||
"commit": "fa22e97dff1a88de1834d9deba827197b081fe29", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"project_name": "callcache", | ||
"project_slug": "callcache", | ||
"project_short_description": "Efficiently cache calls to functions", | ||
"copyright_holder": "B-Open Solutions srl", | ||
"copyright_year": "2019", | ||
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package" | ||
} | ||
}, | ||
"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,6 @@ | ||
--- | ||
title: Weekly update rejection | ||
labels: cruft-update | ||
--- | ||
`cruft` was not able to automatically update the cookiecutter template. | ||
Please run locally `make template-update` and resolve the conflicts before pushing to 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,140 @@ | ||
name: on-push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
|
||
unit-tests: | ||
name: unit-tests (3.10) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/provision-with-micromamba@v12 | ||
with: | ||
environment-file: environment.yml | ||
environment-name: DEVELOP | ||
channels: conda-forge | ||
cache-env: true | ||
extra-specs: | | ||
python=3.10 | ||
- name: Install package | ||
run: | | ||
python -m pip install --no-deps -e . | ||
- name: Run tests | ||
run: | | ||
make unit-tests | ||
type-check: | ||
needs: [unit-tests] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/provision-with-micromamba@v12 | ||
with: | ||
environment-file: environment.yml | ||
environment-name: DEVELOP | ||
channels: conda-forge | ||
cache-env: true | ||
extra-specs: | | ||
python=3.10 | ||
- name: Install package | ||
run: | | ||
python -m pip install --no-deps -e . | ||
- name: Run code quality checks | ||
run: | | ||
make type-check | ||
docs-build: | ||
needs: [unit-tests] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/provision-with-micromamba@v12 | ||
with: | ||
environment-file: environment.yml | ||
environment-name: DEVELOP | ||
channels: conda-forge | ||
cache-env: true | ||
extra-specs: | | ||
python=3.10 | ||
- name: Install package | ||
run: | | ||
python -m pip install --no-deps -e . | ||
- name: Build documentation | ||
run: | | ||
make docs-build | ||
integration-tests: | ||
needs: [unit-tests] | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- python-version: '3.10' | ||
extra: -minver | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/provision-with-micromamba@v12 | ||
with: | ||
environment-file: environment${{ matrix.extra }}.yml | ||
environment-name: DEVELOP${{ matrix.extra }} | ||
channels: conda-forge | ||
cache-env: true | ||
extra-specs: | | ||
python=${{matrix.python-version }} | ||
- name: Install package | ||
run: | | ||
python -m pip install --no-deps -e . | ||
- name: Run tests | ||
run: | | ||
make unit-tests | ||
distribution: | ||
runs-on: ubuntu-latest | ||
needs: [integration-tests, type-check, docs-build] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build distributions | ||
run: | | ||
$CONDA/bin/python -m pip install build | ||
$CONDA/bin/python -m build | ||
- name: Publish a Python distribution to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,37 @@ | ||
name: weekly | ||
on: | ||
schedule: | ||
- cron: 0 0 * * 1 | ||
jobs: | ||
auto-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
id: update | ||
with: | ||
extra_args: -c .pre-commit-config-weekly.yaml --all-files | ||
- uses: andstor/file-existence-action@v1 | ||
if: failure() | ||
id: check_files | ||
with: | ||
files: '*.rej' | ||
- name: Open PR | ||
if: failure() && (steps.check_files.outputs.files_exists == 'false') | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
title: weekly update | ||
labels: | | ||
cruft-update | ||
- name: Open Issue | ||
if: failure() && (steps.check_files.outputs.files_exists == 'true') | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/cruft-update-template.md | ||
update_existing: true | ||
search_existing: open |
Oops, something went wrong.