-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(DRAFT): migrate
hatch
scripts to hybrid tasks.py
runner
Provides 2 interfaces: - `tasks.py`: to define using decorators - `tasks.toml`: an example of defining in a similar way to `hatch` scripts #3577 (comment)
- Loading branch information
1 parent
ddc8358
commit 6ebc0ee
Showing
5 changed files
with
695 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[tool.altair.tasks] | ||
lint = ["ruff check"] | ||
format = ["ruff format --diff --check"] | ||
ruff-fix = ["ruff check", "ruff format"] | ||
type-check = ["mypy altair tests"] | ||
pytest = [ | ||
"pytest -p no:randomly -n logical --doctest-modules tests altair tools", | ||
] | ||
test = ["lint", "format", "type-check", "pytest"] | ||
test-fast = [ | ||
"ruff-fix", | ||
"pytest -p no:randomly -n logical --doctest-modules tests altair tools -m \"not slow\"", | ||
] | ||
test-slow = [ | ||
"ruff-fix", | ||
"pytest -p no:randomly -n logical --doctest-modules tests altair tools -m \"slow\"", | ||
] | ||
generate-schema-wrapper = [ | ||
"mypy tools", | ||
"python tools/generate_schema_wrapper.py", | ||
"test", | ||
] | ||
update-init-file = ["python tools/update_init_file.py", "ruff-fix"] | ||
clean = [ | ||
"python -c \"import shutil;shutil.rmtree('doc/_build', ignore_errors=True)\"", | ||
] | ||
clean-generated = [ | ||
"python -c \"import shutil;shutil.rmtree('doc/user_guide/generated', ignore_errors=True)\"", | ||
"python -c \"import shutil;shutil.rmtree('doc/gallery', ignore_errors=True)\"", | ||
] | ||
clean-all = [ | ||
"clean", | ||
"clean-generated", | ||
"python -c \"import shutil;shutil.rmtree('doc/_images', ignore_errors=True)\"", | ||
] | ||
serve = [ | ||
"python -m http.server --bind \"127.0.0.1\" --directory doc/_build/html 8000", | ||
] | ||
publish = ["python tools/sync_website.py --no-commit"] | ||
|
||
[tool.altair.tasks.build-html] | ||
commands = [ | ||
"python -c \"from pathlib import Path;Path('doc/_images').mkdir(exist_ok=True)\"", | ||
"sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html", | ||
] | ||
extras = ["doc"] | ||
|
||
[tool.altair.tasks.clean-build] | ||
commands = ["clean-all", "build-html"] | ||
extras = ["doc"] | ||
|
||
[tool.altair.tasks.publish-clean-build] | ||
commands = ["clean-build", "publish"] | ||
extras = ["doc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.