Skip to content

Commit

Permalink
uv publish (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-treebeard authored Dec 23, 2024
1 parent a9cee00 commit 2093ec6
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
- uses: actions/setup-python@v2
- run: pip install uv
- run: uv build
- run: pip install twine==4.0.1
- run: twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
- run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
- uses: EndBug/[email protected]
with:
author_name: github-actions
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
- run: npm install -g @devcontainers/[email protected]
- run: devcontainer up --workspace-folder=.
- run: devcontainer exec --workspace-folder=. uv venv
- run: devcontainer exec --workspace-folder=. uv pip install pre-commit pytest
- run: devcontainer exec --workspace-folder=. uv lock --check -p 3.11
- run: devcontainer exec --workspace-folder=. uv pip install -e .
- run: devcontainer exec --workspace-folder=. uv run pre-commit run --verbose --all-files
- run: devcontainer exec --workspace-folder=. uv run pytest
pytest:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ jobs:
- run: pytest --nbmake tests/resources/mock.ipynb
- run: pip install dist/*whl --force-reinstall
- run: pytest --nbmake tests/resources/mock.ipynb
- run: pip install twine==4.0.1
- run: twine upload -r testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }}
- run: uv publish --check-url https://test.pypi.org/project/nbmake/ --publish-url "https://test.pypi.org/legacy/" -t ${{ secrets.TEST_PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,4 @@ typeshed
trash
**/_build
.aider*
scratch/
17 changes: 13 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requires-python = ">=3.8.0"
dependencies = [
"pytest>=6.1.0",
"nbclient>=0.6.6",
"nbformat>=5.0.8",
"nbformat>=5.0.4",
"Pygments>=2.7.3",
"ipykernel>=5.4.0",
]
Expand All @@ -23,14 +23,23 @@ nbmake = "nbmake.pytest_plugin"
Homepage = "https://github.com/treebeardtech/nbmake"

[build-system]
requires = ["setuptools>=65.0.0", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"hatchling>=1.27.0",
"pre-commit>=3.5.0",
"pytest-xdist>=3.6.1",
"ruff>=0.8.4",
"pytest>=8.1",
"typing-extensions>=4.12.2",
]

# [[tool.uv.index]]
# url = "https://pypi.org/simple"
# default = true

# [[tool.uv.index]]
# name = "testpypi"
# url = "https://test.pypi.org/simple/"
# publish-url = "https://test.pypi.org/legacy/"
Empty file added src/nbmake/__init__.py
Empty file.
40 changes: 37 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2093ec6

Please sign in to comment.