Follow installation instructions from the Just Programmer's Manual.
source <(just --completions bash)
just # shortcut for just --list
# macOS
brew install shellcheck
# Linux
sudo apt install shellcheckFollow installation instructions from the uv documentation for your OS.
Dependencies are managed with uv.
See the uv documentation for details on usage.
Commands for adding, removing or modifying constraints of dependencies will automatically respect the
global timestamp cutoff specified in the pyproject.toml:
[tool.uv]
exclude-newer = "YYYY-MM-DDTHH:MM:SSZ"Changes to dependencies should be made via uv commands, or by modifying pyproject.toml directly followed by
locking and syncing via uv or just commands like
just devenv or just upgrade-all. You should not modify uv.lock manually.
Note that uv.lock must be reproducible from pyproject.toml. Otherwise, just check will fail.
If just check errors saying that the timestamps must match, you might have modified one file but not the other:
- If you modified
pyproject.toml, you must updateuv.lockviauv lock/just upgrade-allor similar. - If you did not modify
pyproject.tomlbut have changes inuv.lock, you should revert the changes touv.lock, modifypyproject.tomlas you require, then runuv lockto updateuv.lock.
The timestamp cutoff should usually be set to midnight UTC of a past date. In general, the date is expected to be between 7 and 14 days ago as a result of automated weekly dependency updates.
If you require a package version that is newer than the cutoff allows, you can either manually bump the global cutoff date or add a package-specific timestamp cutoff. Both options are described below.
The cutoff timestamp can be modified to a more recent date either manually in the pyproject.toml
or with just bump-uv-cutoff <days-ago>.
For example, to set the cutoff to today's date and upgrade all dependencies, run:
just bump-uv-cutoff 0
just upgrade-all
It is possible to specify a package-specific timestamp cutoff in addition to the global cutoff.
This should be done in the pyproject.toml to ensure reproducible installs;
see the uv documentation for details.
If set, the package-specific cutoff will take precedence over the global cutoff regardless of which one is more recent.
You should not set a package-specific cutoff that is older than the global cutoff - use a version constraint instead. If there is good reason to set a package-specific cutoff that is more recent than the global cutoff, care should be taken to ensure that the package-specific cutoff is manually removed once it is over 7 days old, as otherwise future automated updates of that package will be indefinitely blocked. Currently no automated tooling is in place to enforce removal of stale package-specific cutoffs.
Set up a local development environment with:
just devenv
Set up your local .env file by running
./scripts/local-setup.sh
This will create a .env file by copying dotenv-sample, and will use the
Bitwarden CLI to retrieve relevant dev secrets and update environment variables and credentials.
By default, re-running the script will skip updating secrets from Bitwarden if they are already populated. To force them to update again:
./scripts/local-setup.sh -f
If you don't have the Bitwarden CLI already installed, the local-setup.sh
will prompt you to install it.
Join the test Slack workspace at bennetttest.slack.com.
The test slack bot's is already installed to this workspace. Its username is
bennett_test_bot and, when you are running the bot locally, you can
interact with it by using @Bennett Test Bot.
Alternatively, you can create your own new slack workspace to use for testing, and follow the instructions in the deployment docs to create a new test slack app, generate tokens
and install it to the workspace. You will need to update your .env file with
the relevant environment variables.
Run linter, formatter and shellcheck:
just check
Fix issues:
just fix
Run the tests with:
just test <args>
just run <service>
To run the slack bot and use it to run jobs, run both the bot and dispatcher:
just run bot
just run dispatcher
This builds the dev image by default:
just docker/build
just docker/check`
just docker/test
Run all 3 services (bot, dispatcher and webserver) in separate docker containers.
just docker/run-all
Restart all running services.
just docker/restart
Stop running service container:
just docker/stop-all
Stop running services and remove containers:
just docker/rm-all