-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use pyproject.toml as is the recommended way to define python project metadata now. * Move calliope into src to make sure tests are not getting confused about relative filepaths in a way we don't realise. * Move from azure pipelines to github actions, which allow us to leverage the growing number of pre-built actions (like micromamba for speedy env install). * Move tests out of the calliope package itself. * Move and restructure requirements files so that dev install becomes a much easier one-liner for the mamba/conda part. * Remove unused dirs/files
- Loading branch information
1 parent
cbed4c8
commit 5591b09
Showing
160 changed files
with
384 additions
and
2,217 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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: Branch Push CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths-ignore: | ||
- README.md | ||
- changelog.rst | ||
- LICENSE | ||
- CITATION | ||
- AUTHORS | ||
- doc/** | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
micromamba-version: latest | ||
environment-name: ${{ github.event.repository.name }}-ubuntu-latest-311 | ||
environment-file: requirements/base.txt | ||
create-args: >- | ||
-f requirements/dev.txt | ||
python=3.11 | ||
coin-or-cbc | ||
post-cleanup: all | ||
cache-environment: true | ||
|
||
- name: Install package | ||
run: pip install --no-dependencies -e . | ||
|
||
- name: Install jupyter kernel | ||
run: python -m ipykernel install --user --name calliope | ||
|
||
- name: run tests | ||
run: pytest |
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,73 @@ | ||
name: Pull Request CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths-ignore: | ||
- README.md | ||
- changelog.rst | ||
- LICENSE | ||
- CITATION | ||
- AUTHORS | ||
- doc/** | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
concurrency: | ||
# Use github.run_id on main branch | ||
# Use github.event.pull_request.number on pull requests, so it's unique per pull request | ||
# Use github.ref on other branches, so it's unique per branch | ||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
py3version: ["9", "10", "11"] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
micromamba-version: latest | ||
environment-name: ${{ github.event.repository.name }}-${{ matrix.os }}-3${{ matrix.py3version }} | ||
environment-file: requirements/base.txt | ||
create-args: >- | ||
-f requirements/dev.txt | ||
curl | ||
python=3.${{ matrix.py3version }} | ||
post-cleanup: all | ||
cache-environment: true | ||
|
||
- name: Install package | ||
run: pip install --no-dependencies -e . | ||
|
||
- name: install CBC (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
curl -L https://github.com/coin-or/Cbc/releases/download/releases%2F2.10.10/Cbc-releases.2.10.10-w64-msvc17-md.zip -o cbc.zip | ||
unzip cbc.zip -d ${HOME}/cbc | ||
echo "${HOME}/cbc/bin" >> $GITHUB_PATH | ||
- name: install CBC (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: micromamba install coin-or-cbc | ||
|
||
- name: Install jupyter kernel | ||
run: python -m ipykernel install --user --name calliope | ||
|
||
- name: run tests | ||
run: pytest | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
if: matrix.os == 'ubuntu-latest' && matrix.py3version == '11' | ||
env: | ||
directory: "./reports/coverage/" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.