Skip to content
Merged

* #8

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,25 @@ distribute:
hatch build && hatch publish && rm -rf dist

# This will upgrade all requirements, and refresh pinned requirements to
# match
# match. The same can be accomplished with `make reinstall`, but this
# runs faster, because environments are not recreated.
upgrade:
hatch run dependence freeze\
hatch run dependence upgrade\
--include-pointer /tool/hatch/envs/default\
--include-pointer /project\
pyproject.toml > .requirements.txt && \
hatch run pip install --upgrade --upgrade-strategy eager\
-r .requirements.txt && \
rm .requirements.txt && \
hatch run docs:dependence freeze\
pyproject.toml && \
hatch run docs:dependence upgrade\
--include-pointer /tool/hatch/envs/docs\
--include-pointer /project\
pyproject.toml > .requirements.txt && \
hatch run docs:pip install --upgrade --upgrade-strategy eager\
-r .requirements.txt && \
hatch run hatch-static-analysis:dependence freeze\
--include-pointer /tool/hatch/envs/docs\
pyproject.toml && \
hatch run hatch-static-analysis:dependence upgrade\
--include-pointer /tool/hatch/envs/hatch-static-analysis\
--include-pointer /project\
pyproject.toml > .requirements.txt && \
hatch run hatch-static-analysis:pip install --upgrade --upgrade-strategy eager\
-r .requirements.txt && \
hatch run hatch-test.py$(MINIMUM_PYTHON_VERSION):dependence freeze\
pyproject.toml && \
hatch run hatch-test.py$(MINIMUM_PYTHON_VERSION):dependence upgrade\
--include-pointer /tool/hatch/envs/hatch-test\
--include-pointer /project\
pyproject.toml > .requirements.txt && \
hatch run hatch-test.py$(MINIMUM_PYTHON_VERSION):pip install --upgrade --upgrade-strategy eager\
-r .requirements.txt && \
rm .requirements.txt && \
make requirements
pyproject.toml

# This will update pinned requirements to align with the
# package versions installed in each environment, and will align the project
Expand Down
86 changes: 22 additions & 64 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
[build-system]
requires = [
"hatchling",
]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "gittable"
version = "0.0.4"
version = "0.1.0"
description = "Get stuff from Git"
readme = "README.md"
license = "MIT"
requires-python = "~=3.9"
authors = [
{ email = "david@belais.me" },
]
keywords = [
"git",
]
authors = [{ email = "david@belais.me" }]
keywords = ["git"]
dependencies = []

[project.scripts]
Expand All @@ -27,36 +21,25 @@ Documentation = "https://gittable.enorganic.org"
Repository = "https://github.com/enorganic/gittable"

[tool.hatch.build.targets.sdist]
packages = [
"src/gittable",
]
sources = ["src"]
packages = ["src/gittable"]

[tool.hatch.build.targets.sdist.sources]
src = ""

[tool.hatch.build.targets.wheel]
packages = [
"src/gittable",
]
sources = ["src"]
packages = ["src/gittable"]

# [tool.hatch.build.targets.wheel.hooks.mypyc]
# dependencies = ["hatch-mypyc"]
[tool.hatch.build.targets.wheel.sources]
src = ""

[tool.hatch.envs.default]
python = "3.9"
dependencies = [
"pytest",
"mypy",
"dependence~=1.0"
]
pre-install-commands = [
"pip install --upgrade pip setuptools",
]
dependencies = ["pytest", "mypy", "dependence~=1.2"]
pre-install-commands = ["uv pip install --upgrade pip"]

[tool.hatch.envs.hatch-static-analysis]
extra-dependencies = ["pytest", "mypy", "dependence~=1.0"]
pre-install-commands = [
"pip install --upgrade pip setuptools",
]
extra-dependencies = ["pytest", "mypy", "dependence~=1.2"]
pre-install-commands = ["uv pip install --upgrade pip"]
post-install-commands = [
"hatch run hatch-static-analysis:mypy --install-types --non-interactive || echo",
]
Expand All @@ -67,15 +50,13 @@ dependencies = [
"mkdocs-material",
"mkdocstrings[python]",
"black",
"dependence~=1.0",
"dependence~=1.2",
]
pre-install-commands = []
post-install-commands = []

[tool.hatch.envs.hatch-test]
extra-dependencies = [
"dependence~=1.0",
]
extra-dependencies = ["dependence~=1.2"]
pre-install-commands = []
post-install-commands = []

Expand All @@ -86,19 +67,8 @@ python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
line-length = 79

[tool.ruff.lint]
ignore = [
"F842", "INP001"
]
extend-select = [
"E",
"F",
"UP",
"B",
"SIM",
"I",
"C",
"N",
]
ignore = ["F842", "INP001"]
extend-select = ["E", "F", "UP", "B", "SIM", "I", "C", "N"]

[tool.ruff.lint.mccabe]
max-complexity = 10
Expand All @@ -109,23 +79,12 @@ docstring-code-line-length = 79

[tool.black]
line-length = 79
target-version = [
"py39",
"py310",
"py311",
"py312",
"py313",
]
target-version = ["py39", "py310", "py311", "py312", "py313"]

[tool.mypy]
python_version = "3.9"
files = [
"src",
"tests",
]
exclude = [
"tests/projects",
]
files = ["src", "tests"]
exclude = ["tests/projects"]
disallow_untyped_defs = true
disallow_incomplete_defs = true

Expand All @@ -135,4 +94,3 @@ fail_under = 80
[tool.coverage.run]
source = ["src"]
omit = ["src/**/__main__.py"]

6 changes: 6 additions & 0 deletions src/gittable/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

__all__: tuple[str, ...] = ("download", "tag_version")

from gittable.download import download
from gittable.tag_version import tag_version
Loading