-
Notifications
You must be signed in to change notification settings - Fork 36
/
justfile
68 lines (52 loc) · 1.6 KB
/
justfile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# uncomment for windows
set shell := ["powershell.exe", "-c"]
# docs: justfile docs: https://just.systems/man/en/
default:
just --list --unsorted
# Clean environment
[confirm]
clean:
rm -rf .venv/
# Update dependencies in pyproject.toml
poetry-update:
poetry update
# Install development dependencies
install-dev:
poetry env use 3.11
poetry config virtualenvs.in-project true
poetry install
# Install R dependencies
install-r:
Rscript -e "install.packages(c('broom', 'clubSandwich', 'did2s', 'fixest', 'wildrwolf', 'reticulate'), repos='https://cran.rstudio.com'); install.packages('ritest', repos = c('https://grantmcdermott.r-universe.dev', 'https://cloud.r-project.org')); install.packages('ivDiag', repos='http://cran.us.r-project.org')"
# Create R test data sets
update-tests-data:
poetry run Rscript tests/r_test_comparisons.R
# Run pytest
tests:
poetry run pytest -n 4 --cov-report=term tests
tests-plots:
poetry run pytest -m "plots" -n 4 --cov-report=term tests
rerun-tests:
poetry run pytest --lf -n 4
# Build the package
build: tests
poetry build
# Build documentation and website
docs-build:
poetry run quartodoc build --verbose --config docs/_quarto.yml
# Render documentation and website
render: docs-build
poetry run quarto render docs
# Build the documentation and watch for changes
docs-watch:
poetry run poetry run quartodoc build --watch --verbose --config docs/_quarto.yml
# Preview the docs
preview:
poetry run quarto preview docs
# Clean docs build
docs-clean:
rm -rf docs/_build docs/api/api_card
lint:
poetry run pre-commit run ruff --all-files
debug:
python pyfixest/debug.py