### Install and Activate Poetry Environment Source: https://github.com/dynnammo/python_mermaid/blob/main/examples/README.md Installs project dependencies using Poetry and activates the virtual environment for running Python scripts. This is a prerequisite for executing the diagram generation examples. ```shell poetry install poetry shell ``` -------------------------------- ### Run Framasoft Diagram Example Source: https://github.com/dynnammo/python_mermaid/blob/main/examples/README.md Executes the Python script to generate the Framasoft diagram. This example showcases the use of subgraphs and click interactions within the generated diagram. ```python python ./examples/framasoft.py ``` -------------------------------- ### Clone Project and Install Dependencies Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md A comprehensive command to clone the project repository, install Poetry, and then install project dependencies using Poetry. This sets up the development environment. ```shell curl -sSL https://install.python-poetry.org | python3 - git clone https://github.com/Dynnammo/python_mermaid cd python_mermaid poetry shell poetry install --with dev ``` -------------------------------- ### Run March Family Diagram Example Source: https://github.com/dynnammo/python_mermaid/blob/main/examples/README.md Executes the Python script to generate the March Family diagram. This example demonstrates basic relations between normal nodes, visualizing family structures. ```python python ./examples/the_march_family.py ``` -------------------------------- ### Install Poetry Dependency Manager Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Provides the command to install Poetry, a Python dependency management and packaging tool, using a shell script. This is often a prerequisite for development. ```shell curl -sSL https://install.python-poetry.org | python3 - ``` -------------------------------- ### Install python_mermaid Package Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Installs the python_mermaid library using pip. This is the primary method for users to add the module to their Python environment. ```shell pip install python_mermaid ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Installs pre-commit hooks for the project, which automatically run checks like linting and formatting before each commit. This helps maintain code quality. ```shell pre-commit install ``` -------------------------------- ### Check Code Linting with Ruff Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Performs code linting using Ruff to check for style guide violations and potential errors. This ensures code quality and consistency. ```shell poetry run ruff check . ``` -------------------------------- ### Check Code Linting with Flake8 Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Executes code linting using Flake8 to enforce Python style guides and detect programming errors. This is another quality check for the codebase. ```shell poetry run flake8 ``` -------------------------------- ### Create Flowchart Diagram with Python Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Demonstrates generating a simple flowchart diagram using the python_mermaid library. It involves defining nodes and links, then printing the Mermaid syntax. ```python # Creating a simple flowchart diagram from python_mermaid.diagram import ( MermaidDiagram, Node, Link ) # Family members meg = Node("Meg") jo = Node("Jo") beth = Node("Beth") amy = Node("Amy") robert = Node("Robert March") the_march_family = [meg, jo, beth, amy, robert] # Create links family_links = [ Link(robert, meg), Link(robert, jo), Link(robert, beth), Link(robert, amy), ] chart = MermaidDiagram( title="Little Women", nodes=the_march_family, links=family_links ) print(chart) ``` -------------------------------- ### Run Project Tests Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Executes the project's automated tests using Poetry and pytest. This command is used to verify the functionality and stability of the codebase. ```shell poetry run pytest ``` -------------------------------- ### Check Code Typing with Mypy Source: https://github.com/dynnammo/python_mermaid/blob/main/README.md Runs static type checking on the project's Python code using Mypy. This helps catch type-related errors before runtime. ```shell poetry run mypy python_mermaid ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.