Skip to content

Commit e1da925

Browse files
committed
Add build process for package to tasks.py file.
1 parent 940ce44 commit e1da925

File tree

3 files changed

+230
-64
lines changed

3 files changed

+230
-64
lines changed

requirements.txt

Lines changed: 195 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,195 @@
1-
blinker==1.7.0 ; python_version >= "3.9" and python_version < "3.13"
2-
cachetools==5.3.3 ; python_version >= "3.9" and python_version < "3.13"
3-
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "3.13"
4-
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13"
5-
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
6-
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and platform_system == "Windows"
7-
colour-checker-detection @ git+https://github.com/colour-science/colour-checker-detection.git@4645a205128778e684955a5e43b770133f3d5efb ; python_version >= "3.9" and python_version < "3.13"
8-
colour-datasets==0.2.5 ; python_version >= "3.9" and python_version < "3.13"
9-
colour-science==0.4.4 ; python_version >= "3.9" and python_version < "3.13"
10-
contourpy==1.2.1 ; python_version >= "3.9" and python_version < "3.13"
11-
cycler==0.12.1 ; python_version >= "3.9" and python_version < "3.13"
12-
dash==2.16.1 ; python_version >= "3.9" and python_version < "3.13"
13-
dash-bootstrap-components==1.6.0 ; python_version >= "3.9" and python_version < "3.13"
14-
dash-core-components==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
15-
dash-html-components==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
16-
dash-renderer==1.9.1 ; python_version >= "3.9" and python_version < "3.13"
17-
dash-table==5.0.0 ; python_version >= "3.9" and python_version < "3.13"
18-
dash-uploader==0.6.0 ; python_version >= "3.9" and python_version < "3.13"
19-
flask==3.0.3 ; python_version >= "3.9" and python_version < "3.13"
20-
fonttools==4.51.0 ; python_version >= "3.9" and python_version < "3.13"
21-
gunicorn==22.0.0 ; python_version >= "3.9" and python_version < "3.13"
22-
idna==3.7 ; python_version >= "3.9" and python_version < "3.13"
23-
imageio==2.34.1 ; python_version >= "3.9" and python_version < "3.13"
24-
importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.13"
25-
importlib-resources==6.4.0 ; python_version >= "3.9" and python_version < "3.10"
26-
itsdangerous==2.2.0 ; python_version >= "3.9" and python_version < "3.13"
27-
jinja2==3.1.3 ; python_version >= "3.9" and python_version < "3.13"
28-
jsonpickle==2.2.0 ; python_version >= "3.9" and python_version < "3.13"
29-
kiwisolver==1.4.5 ; python_version >= "3.9" and python_version < "3.13"
30-
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "3.13"
31-
matplotlib==3.8.4 ; python_version >= "3.9" and python_version < "3.13"
32-
nest-asyncio==1.6.0 ; python_version >= "3.9" and python_version < "3.13"
33-
networkx==2.8.8 ; python_version >= "3.9" and python_version < "3.13"
34-
numpy==1.26.4 ; python_version >= "3.9" and python_version < "3.13"
35-
opencv-python==4.9.0.80 ; python_version >= "3.9" and python_version < "3.13"
36-
packaging==21.3 ; python_version >= "3.9" and python_version < "3.13"
37-
pillow==10.3.0 ; python_version >= "3.9" and python_version < "3.13"
38-
plotly==5.21.0 ; python_version >= "3.9" and python_version < "3.13"
39-
pyparsing==3.1.2 ; python_version >= "3.9" and python_version < "3.13"
40-
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "3.13"
41-
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13"
42-
retrying==1.3.4 ; python_version >= "3.9" and python_version < "3.13"
43-
scipy==1.13.0 ; python_version >= "3.9" and python_version < "3.13"
44-
setuptools==69.5.1 ; python_version >= "3.9" and python_version < "3.13"
45-
six==1.16.0 ; python_version >= "3.9" and python_version < "3.13"
46-
tenacity==8.2.3 ; python_version >= "3.9" and python_version < "3.13"
47-
tqdm==4.66.2 ; python_version >= "3.9" and python_version < "3.13"
48-
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.13"
49-
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "3.13"
50-
werkzeug==3.0.2 ; python_version >= "3.9" and python_version < "3.13"
51-
xlrd==1.2.0 ; python_version >= "3.9" and python_version < "3.13"
52-
xxhash==3.4.1 ; python_version >= "3.9" and python_version < "3.13"
53-
zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.13"
1+
# This file was autogenerated by uv via the following command:
2+
# uv export --no-hashes --all-extras
3+
anyio==4.8.0
4+
appnope==0.1.4 ; platform_system == 'Darwin'
5+
argon2-cffi==23.1.0
6+
argon2-cffi-bindings==21.2.0
7+
arrow==1.3.0
8+
asttokens==3.0.0
9+
async-lru==2.0.4
10+
attrs==24.3.0
11+
babel==2.16.0
12+
backports-tarfile==1.2.0 ; python_full_version < '3.12'
13+
beautifulsoup4==4.12.3
14+
bleach==6.2.0
15+
blinker==1.9.0
16+
cachetools==5.5.0
17+
certifi==2024.12.14
18+
cffi==1.17.1
19+
cfgv==3.4.0
20+
charset-normalizer==3.4.1
21+
click==8.1.8
22+
colorama==0.4.6 ; (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'win32') or (platform_system == 'Windows' and sys_platform != 'win32')
23+
colour-checker-detection==0.2.1
24+
colour-datasets==0.2.6
25+
colour-science==0.4.6
26+
comm==0.2.2
27+
contourpy==1.3.1
28+
coverage==7.6.10
29+
coveralls==4.0.1
30+
cryptography==44.0.0 ; platform_system != 'Darwin' and sys_platform == 'linux'
31+
cycler==0.12.1
32+
dash==2.18.2
33+
dash-bootstrap-components==1.6.0
34+
dash-core-components==2.0.0
35+
dash-html-components==2.0.0
36+
dash-renderer==1.9.1
37+
dash-table==5.0.0
38+
dash-uploader==0.6.1
39+
debugpy==1.8.11
40+
decorator==5.1.1
41+
defusedxml==0.7.1
42+
distlib==0.3.9
43+
docopt==0.6.2
44+
docutils==0.21.2
45+
editables==0.5
46+
exceptiongroup==1.2.2 ; python_full_version < '3.11'
47+
execnet==2.1.1
48+
executing==2.1.0
49+
fastjsonschema==2.21.1
50+
filelock==3.16.1
51+
flask==3.0.3
52+
fonttools==4.55.3
53+
fqdn==1.5.1
54+
gunicorn==23.0.0
55+
h11==0.14.0
56+
hatch==1.9.7
57+
hatchling==1.21.1
58+
httpcore==1.0.7
59+
httpx==0.28.1
60+
hyperlink==21.0.0
61+
identify==2.6.5
62+
idna==3.10
63+
imageio==2.36.1
64+
importlib-metadata==8.5.0
65+
iniconfig==2.0.0
66+
invoke==2.2.0
67+
ipykernel==6.29.5
68+
ipython==8.31.0
69+
ipywidgets==8.1.5
70+
isoduration==20.11.0
71+
itsdangerous==2.2.0
72+
jaraco-classes==3.4.0
73+
jaraco-context==6.0.1
74+
jaraco-functools==4.1.0
75+
jedi==0.19.2
76+
jeepney==0.8.0 ; platform_system != 'Darwin' and sys_platform == 'linux'
77+
jinja2==3.1.5
78+
json5==0.10.0
79+
jsonpickle==2.2.0
80+
jsonpointer==3.0.0
81+
jsonschema==4.23.0
82+
jsonschema-specifications==2024.10.1
83+
jupyter==1.1.1
84+
jupyter-client==8.6.3
85+
jupyter-console==6.6.3
86+
jupyter-core==5.7.2
87+
jupyter-events==0.11.0
88+
jupyter-lsp==2.2.5
89+
jupyter-server==2.13.0
90+
jupyter-server-terminals==0.5.3
91+
jupyterlab==4.3.4
92+
jupyterlab-pygments==0.3.0
93+
jupyterlab-server==2.27.3
94+
jupyterlab-widgets==3.0.13
95+
keyring==25.6.0
96+
kiwisolver==1.4.8
97+
markdown-it-py==3.0.0
98+
markupsafe==3.0.2
99+
matplotlib==3.10.0
100+
matplotlib-inline==0.1.7
101+
mdurl==0.1.2
102+
mistune==3.1.0
103+
more-itertools==10.5.0
104+
nbclient==0.10.2
105+
nbconvert==7.16.5
106+
nbformat==5.10.4
107+
nest-asyncio==1.6.0
108+
networkx==3.4.2
109+
nh3==0.2.20
110+
nodeenv==1.9.1
111+
notebook==7.3.2
112+
notebook-shim==0.2.4
113+
numpy==2.2.1
114+
opencv-python==4.10.0.84
115+
overrides==7.7.0
116+
packaging==21.3
117+
pandas==2.2.3
118+
pandocfilters==1.5.1
119+
parso==0.8.4
120+
pathspec==0.12.1
121+
pexpect==4.9.0
122+
pillow==11.1.0
123+
pkginfo==1.12.0
124+
platformdirs==4.3.6
125+
plotly==5.24.1
126+
pluggy==1.5.0
127+
pre-commit==4.0.1
128+
prometheus-client==0.21.1
129+
prompt-toolkit==3.0.48
130+
psutil==6.1.1
131+
ptyprocess==0.7.0
132+
pure-eval==0.2.3
133+
pycparser==2.22
134+
pygments==2.19.1
135+
pyparsing==3.2.1
136+
pyright==1.1.391
137+
pytest==8.3.4
138+
pytest-cov==6.0.0
139+
pytest-xdist==3.6.1
140+
python-dateutil==2.9.0.post0
141+
python-json-logger==3.2.1
142+
pytz==2024.2
143+
pywin32==308 ; platform_python_implementation != 'PyPy' and platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'win32'
144+
pywin32-ctypes==0.2.3 ; platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform == 'win32'
145+
pywinpty==2.0.14 ; os_name == 'nt' and platform_system != 'Darwin' and platform_system != 'Linux'
146+
pyyaml==6.0.2
147+
pyzmq==26.2.0
148+
readme-renderer==44.0
149+
referencing==0.35.1
150+
requests==2.32.3
151+
requests-toolbelt==1.0.0
152+
retrying==1.3.4
153+
rfc3339-validator==0.1.4
154+
rfc3986==2.0.0
155+
rfc3986-validator==0.1.1
156+
rich==13.9.4
157+
rpds-py==0.22.3
158+
scipy==1.15.1
159+
secretstorage==3.3.3 ; platform_system != 'Darwin' and sys_platform == 'linux'
160+
send2trash==1.8.3
161+
setuptools==75.8.0
162+
shellingham==1.5.4
163+
six==1.17.0
164+
sniffio==1.3.1
165+
soupsieve==2.6
166+
stack-data==0.6.3
167+
tenacity==9.0.0
168+
terminado==0.18.1
169+
tinycss2==1.4.0
170+
toml==0.10.2
171+
tomli==2.2.1 ; python_full_version <= '3.11'
172+
tomli-w==1.1.0
173+
tomlkit==0.13.2
174+
tornado==6.4.2
175+
tqdm==4.67.1
176+
traitlets==5.14.3
177+
trove-classifiers==2025.1.10.15
178+
twine==6.0.1
179+
types-python-dateutil==2.9.0.20241206
180+
typing-extensions==4.12.2
181+
tzdata==2024.2
182+
uri-template==1.3.0
183+
urllib3==2.3.0
184+
userpath==1.9.2
185+
virtualenv==20.25.3
186+
wcwidth==0.2.13
187+
webcolors==24.11.1
188+
webencodings==0.5.1
189+
websocket-client==1.8.0
190+
werkzeug==3.0.6
191+
widgetsnbextension==4.0.13
192+
xlrd==1.2.0
193+
xxhash==3.5.0
194+
zipp==3.21.0
195+
zstandard==0.23.0

