-
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.
* ci: Added pipelines and replaced poetry as package handler * ci: Updated pipelines and version references. * ci(pyproject.toml): Updated version reference in commitizen field * ci(poetry.lock): Updated poetry files * ci(pyproject.toml): Stable toml without matplotlib * ci(pyproject.toml): Updated toml with matplotlib dependency * ci(.pre-commit-config.yaml): Added pre-commit hook to git repo * ci(.github/workflows/docs.yml): Modified docs pipeline to build sphinx docs * ci(__init__.py): Corrected silly typo * test(tests/): Fixed some failing tests due to local directories and path handling * test(tests/): Ignored tests which contain sensible data * test(tests/test_data): Added test data files * ci(pyproject.toml): Changed dependency python into 3.7 for win run * ci(pyproject.tom;poetry.lock): Added poetry2conda dependency to forge correctly * ci(tests/): Removed duplicated dependency on environment.yml, added shapely forge * ci(pyproject.toml): Made netcdf4 version fixed Former-commit-id: 8f384a7
- Loading branch information
Showing
26 changed files
with
2,653 additions
and
541 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,66 @@ | ||
name: Bump version | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
bump-version: | ||
if: "!startsWith(github.event.head_commit.message, 'bump:')" | ||
runs-on: ubuntu-latest | ||
name: "Bump version and create changelog with commitizen" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.8 | ||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
path: ~/.virtualenvs | ||
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ matrix.os }}-${{ matrix.python-version }}- | ||
- name: Set Poetry config | ||
run: | | ||
poetry config virtualenvs.in-project false | ||
poetry config virtualenvs.path ~/.virtualenvs | ||
- name: Install Dependencies | ||
run: poetry install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Verify github tags | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout $GITHUB_HEAD_REF | ||
git fetch --all --tags | ||
git tag | ||
# - name: Create bump and changelog | ||
# uses: commitizen-tools/commitizen-action@master | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create bump and changelog | ||
run: | | ||
poetry run cz bump --changelog | ||
- name: Push changelog, version files and new tag | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout $GITHUB_HEAD_REF | ||
git push --force | ||
git push --tags --force |
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,65 @@ | ||
name: ci | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
CI: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.7] | ||
os: [ubuntu-18.04, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.8 | ||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
path: ~/.virtualenvs | ||
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ matrix.os }}-${{ matrix.python-version }}- | ||
- name: Set Poetry config | ||
run: | | ||
poetry config virtualenvs.in-project false | ||
poetry config virtualenvs.path ~/.virtualenvs | ||
- name: Install Dependencies | ||
run: poetry install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Test with pytest | ||
run: poetry run pytest --cov . --cov-report xml:coverage-reports/coverage-fm2prof-src.xml --junitxml=xunit-reports/xunit-result-fm2prof-src.xml | ||
|
||
- name: Autoformat code if the check fails | ||
if: ${{ (matrix.os == 'ubuntu-18.04') && (matrix.python-version == 3.8) }} | ||
run: | | ||
poetry run isort . | ||
poetry run black . | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout $GITHUB_HEAD_REF | ||
git commit -am "autoformat: isort & black" && git push || true | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
if: ${{ (matrix.os == 'ubuntu-18.04') && (matrix.python-version == 3.8) }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_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,40 @@ | ||
name: docs | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.8 | ||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
path: ~/.virtualenvs | ||
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ matrix.os }}-${{ matrix.python-version }}- | ||
- name: Set Poetry config | ||
run: | | ||
poetry config virtualenvs.in-project false | ||
poetry config virtualenvs.path ~/.virtualenvs | ||
- name: Install Dependencies | ||
run: poetry install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Build SPHINX docs | ||
uses: ammaraskar/sphinx-action@master | ||
with: | ||
docs-folder: "docs/" |
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,3 @@ | ||
.vscode | ||
.pytest_cache | ||
**__pycache__** |
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 @@ | ||
repos: | ||
- repo: https://github.com/commitizen-tools/commitizen | ||
rev: v2.20.0 | ||
hooks: | ||
- id: commitizen | ||
stages: [commit-msg] |
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
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
__version__ = "1.4.3" | ||
|
||
from fm2prof.Fm2ProfRunner import Project | ||
from fm2prof import utils | ||
from fm2prof import utils |
Oops, something went wrong.