### Installing Development Dependencies with Poetry Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst This command uses Poetry to install all project dependencies, including those required for development, setting up the environment for local work. ```Shell $ poetry install ``` -------------------------------- ### Installing Pre-Commit Hooks with Nox Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst This command uses Nox to install pre-commit hooks, which automatically run linting and code formatting checks before a Git commit, ensuring code quality standards are met. ```Shell $ nox --session=pre-commit -- install ``` -------------------------------- ### Installing Dependencies with Poetry (Shell) Source: https://github.com/sartography/spiffworkflow-backend/blob/main/README.rst This command uses Poetry to install all project dependencies. Poetry manages Python packages and virtual environments, ensuring all required libraries are available for the Spiffworkflow Backend. ```console $ poetry install ``` -------------------------------- ### Running Python Session and CLI with Poetry Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst These commands demonstrate how to execute an interactive Python session or the project's command-line interface using Poetry's `run` command, ensuring the correct virtual environment is used. ```Shell $ poetry run python $ poetry run spiffworkflow-backend ``` -------------------------------- ### Running Full Test Suite with Nox Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst This command executes the entire test suite for the project using Nox, a flexible automation tool, to ensure all tests pass. ```Shell $ nox ``` -------------------------------- ### Specifying Python Project Dependencies Source: https://github.com/sartography/spiffworkflow-backend/blob/main/docs/requirements.txt This snippet defines the exact versions of Python packages necessary for the project. These dependencies are typically managed using a `requirements.txt` file and installed via `pip install -r requirements.txt` to maintain environmental consistency across different setups. ```Python furo==2022.9.29 sphinx==5.3.0 sphinx-click==4.3.0 ``` -------------------------------- ### Running the Local Server (Shell) Source: https://github.com/sartography/spiffworkflow-backend/blob/main/README.rst This command starts the Spiffworkflow Backend server locally. It executes a script designed to launch the application for development or testing purposes on the local machine. ```console $ ./bin/run_server_locally ``` -------------------------------- ### Listing Available Nox Sessions Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst This command displays a list of all defined Nox sessions within the project, allowing contributors to see available testing or development tasks. ```Shell $ nox --list-sessions ``` -------------------------------- ### Running Specific Nox Session for Unit Tests Source: https://github.com/sartography/spiffworkflow-backend/blob/main/CONTRIBUTING.rst This command specifically invokes the 'tests' Nox session, typically used to run the unit test suite, providing a way to execute a subset of the full test suite. ```Shell $ nox --session=tests ``` -------------------------------- ### Setting Up MySQL Database (Shell) Source: https://github.com/sartography/spiffworkflow-backend/blob/main/README.rst This command executes a script to set up the project's database. It assumes a MySQL server is already running and performs a clean recreation of the database, preparing it for application use. ```console $ ./bin/recreate_db clean ``` -------------------------------- ### Generating Static File URL in Jinja2 Source: https://github.com/sartography/spiffworkflow-backend/blob/main/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html This Jinja2 expression uses the `url_for` function to dynamically generate a URL for a static file, specifically an image named 'logo_small.png' located in the 'openid.static' blueprint. This is common in Flask applications to ensure correct asset paths. ```Jinja2 {{ url_for('openid.static', filename='logo_small.png') }} ``` -------------------------------- ### Displaying Error Message in Jinja2 Template Source: https://github.com/sartography/spiffworkflow-backend/blob/main/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html This Jinja2 expression is used to display the value of the `error_message` variable. It's typically populated by the backend to provide feedback to the user, such as login failures, directly within the HTML template. ```Jinja2 {{error_message}} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.