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

PEP 621 metadata #107

Merged
merged 2 commits into from
May 18, 2024
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install
run: |
pip install -U pip -r requirements.txt
pip install .
run: make EXTRAS=dev install
- name: Test
run: thx --live test
- name: Lint
Expand Down
11 changes: 4 additions & 7 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
SRCS:=thx
EXTRAS:=dev,docs

.venv:
python -m venv .venv
source .venv/bin/activate && make setup dev
source .venv/bin/activate && make install
echo 'run `source .venv/bin/activate` to use virtualenv'

venv: .venv

dev:
python -m pip install -e .

setup:
install:
python -m pip install -U pip
python -m pip install -Ur requirements-dev.txt
python -m pip install -Ur requirements.txt
python -m pip install -e .[$(EXTRAS)]

release: lint test clean
flit publish
Expand Down
78 changes: 54 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,69 @@
requires = ["flit_core >=3,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "thx"
author = "Amethyst Reese"
author-email = "[email protected]"
description-file = "README.rst"
home-page = "https://github.com/omnilib/thx"
requires = [
[project]
name = "thx"
readme = "README.rst"
license = {file="LICENSE"}
dynamic = ["version", "description"]
authors = [
{name="Amethyst Reese", email="[email protected]"},
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Utilities",
"Typing :: Typed",
]
requires-python = ">=3.8"
dependencies = [
"aioitertools >= 0.10.0b1",
"click >= 8.0",
"packaging >= 21.0",
"rich >= 11.0.0",
"tomli >= 1.0",
"trailrunner >= 1.1",
"typing_extensions >= 4.0; python_version < '3.11'",
"typing_extensions >= 4.0",
"watchdog >= 2.1",
]
requires-python = ">=3.7"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Utilities",
"Typing :: Typed",

[project.optional-dependencies]
dev = [
"aioitertools==v0.11.0",
"click==8.1.3",
"packaging==24.0",
"rich==13.7.1",
"tomli==2.0.1",
"trailrunner==1.4.0",
"typing_extensions == 4.1.1",
"watchdog==2.1.9",

"attribution==1.7.1",
"black==24.4.2",
"coverage==7.5.1",
"flit==3.9.0",
"flake8==7.0.0",
"mypy==1.10.0",
"ufmt==2.6.0",
"usort==1.0.8.post1",
]
docs = [
"sphinx==7.2.6; python_version > '3.8'",
"sphinx-mdinclude==0.6.1",
]

[project.scripts]
thx = "thx.main:main"

[project.urls]
Documentation = "https://thx.omnilib.dev"
Github = "https://github.com/omnilib/thx"

[tool.flit.sdist]
exclude = [
".github/",
]

[tool.flit.scripts]
thx = "thx.main:main"

[tool.attribution]
name = "thx"
package = "thx"
Expand Down Expand Up @@ -61,6 +92,7 @@ ignore_missing_imports = true
[tool.thx]
default = ["format", "docs", "test", "lint", "coverage"]
python_versions = ["3.8", "3.9", "3.10", "3.11", "3.12"]
extras = ["dev", "docs"]

[tool.thx.values]
module = "thx"
Expand All @@ -71,14 +103,12 @@ docs = {run="sphinx-build -ab html docs html", once=true}
format = {run="python -m ufmt format {srcs}", once=true}
test = "python -m coverage run -m {module}.tests"

[tool.thx.jobs.combine]
requires = ["test"]
run = "python -m coverage combine"
once = true

[tool.thx.jobs.coverage]
requires = ["combine"]
run = "python -m coverage report"
requires = ["test"]
run = [
"python -m coverage combine -q",
"python -m coverage report",
]
once = true
show_output = true

Expand Down
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

Loading