-
Notifications
You must be signed in to change notification settings - Fork 6
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 #33 from sigma-py/up
some updates
- Loading branch information
Showing
18 changed files
with
163 additions
and
97 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,33 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build-upload: | ||
name: Build and upload to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # required for pypi upload | ||
contents: read # required for checkout | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Build stubs | ||
run: | | ||
pip install mypy | ||
stubgen --include-docstrings src/ -o src/ | ||
- name: Build wheels | ||
run: | | ||
pip install build | ||
python3 -m build --wheel | ||
- name: Upload to PyPI | ||
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
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,16 +1,23 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.1.15 | ||
hooks: | ||
- id: isort | ||
- id: ruff | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.1.0 | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.1.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- id: prettier | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: flake8 | ||
- id: codespell | ||
# args: ["-L", "sur,nd"] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
files: src | ||
args: ["--install-types", "--non-interactive"] |
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
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,22 +1,20 @@ | ||
version := `python3 -c "from src.npx.__about__ import __version__; print(__version__)"` | ||
version := `python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])"` | ||
|
||
default: | ||
@echo "\"just publish\"?" | ||
|
||
publish: | ||
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi | ||
gh release create "v{{version}}" | ||
flit publish | ||
|
||
clean: | ||
@find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf | ||
@rm -rf src/*.egg-info/ build/ dist/ .tox/ | ||
@rm -rf src/*.egg-info/ build/ dist/ .tox/ .mypy_cache/ | ||
|
||
format: | ||
isort . | ||
black . | ||
ruff --fix src/ tests/ | ||
black src/ tests/ | ||
blacken-docs README.md | ||
|
||
lint: | ||
black --check . | ||
flake8 . | ||
pre-commit run --all |
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.
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
Oops, something went wrong.