Skip to content

Developers guide

Ahmed K.A. Abdullah edited this page Feb 26, 2021 · 1 revision

An overview of the different procedures for developers.

PR procedure:


In CPMpy we do follow the common practice of PR with feature changes or bug-fixing.
The common practice in naming branches should be: version_TASK_DESCRIPTION_nameOfDeveloper.
For more question please contact the development team.

Testing


The repository has a Workflow to execute tests when a PR is submitted. However, as a developer, you are also responsible for making sure that all the test cases are executed successfully as well as adding your own tests for the feature/bug under development. The format to write test should be like the following:

  • We use pytest for testing, so all test cases should be pytest compatible.
  • If a new file has to be added for new test cases, then the file should be created under the tests/ directory with the following format: test_MOFTBT.py.
    MOFTBT represents the Module Or Feature To Be Tested and should be a clear name following the main structure of the package.
  • Test cases naming should follow the following format: test_MethodName_StateUnderTest_ExpectedBehavior.
    For example, test_isAdult_AgeLessThan18_False():.
    This will help the package to maintain consistency across test-cases and building for the future possibility of a growing community.