Skip to content

Contributing#

Contributions are welcome and greatly appreciated. These are the instructions you need to follow if you want to submit a pull request.

Code of Conduct#

Read and comply with this project's Code of Conduct.

Environment Setup#

  1. Install Python - if you have not already.
  2. Fork and git clone this repository run:

    cd companies-house-codegen # change directory to this repository
    
  3. (recommeded) Create and activate virtual environment

  4. Install package with dev extras (dependencies) by running pip install ".[dev]" or whatever equivalent your chosen package manager uses.

Coding style#

Before writting a single line of code, we recommed that you read and comply with this project's Coding Standards.

Code Quality#

Before committing you work you must perform the following code steps to ensure code quality.

  1. Change directory to root of this repository.
  2. Lint and format code using ruff.
    1. Run ruff check . to run lint check.
    2. If the check fails, try ruff check . --fix or ruff format . to reformat code, then run ruff check . again.
    3. If the check still fails, then you will have to make corrections mannually.
  3. Perform static analysis using mypy.
    1. Run mypy ..
    2. If mypy returns any errors you must correct them.

Note

If your pull request fails the mypy or ruff CI pipelines on Github then it may be rejected.