-
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.
Merge pull request #77 from zhiwei2017/enhancement/upgrade-to-pyproject
Enhancement/upgrade to pyproject
- Loading branch information
Showing
19 changed files
with
1,422 additions
and
204 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
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 |
---|---|---|
|
@@ -28,6 +28,20 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: make install | ||
- name: Run flake8 check | ||
run: make flake8 | ||
- name: Run mypy check | ||
|
@@ -42,7 +56,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
|
@@ -51,15 +65,24 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/dev.txt | ||
pip install -e . | ||
run: make install | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
coverage xml | ||
run: make test | ||
- name: Make coverage report | ||
run: poetry run coverage xml | ||
- name: Codecov Action | ||
uses: Atrox/[email protected] | ||
# This workflow contains a single job called "build" | ||
|
@@ -74,11 +97,21 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: pip install twine | ||
- name: Build and test publishing package | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and check package with twine | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine check dist/*.whl | ||
make build | ||
poetry run twine check dist/*.whl |
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
Empty file.
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ Authors | |
.. | ||
Format: `Name <mailto:email>`_ - *Role/Responsibility* - `email <mailto:email?subject=[GitHub]Named%20Enum>`_ | ||
* `Zhiwei Zhang <https://github.com/zhiwei2017>`_ - *Maintainer* - `[email protected] <mailto:[email protected]?subject=[GitHub]Named%20Enum>`_ | ||
* `Zhiwei Zhang <https://github.com/zhiwei2017>`_ - *Maintainer* - `[email protected] <mailto:[email protected]?subject=[GitHub]Named%20Enum>`_ | ||
* `Jianlan Shao <https://github.com/Lan314>`_ - *Developer* - `[email protected] <mailto:[email protected]?subject=[GitHub]Named%20Enum>`_ |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.