-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate to pyproject.toml; use ruff; remove copyright year * tox -e lint * Update pypi release workflow; dependabot gha * Fix test
- Loading branch information
Showing
25 changed files
with
162 additions
and
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: ["main"] | ||
tags: ["*"] | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} | ||
|
@@ -13,39 +16,61 @@ jobs: | |
- { name: "3.8-ipython8", python: "3.8", tox: py38-ipython8 } | ||
- { name: "3.12-ipython8", python: "3.12", tox: py12-ipython8 } | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/setup-python@v4.3.0 | ||
- uses: actions/checkout@v4.0.0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- run: python -m pip install --upgrade pip | ||
allow-prereleases: true | ||
- run: python -m pip install tox | ||
- run: python -m tox -e${{ matrix.tox }} | ||
- run: python -m tox -e ${{ matrix.tox }} | ||
build: | ||
name: Build package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install pypa/build | ||
run: python -m pip install build | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m build | ||
- name: Install twine | ||
run: python -m pip install twine | ||
- name: Check build | ||
run: python -m twine check --strict dist/* | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
# this duplicates pre-commit.ci, so only run it on tags | ||
# it guarantees that linting is passing prior to a release | ||
lint-pre-release: | ||
name: lint | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/setup-python@v4.3.0 | ||
- uses: actions/checkout@v4.0.0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- run: python -m pip install --upgrade pip | ||
- run: python -m pip install tox | ||
- run: python -m tox -elint | ||
release: | ||
needs: [tests, lint-pre-release] | ||
publish-to-pypi: | ||
name: PyPI release | ||
if: startsWith(github.ref, 'refs/tags') | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build, tests, lint-pre-release] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/doitlive | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- name: install requirements | ||
run: python -m pip install build twine | ||
- name: build dists | ||
run: python -m build | ||
- name: check package metadata | ||
run: twine check dist/* | ||
- name: publish | ||
run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,60 @@ | ||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] | ||
[project] | ||
name = "doitlive" | ||
version = "5.0.0" | ||
description = "Because sometimes you need to do it live." | ||
readme = "README.rst" | ||
license = { file = "LICENSE" } | ||
authors = [{ name = "Steven Loria", email = "[email protected]" }] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Environment :: Console", | ||
] | ||
keywords = ["doitlive", "cli", "live", "coding", "presentations", "shell"] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"click>=8.0,<9", | ||
"click-completion>=0.3.1", | ||
"click-didyoumean>=0.0.3", | ||
] | ||
|
||
[project.urls] | ||
Issues = "https://github.com/sloria/doitlive/issues" | ||
Source = "https://github.com/sloria/doitlive/" | ||
|
||
[project.optional-dependencies] | ||
tests = ["pytest", "IPython>=8"] | ||
docs = ["sphinx==7.2.6", "sphinx-issues==4.0.0"] | ||
dev = ["doitlive[tests]", "tox", "pre-commit~=3.6"] | ||
|
||
[build-system] | ||
requires = ["flit_core<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.flit.sdist] | ||
include = ["tests/", "CONTRIBUTING.md", "tox.ini"] | ||
exclude = ["docs/_build/"] | ||
|
||
[tool.ruff] | ||
src = ["src"] | ||
fix = true | ||
show-fixes = true | ||
show-source = true | ||
|
||
[tool.ruff.lint] | ||
ignore = ["E203", "E266", "E501", "E731"] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"E", # pycodestyle error | ||
"F", # pyflakes | ||
"I", # isort | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warning | ||
] |
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.