-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create initial project infrastructure (#1)
* Create initial project infrastructure * Fix pylint warnings * Fix markdown heading
- Loading branch information
Showing
40 changed files
with
1,763 additions
and
6 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,37 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help improve PhasorPy | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
|
||
A clear and concise description of what the bug is and what was expected to happen. | ||
|
||
**To Reproduce** | ||
|
||
A minimal, self-contained Python code reproducing the problem. Format the code using markdown, for example: | ||
|
||
```Python | ||
import phasorpy | ||
phasorpy.do_something('my.file') | ||
``` | ||
|
||
A Python traceback if available, for example: | ||
|
||
```Python traceback | ||
Traceback (most recent call last): | ||
File "<stdin>", line 1, in <module> | ||
AttributeError: module 'phasorpy' has no attribute 'do_something' | ||
``` | ||
|
||
Any data files necessary to run the code can be attached to the issue or shared via cloud storage. | ||
|
||
Information how PhasorPy was installed (pip, conda, or other) and the console output of: | ||
|
||
``` | ||
$ python -m phasorpy --versions | ||
``` |
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,51 @@ | ||
name: Deploy documentation | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install package and dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements_dev.txt | ||
python -m pip install --no-build-isolation --no-deps --verbose --editable . | ||
- name: Build docs | ||
run: | | ||
cd docs | ||
make html | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: docs/_build/html | ||
- name: Deploy docs | ||
if: github.event_name == 'push' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.PHASORPY_DOC_DEPLOY_KEY }} | ||
external_repository: phasorpy/phasorpy.github.io | ||
publish_dir: docs/_build/html | ||
publish_branch: main | ||
destination_dir: ${{github.ref_name}} | ||
# cname: phasorpy.org |
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,75 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
build_artifacts: | ||
name: Build sdist and wheel | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install PyBuild | ||
run: | | ||
python -m pip install build | ||
- name: Build wheel and sdist | ||
run: | | ||
python -m build . | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: releases | ||
path: dist | ||
|
||
test_artifacts: | ||
name: Test sdist and wheel | ||
needs: [build_artifacts] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: releases | ||
path: dist | ||
- uses: actions/setup-python@v4.6.0 | ||
with: | ||
python-version: "3.11" | ||
- run: | | ||
ls | ||
ls dist | ||
python -m pip install -U twine | ||
python -m twine check dist/* | ||
python -m pip install --upgrade --no-cache-dir --no-deps --pre --no-index --find-links=dist phasorpy | ||
python -c"from phasorpy import __version__;print(__version__)" | ||
upload_artifacts: | ||
name: Upload release to PyPI | ||
needs: [build_artifacts] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/phasorpy | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: releases | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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,96 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test library and docs | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-20.04"] | ||
python-version: ["3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Editable install | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --editable . | ||
python -m pip install -r requirements_dev.txt | ||
- name: Print dependency versions | ||
run: | | ||
phasorpy --versions | ||
- name: Test with pytest | ||
run: | | ||
python -X dev -m pytest | ||
- name: Build docs | ||
run: | | ||
cd docs | ||
make html | ||
test_win_mac: | ||
name: Test Windows and macOS | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["windows-2019", "macos-12"] | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Editable install | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --editable . | ||
python -m pip install -r requirements_dev.txt | ||
- name: Test with pytest | ||
run: | | ||
python -X dev -m pytest | ||
- name: Build docs | ||
run: | | ||
cd docs | ||
make html | ||
static_analysis: | ||
name: Static code analysis | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Editable install | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --editable . | ||
python -m pip install -r requirements_dev.txt | ||
- name: Test with black | ||
run: | | ||
python -m black --check src/phasorpy tutorials docs | ||
- name: Test with mypy | ||
run: | | ||
python -m mypy | ||
- name: Test with isort | ||
run: | | ||
python -m isort --check src/phasorpy tutorials | ||
- name: Check spelling | ||
run: | | ||
python -m codespell_lib |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
See the [PhasorPy release notes](docs/release.rst). |
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 @@ | ||
See the [PhasorPy code of conduct](docs/code_of_conduct.rst). |
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 @@ | ||
See the [PhasorPy contributing guide](docs/contributing.rst). |
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
Oops, something went wrong.