-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve tests and codebase structure to Pep621 (#68)
Co-authored-by: choldgraf <choldgraf@gmail.com>
- Loading branch information
Showing
17 changed files
with
162 additions
and
131 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,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This will run every time a tag is created and pushed to the repository. | ||
# It calls our tests workflow via a `workflow_call`, and if tests pass | ||
# then it triggers our upload to PyPI for a new release. | ||
name: Make a new release | ||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
dist: | ||
name: publish | ||
needs: [tests] # require tests to pass before deploy runs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Build package | ||
run: pipx run build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
upload_pypi: | ||
name: publish | ||
needs: [dist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@v1.6.4 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_KEY }} | ||
release: | ||
needs: [ upload_pypi ] | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Sphinx thebe ${{ github.ref_name }} | ||
prerelease: ${{ contains(github.ref, 'rc') }} | ||
generate_release_notes: true |
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 |
---|---|---|
|
@@ -128,4 +128,6 @@ dmypy.json | |
# Pyre type checker | ||
.pyre/ | ||
|
||
docs/_build | ||
### Project specific | ||
docs/_build | ||
_version.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "sphinx-thebe" | ||
authors = [ | ||
{ name = "Executable Books Team", email = "executablebooks@gmail.com" }, | ||
] | ||
maintainers = [ | ||
# TODO: Add an actual maintainer | ||
{ name = "Executable Books Team", email = "executablebooks@gmail.com" }, | ||
] | ||
description = "Integrate interactive code blocks into your documentation with Thebe and Binder." | ||
readme = "README.md" | ||
license = "MIT" | ||
license-files = { paths = ["LICENSE"] } | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Framework :: Sphinx :: Extension", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dynamic = ["version"] | ||
keywords = [ | ||
"development", | ||
"docutils", | ||
"sphinx", | ||
] | ||
dependencies = [ | ||
"sphinx>=4", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/packit/packit" | ||
|
||
[project.optional-dependencies] | ||
sphinx = [ | ||
"myst-nb", | ||
"sphinx-book-theme", | ||
"sphinx-copybutton", | ||
"sphinx-design", | ||
] | ||
testing = [ | ||
"myst-nb>=1.0.0rc0", | ||
"sphinx-copybutton", | ||
"sphinx-design", | ||
"matplotlib", | ||
"pytest", | ||
"pytest-regressions", | ||
"beautifulsoup4", | ||
] | ||
# TODO: Add pre-commits | ||
dev = [ | ||
"sphinx-thebe[testing]", | ||
] | ||
|
||
[tool.hatch] | ||
version.source = "vcs" | ||
build.hooks.vcs.version-file = "src/sphinx_thebe/_version.py" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = [ | ||
"tests", | ||
] |
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,6 +1,9 @@ | ||
version: 2 | ||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.12" | ||
python: | ||
version: 3 | ||
install: | ||
- method: pip | ||
path: . | ||
|
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
File renamed without changes
File renamed without changes.
File renamed without changes.
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