Useful Scripts
This document provides an overview of commonly used scripts in the Gyrinx project.
Development Scripts
scripts/fmt.sh
scripts/fmt.shFormats all code in the project including Python, JavaScript, SCSS, and Django templates.
./scripts/fmt.shscripts/test.sh
scripts/test.shRuns the full test suite using Docker for database services.
./scripts/test.shscripts/check_migrations.sh
scripts/check_migrations.shChecks for any migration issues or conflicts.
./scripts/check_migrations.shDatabase Scripts
scripts/reset-migrations-to-main.sh
scripts/reset-migrations-to-main.shSafely resets Django migration state to match the main branch. Useful when switching between branches with different migration histories.
./scripts/reset-migrations-to-main.shQuality Assurance Scripts
scripts/fmt-check.sh
scripts/fmt-check.shChecks if code formatting is correct without making changes.
./scripts/fmt-check.shManagement Commands
These are Django management commands available through the manage command:
manage setupenv
manage setupenvSets up the development environment file (.env).
manage setupenvmanage ensuresuperuser
manage ensuresuperuserEnsures a superuser exists for development.
manage ensuresuperusermanage loaddata_overwrite
manage loaddata_overwriteLoads Django fixtures with overwrite capability.
manage loaddata_overwrite <fixture_name>Last updated