Skip to content

Commit d07f51a

Browse files
committed
Ensure that project can be built.
1 parent f5f4577 commit d07f51a

File tree

2 files changed

+17
-51
lines changed

2 files changed

+17
-51
lines changed

TODO.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Colour - TODO
2+
=============
3+
4+
TODO
5+
----
6+
7+
8+
9+
About
10+
-----
11+
12+
| **Colour** by Colour Developers
13+
| Copyright 2024 Colour Developers - `[email protected] <[email protected]>`__
14+
| This software is released under terms of BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause
15+
| `https://github.com/colour-science/colour <https://github.com/colour-science/colour>`__

tasks.py

+2-51
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"PYPI_PACKAGE_NAME",
4343
"PYPI_ARCHIVE_NAME",
4444
"BIBLIOGRAPHY_NAME",
45-
"literalise",
4645
"clean",
4746
"formatting",
4847
"quality",
@@ -66,7 +65,7 @@
6665

6766
PYTHON_PACKAGE_NAME: str = colour_clf_io.__name__
6867

69-
PYPI_PACKAGE_NAME: str = "colour-science-clf-io"
68+
PYPI_PACKAGE_NAME: str = "colour-clf-io"
7069
PYPI_ARCHIVE_NAME: str = PYPI_PACKAGE_NAME.replace("-", "_")
7170

7271
BIBLIOGRAPHY_NAME: str = "BIBLIOGRAPHY.bib"
@@ -151,24 +150,6 @@ def inner(text: str) -> str:
151150
print_callable("=" * width)
152151

153152

154-
@task
155-
def literalise(ctx: Context) -> None:
156-
"""
157-
Write various literals in the `colour.hints` module.
158-
159-
Parameters
160-
----------
161-
ctx
162-
Context.
163-
"""
164-
165-
message_box("Literalising...")
166-
with ctx.cd("utilities"):
167-
ctx.run("./literalise.py")
168-
169-
ctx.run("pre-commit run --files colour/hints/__init__.py", warn=True)
170-
171-
172153
@task
173154
def clean(
174155
ctx: Context,
@@ -432,7 +413,7 @@ def requirements(ctx: Context) -> None:
432413
)
433414

434415

435-
@task(literalise, clean, preflight, docs, todo, requirements)
416+
@task(clean, preflight, docs, todo, requirements)
436417
def build(ctx: Context) -> None:
437418
"""
438419
Build the project and runs dependency tasks, i.e., *docs*, *todo*, and
@@ -445,34 +426,7 @@ def build(ctx: Context) -> None:
445426
"""
446427

447428
message_box("Building...")
448-
if "modified: README.rst" in ctx.run("git status").stdout: # pyright: ignore
449-
msg = 'Please commit your changes to the "README.rst" file!'
450-
raise RuntimeError(msg)
451-
452-
with open("README.rst") as readme_file:
453-
readme_content = readme_file.read()
454-
455-
with open("README.rst", "w") as readme_file:
456-
# Adding the *Colour* logo as the first content line because the *raw*
457-
# directive to support light and dark theme is later trimmed.
458-
readme_content = (
459-
".. image:: https://raw.githubusercontent.com/colour-science/"
460-
"colour-branding/master/images/Colour_Logo_001.png\n" + readme_content
461-
)
462-
readme_file.write(
463-
re.sub(
464-
(
465-
"(\\.\\. begin-trim-long-description.*?"
466-
"\\.\\. end-trim-long-description)"
467-
),
468-
"",
469-
readme_content,
470-
flags=re.DOTALL,
471-
)
472-
)
473-
474429
ctx.run("uv build")
475-
ctx.run("git checkout -- README.rst")
476430
ctx.run("twine check dist/*")
477431

478432

@@ -495,9 +449,6 @@ def virtualise(ctx: Context, tests: bool = True) -> None:
495449
ctx.run(f"mv {PYPI_ARCHIVE_NAME}-{APPLICATION_VERSION} {unique_name}")
496450
with ctx.cd(unique_name):
497451
ctx.run("uv sync --all-extras --no-dev")
498-
ctx.run(
499-
'uv run python -c "import imageio;imageio.plugins.freeimage.download()"'
500-
)
501452
if tests:
502453
ctx.run(
503454
"source .venv/bin/activate && "

0 commit comments

Comments
 (0)