-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clear figure instead of closing it for reset_figure * adding tests and updating docs * adding github actions unit tests * updating release workflow and changelog Co-authored-by: Varun Agrawal <[email protected]>
- Loading branch information
1 parent
9da2b56
commit a40eb56
Showing
97 changed files
with
1,234 additions
and
1,801 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,77 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install ".[test]" | ||
- name: Run the unit tests | ||
run: python -m pytest -v test | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./result_images | ||
|
||
dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Build | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U build | ||
python -m build . | ||
- name: Check the dist | ||
run: | | ||
python -m pip install twine | ||
twine check dist/* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/* | ||
|
||
upload_pypi: | ||
needs: [tests, dist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
# To test: repository_url: https://test.pypi.org/legacy/ |
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 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: docs | ||
- id: end-of-file-fixer | ||
exclude_types: [json] | ||
exclude: docs | ||
- id: debug-statements | ||
exclude: docs | ||
|
||
- repo: https://github.com/psf/black | ||
rev: "20.8b1" | ||
hooks: | ||
- id: black |
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,15 @@ | ||
version: 2 | ||
|
||
submodules: | ||
include: all | ||
|
||
python: | ||
version: 3.7 | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs | ||
|
||
sphinx: | ||
builder: dirhtml |
This file was deleted.
Oops, something went wrong.
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
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 +1,4 @@ | ||
include README.rst LICENSE.rst requirements.txt | ||
exclude .gitignore *.md | ||
prune .github | ||
prune docs | ||
prune images |
Oops, something went wrong.