Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv #469

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
12 changes: 7 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,27 @@ jobs:
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV

- name: Install poetry
- name: Install uv
if: env.PUBLISH == 'true'
run: pipx install "poetry==1.8.3"
# run: pip install "uv==0.3.3"
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh

- name: Set up Python ${{ matrix.python-version }}
if: env.PUBLISH == 'true'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache: 'pip'

- name: Install dependencies [w/ docs]
if: env.PUBLISH == 'true'
run: poetry install --with=docs,lint
run: uv pip install --editable '.[docs,lint]'

- name: Build documentation
if: env.PUBLISH == 'true'
run: |
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd

- name: Push documentation to S3
if: env.PUBLISH == 'true'
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,42 @@ jobs:
python-version: ['3.9', '3.12']
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install "poetry==1.8.3"

- name: Install uv
# run: pip install "uv==0.3.3"
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache: 'pip'

- name: Install dependencies
run: poetry install --with=docs,test,coverage,lint
run: uv pip install --editable '.[docs,test,coverage,lint]'

- name: Lint with ruff check
run: poetry run ruff check .
run: uv run ruff check .

- name: Format with ruff
run: poetry run ruff format . --check
run: uv run ruff format . --check

- name: Lint with mypy
run: poetry run mypy .
run: uv run mypy .

- name: Print python versions
run: |
python -V
poetry run python -V
uv run python -V

- name: Test with pytest
run: poetry run py.test --cov=./ --cov-append --cov-report=xml
run: uv run py.test --cov=./ --cov-append --cov-report=xml
env:
COV_CORE_SOURCE: .
COV_CORE_CONFIG: .coveragerc
COV_CORE_DATAFILE: .coverage.eager

- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -67,18 +71,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install "poetry==1.8.3"
- name: Install uv
# run: pip install "uv==0.3.3"
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache: 'pip'

- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: poetry build
run: uv build

- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.4 3.11.6 3.10.13 3.9.18 3.8.18 3.7.17
3.12.4
197 changes: 88 additions & 109 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,110 +1,3 @@
[tool.poetry]
name = "libvcs"
version = "0.30.1"
description = "Lite, typed, python utilities for Git, SVN, Mercurial, etc."
license = "MIT"
authors = ["Tony Narlock <[email protected]>"]
keywords = [
"libvcs",
"git",
"mercurial",
"hg",
"svn",
"subversion",
"library",
"lib",
"wrapper",
"vcs",
"version control",
"scm",
"clone",
"checkout",
"abstraction",
"version-control",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Version Control",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: Software Development :: Version Control :: Mercurial",
"Topic :: System :: Shells",
"Typing :: Typed",
]
homepage = "http://github.com/vcs-python/libvcs/"
readme = "README.md"
packages = [
{ include = "*", from = "src" },
]
include = [
{ path = "CHANGES", format = "sdist" },
{ path = "MIGRATION", format = "sdist" },
{ path = ".tmuxp.yaml", format = "sdist" },
{ path = "tests", format = "sdist" },
{ path = "docs", format = "sdist" },
{ path = "conftest.py", format = "sdist" },
]

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/vcs-python/libvcs/issues"
Documentation = "https://libvcs.git-pull.com"
Repository = "https://github.com/vcs-python/libvcs"
Changes = "https://github.com/vcs-python/libvcs/blob/master/CHANGES"

[tool.poetry.dependencies]
python = "^3.9"
typing-extensions = { version = "*", python = '3.10' }

[tool.poetry.group.docs.dependencies]
### Docs ###
sphinx = "*"
furo = "*"
gp-libs = "*"
sphinx-autobuild = "*"
sphinx-autodoc-typehints = "*"
sphinx-inline-tabs = "*"
sphinxext-opengraph = "<0.8" # https://github.com/wpilibsuite/sphinxext-opengraph/issues/100
sphinx-copybutton = "*"
sphinxext-rediraffe = "*"
myst_parser = ">=0.18.1"
linkify-it-py = "*"

[tool.poetry.group.test.dependencies]
### Testing ###
gp-libs = "*"
pytest = "*"
pytest-rerunfailures = "*"
pytest-mock = "*"
pytest-watcher = "*"

[tool.poetry.group.coverage.dependencies]
### Coverage ###
codecov = "*"
coverage = "*"
pytest-cov = "*"

[tool.poetry.group.lint.dependencies]
### Lint ###
ruff = "*"
mypy = "*"

[tool.poetry.plugins.pytest11]
libvcs = "libvcs.pytest_plugin"

[tool.mypy]
strict = true
files = [
Expand Down Expand Up @@ -189,5 +82,91 @@ now = true
ignore_patterns = ["*.py.*.py"]

[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "libvcs"
version = "0.30.1"
description = "Lite, typed, python utilities for Git, SVN, Mercurial, etc."
license = {text = "MIT License"}
authors = [
{name = "Tony Narlock", email = "[email protected]"},
]
keywords = [
"libvcs",
"git",
"mercurial",
"hg",
"svn",
"subversion",
"library",
"lib",
"wrapper",
"vcs",
"version control",
"scm",
"clone",
"checkout",
"abstraction",
"version-control",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Version Control",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: Software Development :: Version Control :: Mercurial",
"Topic :: System :: Shells",
"Typing :: Typed",
]
readme = "README.md"
dependencies = [
"typing-extensions == 4.12.2",]

[project.optional-dependencies]
coverage = [
"codecov == 2.1.13",
"coverage == 7.6.1",
"pytest-cov == 5.0.0",]
docs = [
"sphinx == 7.4.7",
"furo == 2024.8.6",
"gp-libs == 0.0.6.post0",
"sphinx-autobuild == 2024.4.16",
"sphinx-autodoc-typehints == 2.2.3",
"sphinx-inline-tabs == 2023.4.21",
"sphinxext-opengraph == 0.7.5",
"sphinx-copybutton == 0.5.2",
"sphinxext-rediraffe == 0.2.7",
"myst-parser == 3.0.1",
"linkify-it-py == 2.0.3",]
lint = [
"ruff == 0.6.2",
"mypy == 1.11.1",]
test = [
"gp-libs == 0.0.6.post0",
"pytest == 8.3.2",
"pytest-rerunfailures == 14.0",
"pytest-mock == 3.14.0",
"pytest-watcher == 0.4.2",]

[project.urls]
"Bug Tracker" = "https://github.com/vcs-python/libvcs/issues"
Documentation = "https://libvcs.git-pull.com"
Repository = "https://github.com/vcs-python/libvcs"
Changes = "https://github.com/vcs-python/libvcs/blob/master/CHANGES"
Loading
Loading