Development Workflow#
Development Features#
Hot Reload#
Application code is mounted into the container. Changes to Python files automatically reload the application - no rebuild required.
Test Data#
The development environment includes sample microscopy data (~149MB extracted):
Preview images at
https://files.nexuslims-dev.localhost/data/Instrument data at
https://files.nexuslims-dev.localhost/instrument-data/Example XML records in the database
The test data contains only zero-data so it is highly compressible, meaning the preview images will appear to be all black or blank. This is expected.
Test data is automatically extracted by
dev-upand is gitignored.
Local HTTPS#
Caddy uses a local CA for HTTPS. Follow the certificate instructions in development setup to trust it in your browser.
Direct Database Access#
For debugging, PostgreSQL and Redis are exposed on host ports:
PostgreSQL:
localhost:5532Redis:
localhost:6479
Development Commands#
Load commands with source dev-commands.sh from the deployment/ directory.
Lifecycle#
Command |
Description |
|---|---|
|
Start all services (includes test data setup) |
|
Stop all services |
|
Restart CDCS application |
|
Stop and remove all data (clean slate) |
Viewing Logs#
Command |
Description |
|---|---|
|
View all service logs |
|
CDCS application logs only |
|
Caddy proxy logs |
Shell Access#
Command |
Description |
|---|---|
|
Bash shell in CDCS container |
|
Django Python shell |
|
PostgreSQL shell |
Database#
Command |
Description |
|---|---|
|
Run Django migrations |
|
Create new migrations |
NexusLIMS-Specific#
Command |
Description |
|---|---|
|
Update both XSLT stylesheets in database |
|
Update only detail_stylesheet.xsl |
|
Update only list_stylesheet.xsl |
Dependency Management#
The project uses UV for fast, reliable Python dependency management with lockfiles for reproducibility.
Command |
Description |
|---|---|
|
Regenerate |
|
Upgrade all dependencies (respecting version constraints) |
|
Sync local environment with lockfile (for local dev outside Docker) |
|
Show usage for adding new dependencies |
Note
After adding or updating dependencies, rebuild the Docker image with dev-build-clean to apply changes.
Key Files:
pyproject.toml- Single source of truth for all dependenciesuv.lock- Lockfile ensuring reproducible builds (must be committed).python-version- Required Python version (3.13)
The main dependencies include the application, CDCS packages, and production
servers. The dev group contains testing tools, and the docs group contains
the documentation build tools.
For detailed dependency workflows, see the repository’s CLAUDE.md and deployment/README.md.