@@ -11,12 +11,12 @@ We welcome pull requests from cmd2 users and seasoned Python developers alike! F
1111
1212Remember to feel free to ask for help by leaving a comment within the Issue.
1313
14- Working on your first pull request? You can learn how from the
14+ Working on your first pull request? You can learn how from the
1515[ GitHub Docs] ( https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request ) .
1616
1717###### If you've found a bug that is not on the board, [ follow these steps] ( ../README.md#found-a-bug ) .
1818
19- --------------------------------------------------------------------------------
19+ ---
2020
2121## Contribution guidelines
2222
@@ -64,22 +64,21 @@ The tables below list all prerequisites along with the minimum required version
6464
6565#### Additional prerequisites for developing cmd2
6666
67- | Prerequisite | Minimum Version | Purpose |
68- | ----------------------------------------------------------------------| -----------------| ----------------------------|
69- | [ codecov] ( http://doc.pytest.org/en/latest/ ) | ` 2.1.13 ` | Cover coverage reporting |
70- | [ doc8] ( https://github.com/PyCQA/doc8 ) | ` 1.1.2 ` | Sphinx style checker |
71- | [ invoke] ( https://www.pyinvoke.org/ ) | ` 2.2.0 ` | Command automation |
72- | [ mypy] ( https://mypy-lang.org/ ) | ` 1.13.0 ` | Static type checker |
73- | [ pytest] ( https://docs.pytest.org/en/stable/ ) | ` 3.0.6 ` | Unit and integration tests |
74- | [ pytest-cov] ( http://doc.pytest.org/en/latest/ ) | ` 6.0.0 ` | Pytest code coverage |
75- | [ pytest-mock] ( https://pypi.org/project/pytest-mock/ ) | ` 3.14.0 ` | Pytest mocker fixture |
76- | [ sphinx] ( https://www.sphinx-doc.org/en/master/ ) | ` 8.1.3 ` | Documentation |
77- | [ sphinx-autobuild] ( hhttps://pypi.org/project/sphinx-autobuild/ ) | ` 2024.10.3 ` | Rebuild docs on changes |
78- | [ sphinx-rtd-theme] ( https://github.com/readthedocs/sphinx_rtd_theme ) | ` 3.0.1 ` | Sphinx theme for RTD |
79- | [ ruff] ( https://github.com/astral-sh/ruff ) | ` 0.7.3 ` | Fast linter and formatter |
80- | [ uv] ( https://github.com/astral-sh/uv ) | ` 0.5.1 ` | Python package management |
81-
82-
67+ | Prerequisite | Minimum Version | Purpose |
68+ | ------------------------------------------------------------------------------------------ | --------------- | --------------------------------- |
69+ | [ codecov] ( http://doc.pytest.org/en/latest/ ) | ` 2.1.13 ` | Cover coverage reporting |
70+ | [ invoke] ( https://www.pyinvoke.org/ ) | ` 2.2.0 ` | Command automation |
71+ | [ griffe_typingdoc] ( https://github.com/mkdocstrings/griffe-typingdoc ) | ` 0.2.7 ` | mkdocstrings extension for typing |
72+ | [ mypy] ( https://mypy-lang.org/ ) | ` 1.13.0 ` | Static type checker |
73+ | [ pytest] ( https://docs.pytest.org/en/stable/ ) | ` 3.0.6 ` | Unit and integration tests |
74+ | [ pytest-cov] ( http://doc.pytest.org/en/latest/ ) | ` 6.0.0 ` | Pytest code coverage |
75+ | [ pytest-mock] ( https://pypi.org/project/pytest-mock/ ) | ` 3.14.0 ` | Pytest mocker fixture |
76+ | [ mkdocs-include-markdown-plugin] ( https://pypi.org/project/mkdocs-include-markdown-plugin/ ) | ` 7.1.2 ` | MkDocs Plugin include MkDn |
77+ | [ mkdocs-macros-plugin] ( https://mkdocs-macros-plugin.readthedocs.io/ ) | ` 1.3.7 ` | MkDocs Plugin for macros |
78+ | [ mkdocs-material] ( https://squidfunk.github.io/mkdocs-material/ ) | ` 9.5.49 ` | Documentation |
79+ | [ mkdocstrings[ python]] ( https://mkdocstrings.github.io/ ) | ` 0.27.0 ` | MkDocs Plugin for Python AutoDoc |
80+ | [ ruff] ( https://github.com/astral-sh/ruff ) | ` 0.7.3 ` | Fast linter and formatter |
81+ | [ uv] ( https://github.com/astral-sh/uv ) | ` 0.5.1 ` | Python package management |
8382
8483If Python is already installed in your machine, run the following commands to validate the versions:
8584
@@ -90,11 +89,12 @@ $ pip freeze | grep pyperclip
9089
9190If your versions are lower than the prerequisite versions, you should update.
9291
93- If you do not already have Python installed on your machine, we recommend using [ uv] ( https://github.com/astral-sh/uv )
92+ If you do not already have Python installed on your machine, we recommend using [ uv] ( https://github.com/astral-sh/uv )
9493for all of your Python needs because it is extremely fast, meets all Python installation and packaging needs, and works
95- on all platforms (Windows, Mac, and Linux). You can install ` uv ` using instructions at the link above.
94+ on all platforms (Windows, Mac, and Linux). You can install ` uv ` using instructions at the link above.
9695
9796You can then install multiple versions of Python using ` uv ` like so:
97+
9898``` sh
9999uv python install 3.9 3.10 3.11 3.12 3.13
100100```
@@ -148,31 +148,31 @@ Do this prior to every time you create a branch for a PR:
1481481 . Make sure you are on the ` master ` branch
149149
150150> ``` sh
151- > $ git status
152- > On branch master
153- > Your branch is up-to-date with ' origin/master' .
154- > ` ` `
151+ > $ git status
152+ > On branch master
153+ > Your branch is up-to-date with ' origin/master' .
154+ > ` ` `
155155
156156> If your aren' t on `master`, resolve outstanding files and commits and checkout the `master` branch
157157
158158> ```sh
159- > $ git checkout master
160- > ```
159+ > $ git checkout master
160+ > ```
161161
1621622. Do a pull with rebase against `upstream`
163163
164164> ```sh
165- > $ git pull --rebase upstream master
166- > ```
165+ > $ git pull --rebase upstream master
166+ > ```
167167
168168> This will pull down all of the changes to the official master branch, without making an additional commit in your
169169> local repo.
170170
1711713. (_Optional_) Force push your updated master branch to your GitHub fork
172172
173173> ```sh
174- > $ git push origin master --force
175- > ```
174+ > $ git push origin master --force
175+ > ```
176176
177177> This will overwrite the master branch of your fork.
178178
@@ -214,8 +214,8 @@ package from the source.
214214
215215` cmd2 ` has support for using [ uv] ( https://github.com/astral-sh/uv ) for development.
216216
217- ` uv ` is single tool to replace ` pip ` , ` pip-tools ` , ` pipx ` , ` poetry ` , ` pyenv ` , ` twine ` , ` virtualenv ` , and more. ` cmd2 `
218- contains configuration for using ` uv ` in it's ` pyproject.toml ` file which makes it extremely easy to setup a ` cmd2 `
217+ ` uv ` is single tool to replace ` pip ` , ` pip-tools ` , ` pipx ` , ` poetry ` , ` pyenv ` , ` twine ` , ` virtualenv ` , and more. ` cmd2 `
218+ contains configuration for using ` uv ` in it's ` pyproject.toml ` file which makes it extremely easy to setup a ` cmd2 `
219219development environment using ` uv ` .
220220
221221To create a virtual environment and install everything needed for ` cmd2 ` development using ` uv ` , do the following
@@ -239,6 +239,7 @@ uv run examples/basic.py
239239```
240240
241241Alternatively you can activate the virtual environment using the OS-specific command such as this on Linux or macOS:
242+
242243``` sh
243244source .venv/bin/activate
244245```
@@ -317,7 +318,7 @@ primarily related to continuous integration and release deployment.
317318#### Changes to the documentation files
318319
319320If you made changes to any file in the ` /docs ` directory, you need to build the
320- Sphinx documentation and make sure your changes look good:
321+ MkDocs documentation and make sure your changes look good:
321322
322323``` sh
323324$ uv inv docs
@@ -338,7 +339,7 @@ served (usually [http://localhost:8000](http://localhost:8000)).
338339### Code Quality Checks
339340
340341You should have some sort of [ PEP 8] ( https://www.python.org/dev/peps/pep-0008/ ) -based linting running in your editor or
341- IDE or at the command line before you commit code. ` cmd2 ` uses [ ruff] ( https://github.com/astral-sh/ruff ) as part of
342+ IDE or at the command line before you commit code. ` cmd2 ` uses [ ruff] ( https://github.com/astral-sh/ruff ) as part of
342343its continuous integration (CI) process for both linting and auto-formatting.
343344
344345> Please do not ignore any linting errors in code you write or modify, as they are meant to ** help** you and to ensure a
@@ -441,7 +442,7 @@ nothing to commit, working directory clean
441442 any outstanding files/commits and checkout master ` git checkout master `
442443
4434442 . Create a branch off of ` master ` with git: `git checkout -B
444- branch/name-here` ** Note:** Branch naming is important. Use a name like
445+ branch/name-here` ** Note:** Branch naming is important. Use a name like
445446 ` fix/short-fix-description ` or ` feature/short-feature-description ` . Review
446447 the [ Contribution Guidelines] ( #contribution-guidelines ) for more detail.
447448
@@ -450,7 +451,7 @@ nothing to commit, working directory clean
4504514 . Check your ` git status ` to see unstaged files
451452
4524535 . Add your edited files: ` git add path/to/filename.ext ` You can also do: `git
453- add .` to add all unstaged files. Take care, though, because you can
454+ add .` to add all unstaged files. Take care, though, because you can
454455 accidentally add files you don't want added. Review your ` git status ` first.
455456
4564576 . Commit your edits: ` git commit -m "Brief description of commit" ` . Do not add the issue number in the commit message.
@@ -483,17 +484,17 @@ how to do it.
4834844 . The title (also called the subject) of your PR should be descriptive of your
484485 changes and succinctly indicate what is being fixed
485486
486- - ** Do not add the issue number in the PR title or commit message**
487+ - ** Do not add the issue number in the PR title or commit message**
487488
488- - Examples: ` Add test cases for Unicode support ` ; ` Correct typo in overview documentation `
489+ - Examples: ` Add test cases for Unicode support ` ; ` Correct typo in overview documentation `
489490
4904915 . In the body of your PR include a more detailed summary of the changes you
491492 made and why
492493
493- - If the PR is meant to fix an existing bug/issue, then, at the end of
494- your PR's description, append the keyword ` closes ` and #xxxx (where xxxx
495- is the issue number). Example: ` closes #1337 ` . This tells GitHub to
496- close the existing issue if the PR is merged.
494+ - If the PR is meant to fix an existing bug/issue, then, at the end of
495+ your PR's description, append the keyword ` closes ` and #xxxx (where xxxx
496+ is the issue number). Example: ` closes #1337 ` . This tells GitHub to
497+ close the existing issue if the PR is merged.
497498
4984996 . Indicate what local testing you have done (e.g. what OS and version(s) of Python did you run the
499500 unit test suite with)
@@ -633,8 +634,8 @@ mostly automated. The manual steps are all git operations. Here's the checklist:
6336341 . Make sure all the unit tests pass with ` invoke pytest ` or ` py.test `
6346351 . Make sure latest year in ` LICENSE ` matches current year
6356361 . Make sure ` CHANGELOG.md ` describes the version and has the correct release date
636- 1 . Add a git tag representing the version number using `` invoke tag x.y.z ` `
637- * Where x, y, and z are all small non-negative integers
637+ 1 . Add a git tag representing the version number using ` invoke tag x.y.z `
638+ - Where x, y, and z are all small non-negative integers
6386391 . (Optional) Run ` invoke pypi-test ` to clean, build, and upload a new release to [ Test PyPi] ( https://test.pypi.org )
6396401 . Run ` invoke pypi ` to clean, build, and upload a new release to [ PyPi] ( https://pypi.org/ )
640641
0 commit comments