Skip to content

Development - Contributing

Before diving into the code, here are some guidelines for contribution.

Installation

For any contribution (doc or code), pcmd must be installed globally.
This installation will be for working with cmd.yaml which has some useful commands for developement.

$ pip install pcmd
Now,
pcmd uses,

  • poetry - Build, package and publish the project
  • pytest - Build tests
  • flake8 - Code style guide
  • mypy - Type checking
  • coverage - Test coverage
  • pytest-cov - For coverage in pytest
  • mkdocs-material - Documentation

All these can be downloaded by,

$ pip install -r dev-requirements.txt
---> 100%
$ poetry install
---> 100%     

Developement

The cmd.yaml in the root directory has single-letter commands for each command in pcmd

$ pcmd run r # run command

$ pcmd run i # inspect command

$ pcmd list -p # check out the other commands too

Pre-Commit check

The cmd.yaml in the root directory has a command chain with the name check

$ pcmd run check

This will run

  • pytest tests
  • flake8 checks
  • mypy inspection (if specified)
  • code coverage (with the number of lines not covered).

Making things much easier!

Documentation

The cmd.yaml in the root directory has command named doc to test the documentation in the local server.

pcmd run doc

Conclusion

Do follow the gitmoji style of commit messages.

Do fork the repo and come up with crazy PRs!


Do 🌟 the repo if you like it!