Skip to content

Commit 855fee4

Browse files
authored
Merge pull request #265 from joe733/workshop
feat: zero required dependencies
2 parents 5b960f0 + 4870803 commit 855fee4

File tree

5 files changed

+57
-20
lines changed

5 files changed

+57
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
virtualenvs-in-project: true
3434
# install dependencies
3535
- name: Install dependencies
36-
run: poetry install --no-interaction --no-ansi --only sphinx
36+
run: poetry install --no-interaction --no-ansi --no-root --only sphinx
3737
# build package
3838
- name: Build package
3939
run: |

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
virtualenvs-in-project: true
3232
# install dependencies
3333
- name: Install dependencies
34-
run: poetry install --no-interaction --no-ansi --without docs,hooks,sast
34+
run: poetry install --no-interaction --no-ansi --no-root --only tooling
3535
# run preflight checks
3636
- name: Preflight checks with tox
3737
run: |

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
virtualenvs-create: true
3434
virtualenvs-in-project: true
3535
- name: Install dependencies
36-
run: poetry install --no-interaction --no-root --no-ansi --only docs
36+
run: poetry install --no-interaction --no-ansi --no-root --only docs
3737
- name: Build documentation
3838
run: |
3939
source .venv/bin/activate

poetry.lock

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Utils PEP 621 is enhanced or some fancy build
2+
# system comes up with a clever mechanism to
3+
# itegrate it all. For now poetry works best.
4+
5+
6+
####################
7+
# Build System #
8+
####################
9+
10+
[build-system]
11+
requires = ["poetry-core"]
12+
build-backend = "poetry.core.masonry.api"
13+
14+
15+
####################
16+
# Metadata #
17+
####################
18+
119
[tool.poetry]
220
name = "validators"
321
version = "0.21.1"
@@ -24,46 +42,64 @@ classifiers = [
2442
]
2543
include = ["CHANGES.md", "docs/*", "docs/validators.1", "validators/py.typed"]
2644

45+
46+
####################
47+
# Dependencies #
48+
####################
49+
2750
[tool.poetry.dependencies]
2851
python = "^3.8"
2952

30-
[tool.poetry.group.dev.dependencies]
31-
tox = "^4.4.11"
53+
[tool.poetry.group.docs]
54+
optional = true
3255

3356
[tool.poetry.group.docs.dependencies]
3457
mkdocs = "^1.4.2"
3558
mkdocs-material = "^9.1.6"
36-
mkdocstrings = { extras = ["python"], version = "^0.20.0" }
59+
mkdocstrings = { extras = ["python"], version = "^0.21.2" }
3760
pyaml = "^21.10.1"
3861

62+
[tool.poetry.group.hooks]
63+
optional = true
64+
3965
[tool.poetry.group.hooks.dependencies]
4066
pre-commit = "^3.2.2"
4167

68+
[tool.poetry.group.sast]
69+
optional = true
70+
4271
[tool.poetry.group.sast.dependencies]
4372
bandit = "^1.7.5"
4473

74+
[tool.poetry.group.sphinx]
75+
optional = true
76+
4577
[tool.poetry.group.sphinx.dependencies]
4678
sphinx = "^6.1.3"
4779
myst-parser = "^1.0.0"
4880
pypandoc-binary = "^1.11"
4981

50-
[tool.poetry.group.tests.dependencies]
82+
[tool.poetry.group.testing]
83+
optional = true
84+
85+
[tool.poetry.group.testing.dependencies]
5186
pytest = "^7.3.0"
5287

53-
[tool.poetry.group.type-lint-format.dependencies]
88+
[tool.poetry.group.tooling]
89+
optional = true
90+
91+
[tool.poetry.group.tooling.dependencies]
5492
black = "^23.3.0"
5593
flake8 = "^5.0.4"
5694
flake8-docstrings = "^1.7.0"
5795
isort = "^5.12.0"
5896
pyright = "^1.1.302"
97+
tox = "^4.4.11"
5998

60-
[build-system]
61-
requires = ["poetry-core"]
62-
build-backend = "poetry.core.masonry.api"
6399

64-
#######################
65-
# misc configurations #
66-
#######################
100+
####################
101+
# Configurations #
102+
####################
67103

68104
[tool.black]
69105
line-length = 100
@@ -112,7 +148,7 @@ env_list =
112148
[testenv]
113149
description = run unit tests
114150
deps = pytest
115-
commands = pytest tests/
151+
commands = pytest
116152
117153
[testenv:format_black]
118154
description = run formatter

0 commit comments

Comments
 (0)