Skip to content

Commit

Permalink
PEP 621 metadata
Browse files Browse the repository at this point in the history
ghstack-source-id: c6a426eb7cff4045c9759fb826f8b17f5c378407
Pull Request resolved: omnilib#107
  • Loading branch information
amyreese committed May 18, 2024
1 parent ddab875 commit 0e355a5
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 52 deletions.
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.

0 comments on commit 0e355a5

Please sign in to comment.