-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTaskfile.yaml
45 lines (35 loc) · 2.17 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3'
tasks:
install:
cmds:
- POETRY_VIRTUALENVS_IN_PROJECT=true poetry install --no-cache --no-interaction
- poetry run pre-commit install
run: poetry run python3 {{.CLI_ARGS}}
run:example:all: poetry run jupyter nbconvert --to notebook --inplace --execute examples/*.ipynb
test: poetry run pytest -m "not todo" -n auto --benchmark-disable {{.CLI_ARGS}}
test:ci: poetry run pytest -m "not todo" -n auto --benchmark-disable --cov=fastrepl --cov-report xml:cov.xml --ignore=tests/integration
test:todo: poetry run pytest -m "todo" -n auto -v --benchmark-disable
test:bench: poetry run pytest --benchmark-only tests/benchmark
test:cov: poetry run pytest --benchmark-disable --cov=fastrepl --cov-report=term-missing -n auto {{.CLI_ARGS}}
todo: rg "TODO"
todo:ci: grep -r 'TODO!' ./fastrepl && exit 1 || exit 0
fmt: poetry run black fastrepl tests
lint: poetry run mypy fastrepl tests
clean: rm -f .local/*.gv .local/*.png
metric:add:
cmds:
- evaluate-cli create {{.CLI_ARGS}} --module_type "metric" --output_dir spaces --dataset_name=None --organization fastrepl
- sh scripts/space.sh {{.CLI_ARGS}}
- git submodule add https://huggingface.co/spaces/fastrepl/{{.CLI_ARGS}} spaces/{{.CLI_ARGS}}
add: poetry add {{.CLI_ARGS}}
add:dev: poetry add {{.CLI_ARGS}} --group dev
add:doc: poetry add {{.CLI_ARGS}} --group doc
sync: poetry lock --no-update && poetry install --sync
convert:nb2py: poetry run jupyter nbconvert --to python {{.CLI_ARGS}}
fix:setuptools: poetry run pip install --force-reinstall -U setuptools && poetry run pip install --force-reinstall -U pip
pre-publish: rm -rf dist && poetry config pypi-token.pypi $PYPI_API_KEY && poetry publish --no-cache --build --dry-run
publish: poetry publish
doc:install: poetry run pip install -r docs/requirements.txt
doc:build: rm -rf docs/_build && poetry run sphinx-build -b html docs docs/_build/html
doc:watch: rm -rf docs/_build && poetry run sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(git rev-parse --show-toplevel)/fastrepl/
doc:deploy: npx wrangler pages deploy docs/_build/html --commit-dirty --project-name fastrepl --branch main