Skip to content

Latest commit

 

History

History
108 lines (73 loc) · 2.2 KB

contributing.md

File metadata and controls

108 lines (73 loc) · 2.2 KB

Step 1. Fork this repository to your GitHub

Step 2. Clone the repository from your GitHub

git clone https://github.com/[YOUR GITHUB ACCOUNT]/markdown-mermaidjs.git

Step 3. Add this repository to the remote in your local repository

git remote add upstream "https://github.com/Lee-W/markdown-mermaidjs"

You can pull the latest code in main branch through git pull upstream main afterward.

Step 4. Check out a branch for your new feature

git checkout -b [YOUR FEATURE]

Step 5. Install prerequisite

python -m pip install pipx
python -m pipx install uv invoke
python -m pipx ensurepath
  • pipx: for python tool management
  • uv: for dependency management
  • invoke: for task management

Notes for Windows Developers

By default, the tasks leverage pty under the covers, which does not support Windows. Either run this via WSL or pass --no-pty to commands that demand it.

Step 6. Create your local Python virtual environment and install dependencies

inv env.init-dev

Step 7. Work on your new feature

Note that this project follows conventional-commit and bumps version based on it. Use the following command to commit your changes.

inv git.commit

or on Windows (currently throws an error when run outside of cmd.exe):

inv git.commit --no-pty

Step 8. Run test cases

Make sure all test cases pass.

inv test

or on Windows:

inv test --no-pty

Step 9. Run test coverage

Check the test coverage and see where you can add test cases.

inv test.cov

Step 10. Reformat source code

Format your code through ruff.

inv style.format

Step 11. Run style check

Make sure your coding style passes all enforced linters.

inv style

Step 12. Run security check

Ensure the packages installed are secure, and no server vulnerability is introduced

inv secure

or on Windows:

inv secure --no-pty

Step 13. Create a Pull Request and celebrate 🎉