This tool calculates values based on Cal-B/C workbooks. It also provides automation around filling out workbooks.
Note: All commands below should be run inside this directory.
This application requires uv
to be installed. This can be installed using asdf:
$ asdf plugin add uv
$ asdf install
Install dependencies using uv
:
$ uv install
Copy .env.example
to .env
, fill in the secret values in the .env
file:
$ cp .env.example .env
In one terminal tab, start the Tailwind build process:
$ uv run manage.py tailwind watch
In another terminal tab, set your Google Cloud project and login:
$ gcloud config set project cal-itp-data-infra-staging # you will want to unset this later with `gcloud config unset project`
$ gcloud auth application-default login --login-config=iac/login.json --quiet
Create the database, run migrations, and start the server:
$ uv run manage.py sqlcreate | psql
$ uv run manage.py migrate
$ uv run manage.py runserver
Now, visit the server at http://localhost:8000.
In order to run tests, you will need to ensure that Playwright is installed:
$ uv run playwright install
Now, run the tests:
$ uv run manage.py test
Note: you can run only the web application tests using:
$ uv run manage.py test tests/cal_bc
In order to access the admin site at http://localhost:8000/admin, you need to create a superuser for your DOT login:
$ uv run manage.py createsuperuser
Username (leave blank to use 'yourname'): [email protected]
Email address: [email protected]
Password: ********
Password (again): ********
Now, when you visit the admin site, you can log in with your DOT account as usual.
Note: if you forget to add your user before this point, the Azure Entra ID login package will automatically add a user and disallow access. You will need to either manually make your user a superuser or delete your user account.
This tool is licensed under the terms of the GNU Affero General Public License.