tasks.py

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
==============
44
"""
55

6+
from __future__ import annotations
7+
68
import contextlib
79
import inspect
810
import platform
911

10-
from colour.hints import Boolean
1112
from colour.utilities import message_box
1213

1314
import app
@@ -33,6 +34,7 @@
3334
"precommit",
3435
"tests",
3536
"requirements",
37+
"build",
3638
"docker_build",
3739
"docker_remove",
3840
"docker_run",
@@ -49,10 +51,10 @@
4951
@task
5052
def clean(
5153
ctx: Context,
52-
docs: Boolean = True,
53-
bytecode: Boolean = False,
54-
mypy: Boolean = True,
55-
pytest: Boolean = True,
54+
docs: bool = True,
55+
bytecode: bool = False,
56+
mypy: bool = True,
57+
pytest: bool = True,
5658
) -> None:
5759
"""
5860
Clean the project.
@@ -135,11 +137,24 @@ def requirements(ctx: Context) -> None:
135137
"""
136138

137139
message_box('Exporting "requirements.txt" file...')
138-
ctx.run(
139-
"poetry export -f requirements.txt "
140-
"--without-hashes "
141-
"--output requirements.txt"
142-
)
140+
ctx.run('uv export --no-hashes --all-extras | grep -v "-e \\." > requirements.txt')
141+
142+
143+
@task(clean, precommit, tests, requirements)
144+
def build(ctx: Context) -> None:
145+
"""
146+
Build the project and runs dependency tasks, i.e., *docs*, *todo*, and
147+
*preflight*.
148+
149+
Parameters
150+
----------
151+
ctx
152+
Context.
153+
"""
154+
155+
message_box("Building...")
156+
ctx.run("uv build")
157+
ctx.run("twine check dist/*")
143158

144159

145160
@task(precommit, tests, requirements)

tests/test_application.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,16 @@ def test__str__(self) -> None:
6868
)
6969

7070
self.assertEqual(
71-
re.sub(r"0x\w+>", "0x...>", str(idt_application.project_settings)).strip(),
71+
"\n".join(
72+
[
73+
line.strip()
74+
for line in re.sub(
75+
r"0x\w+>", "0x...>", str(idt_application.project_settings)
76+
)
77+
.strip()
78+
.splitlines()
79+
]
80+
),
7281
"""
7382
<aces.idt.framework.project_settings.IDTProjectSettings object at 0x...>
7483
==============================================================================

0 commit comments

Comments
 (0)