Skip to content

RENCI/public-health-app

Repository files navigation

ACCIDDA

🚧 Development

  1. clone this repo & move into project dir
  2. install uv here (I recommend the standalone install script)
  3. create virtual environment and install deps, uv sync
  4. start dev server, uv run python app.py

You might need to manually reselect the python interpreter in your IDE. The python executable will be at ./.venv/bin/python by default.

$ uv run python app.py
Dash is running on http://127.0.0.1:8050/

 * Serving Flask app 'app'
 * Debug mode: on
  1. Ctrl/⌘ + D exits the virtual environment
  2. If using VSCode you can install the Ruff extension here. You can then set the following settings in VSCode to use it:
"[python]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "charliermarsh.ruff"
    "editor.codeActionsOnSave": { 
        "source.organizeImports": "explicit"
    }
},

If not using VSCode, you can use the ruff linter and formatter with the following commands

ruff check      # linting
ruff format .   # formatting

As a convenience, you can use the make target make ruff to do both simultaneously.

🧾 PDF Generation

We use Weasyprint for generating PDFs.

WeasyPrint depends on a few system libraries for handling layout, fonts, and CSS rendering. They are installed into the production build, and must be installed locally for PDF generation to function in your local development environment. See the Weasyprint installation instructions for bootstrapping your system

📦 Production

A Makefile exists to make building for production and deployment simpler. Use make help to see a list of available targets.

$ make help

Help Commands
• help                  📖 Show help

General Commands
• lint                  🤔 Run linter
• format                ℹ︎ Run formatter
• ruff                  🔀 Run linter and formatter
• test                  🧪 Run tests

Docker Commands
• build                 🛠️ Build Docker image
• run                   ▶️ Run Docker container
• stop                  🛑 Stop the running container
• push                  📤 Push the Docker image
• publish               📤 Build and push the Docker image

Helm Commands
• pod-up                🚀 Install or upgrade Helm release
• pod-down              💣 Uninstall Helm release

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •