Skip to content

Latest commit

 

History

History
124 lines (85 loc) · 5.08 KB

CONTRIBUTING.md

File metadata and controls

124 lines (85 loc) · 5.08 KB

Contributing

🚀 Contributing to and extending this project is always welcome.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

Issues and feature requests

You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by submitting an issue on GitHub. Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed!

Please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.
  • Specific. Include as much detail as possible: which version, what environment, etc.
  • Unique. Do not duplicate existing opened issues.
  • Scoped to a Single Bug. One bug per report.

Even better: Submit a pull request with a fix or new feature!


Development environment setup

You can use Windows, Linux or Mac based machines for developing.

To set up a development environment, please follow these steps:

  1. Install dependencies
  • install anaconda for your system
  • install git for your system
  • install pip
  1. Clone the repo

    git clone https://github.com/maxhoheiser/maxland
  2. Run installer script with dev flag

    python install.py --dev

    for further details, follow the install section in the README

  3. Set up your dev environment

    • install pre-commit hooks pre-commit install
    • use black for auto formatting
    • use pylint for linting

    You can use this settings for VS Code:

    "python.linting.pylintEnabled": true,
    "python.linting.pylintArgs": ["--enable=W0611"],
    "python.linting.enabled": true,
    "python.linting.pylintCategorySeverity.convention": "Hint",
    "python.linting.maxNumberOfProblems": 120,
    "python.linting.mypyEnabled": true,
    "python.languageServer": "Pylance",
    "python.formatting.provider": "black",
    "python.sortImports.args": ["--profile", "black"],
    "python.formatting.blackArgs": ["--line-length=140"],
    "python.linting.pydocstyleArgs": ["--ignore=D400", "--ignore=D4"],
    "[python]": {
       "editor.defaultFormatter": "ms-python.python",
       "editor.formatOnSave": true,
       "editor.codeActionsOnSave": {
          "source.organizeImports": true
       }
    },

  1. Writing code

    Please follow the code style guide outlined in the README!!


    Type hinting:

    • use : instead of ->
    • create new type definitions for custom data types where possible
    • try to type hint input arguments as much as possible
    • use Enum and typing Dict, List, Union

    Testing:

    • always write unittests for new features
    • try to extend the end-to-end hardware in the loop tests to cover your new functionality as complete as possible
    • always run all tests and fix broken ones

How to submit a Pull Request

  1. Search our repository for open or closed Pull Requests that relate to your submission. You don't want to duplicate effort.
  2. Fork the project
  3. Create your feature branch (git checkout -b feature/amazing_feature) - clone from master for stable branches
  4. Commit your changes (git commit -m 'feat: add amazing_feature') Traekka Behavior Platform uses conventional commits, so please follow the specification in your commit messages.
  5. Open a Pull Request using the PULL_REQUEST_TEMPLATE.
  • Don't forget to link PR to issue if you are solving one.
  • Add valid label to PR for allowed labels see LABELS

General:

  • Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, we will review your it. We may ask questions or request for additional information.
  • We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
  • As you update your PR and apply changes, mark each conversation as resolved.
  • If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.

Your PR is merged! - Congratulations 🎉🎉