If you have direnv installed, environment setup is automatic:
# One-time setup: allow direnv to load .envrc
$ direnv allow
# Environment will be automatically activated when entering the directory
# Dependencies will be synced automatically# Install dependencies (includes dev dependencies by default)
$ uv sync --extra-index-url https://apsis-scheduler.github.io/procstar/simple
# Or include documentation dependencies too
$ uv sync --extra-index-url https://apsis-scheduler.github.io/procstar/simple --group docs
# Activate the virtual environment
$ source .venv/bin/activateTo initialize an instance DB,
$ apsisctl create apsis.db
Create a config file, for example:
# Path to the state database.
database: apsis.db
# Path to the jobs directory.
job_dirs: jobs
# Lookback in secs for old runs.
# Currently, applied when loading runs from database at startup.
runs_lookback: 2592000 # 30 days
# Refuse to schedule runs older than this.
schedule_max_age: 86400 # 1 dayTo run the back end,
$ apsisctl serve -c config.yaml
This repo contains a copy of the prod front end, which you can use if you are not developing the front end itself.
The Vue front end was set up with the webpack vuejs template (an older version).
Currently requires node 14 (nvm use 14), until we update a bunch of stuff.
To run the front end in dev mode,
$ cd vue
$ npm install
$ npm run dev
To run js unit tests:
$ npm run unit
Front end e2e tests not set up.
To produce a prod front end,
$ cd vue
$ npm run build
then
$ git add --all .
$ git commit -m "Rebuild front end."
The Python back end service will serve the prod front end.
This project uses pre-commit hooks to automatically format code before commits.
Install the pre-commit hooks:
$ uv run pre-commit installOnce installed, the pre-commit hooks will run automatically on git commit. The hooks will:
- Format Python code using
ruff format - Only run on files that are being committed
To run the hooks manually on all files:
$ pre-commit run --all-filesTo run the hooks on specific files:
$ pre-commit run --files path/to/file.pyIf you need to bypass the pre-commit hooks (not recommended):
$ git commit --no-verify -m "commit message"With uv, install the docs dependency group:
$ uv sync --group docs
$ cd docs
$ make htmlRun Python tests (dev dependencies are included by default with uv sync):
$ pytest