Skip to content

Commit

Permalink
Update pyproject.toml and add GitHub action to deploy release
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlamont committed Dec 21, 2024
1 parent f68c73a commit fbcb5c1
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags:
# Publish on any tag that looks like a semantic version e.g. 1.2.3
- '*.*.*'

jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project -p 3.13 --with dist/*.whl tests/smoke_test.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz tests/smoke_test.py
- run: uv publish --trusted-publishing always
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

5 changes: 5 additions & 0 deletions .python-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3.13.1
3.12.8
3.11.11
3.10.16
3.9.21
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ authors = [
{ name = "Owen Lamont", email = "[email protected]" }
]
requires-python = ">=3.9"
keywords = [
"uv", "uv.lock", "vulnerabilities"
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries",
]

dependencies = [
"httpx>=0.28.1",
"inflect>=7.4.0",
Expand All @@ -31,6 +53,10 @@ jupyter = [
[project.scripts]
uv-secure = "uv_secure.run:app"

[project.urls]
Repository = "https://github.com/owenlamont/uv-secure"
Releases = "https://github.com/owenlamont/uv-secure/releases"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand Down
3 changes: 2 additions & 1 deletion src/uv_secure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from uv_secure.__version__ import __version__
from uv_secure.run import app, check_dependencies


__all__ = ["app", "check_dependencies"]
__all__ = ["__version__", "app", "check_dependencies"]
10 changes: 10 additions & 0 deletions tests/smoke_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Check that basic features work.
Catch cases where e.g. files are missing so the import doesn't work. It is
recommended to check that e.g. assets are included.
"""

import uv_secure


print(uv_secure.__version__)

0 comments on commit fbcb5c1

Please sign in to comment.