Skip to content

Commit

Permalink
justfile: Tweak recipe names.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenisys committed Mar 20, 2022
1 parent 7e4f353 commit 8f43e80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ set dotenv-load
# CONFIG:
# -----------------------------------------------------------------------------
HERE := justfile_directory()
PYTEST_OPTIONS := env_var_or_default("PYTEST_OPTIONS", "")
PIP_INSTALL_OPTIONS := env_var_or_default("PIP_INSTALL_OPTIONS", "--quiet")
PYTEST_OPTIONS := env_var_or_default("PYTEST_OPTIONS", "")


# -----------------------------------------------------------------------------
# BUILD RECIPES / TARGETS:
# -----------------------------------------------------------------------------

# DEFAULT-TARGET: Ensure that packages are installed and runs tests.
default: (ensure-install-packages "testing") test
default: (_ensure-install-packages "testing") test

# PART=all, testing, ...
install-packages PART="all":
Expand All @@ -37,15 +37,15 @@ install-packages PART="all":
@touch "{{HERE}}/.done.install-packages.{{PART}}"

# ENSURE: Python packages are installed.
ensure-install-packages PART="all":
_ensure-install-packages PART="all":
#!/usr/bin/env python3
from subprocess import run
from os import path
if not path.exists("{{HERE}}/.done.install-packages.{{PART}}"):
run("just install-packages {{PART}}", shell=True)
# -- SIMILAR: This solution requires a Bourne-like shell (may not work on: Windows).
# ensure-install-packages PART="testing":
# _ensure-install-packages PART="testing":
# @test -e "{{HERE}}/.done.install-packages.{{PART}}" || just install-packages {{PART}}

# Run tests.
Expand All @@ -60,7 +60,7 @@ coverage:
coverage html

# Cleanup most parts (but leave PRECIOUS parts).
cleanup: (ensure-install-packages "all")
cleanup: (_ensure-install-packages "all")
invoke cleanup

# Cleanup everything.
Expand Down

0 comments on commit 8f43e80

Please sign in to comment.