-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!--- Provide a general summary of your changes in the title above --> <!--- Link the corresponding issues after you created the pull request --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have updated the [changelog](../CHANGELOG.md) accordingly. - [ ] I have added tests to cover my changes.
- Loading branch information
Showing
4 changed files
with
320 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
# How to contribute to Drägerwerk sdc11073 | ||
|
||
Welcome to our project. We are glad you want to improve this open source library. We at Dräger want to create technology | ||
for life and help to create a better future 🚀. | ||
|
||
If you provide Markdown documents, issues, pull request or discussions we strongly encourage you | ||
to [format your text](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) | ||
as it greatly helps to read and to understand your provided information. | ||
|
||
For this open source project | ||
the [Contributor License Agreement](https://github.com/Draegerwerk/sdc11073/blob/master/Contributor_License_Agreement.md) | ||
governs | ||
all relevant activities and your contributions. By contributing to the project you agree to be bound by this Agreement | ||
and to license your work accordingly. | ||
|
||
## How to set up the project for development | ||
|
||
- As we restricted pushing directly to one of sdc11073's branches, you have | ||
to [create a fork](https://github.com/Draegerwerk/sdc11073/fork) where you can push your changes before creating a | ||
pull request. | ||
- Install the package as an editable installation with `pip install -e ".[dev]"`. | ||
- Before making any commits, ensure | ||
you [sign your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). | ||
|
||
## Get support | ||
|
||
By following these guidelines, you help us to address your concerns more efficiently. | ||
|
||
### Create an issue | ||
|
||
If you encounter any problems or have suggestions for improvements, we encourage you to create | ||
an [issue](https://github.com/Draegerwerk/sdc11073/issues/new/choose). | ||
|
||
Here's how you can do it effectively: | ||
|
||
1. **Search Existing Issues**: Before creating a new issue, please search the existing issues to avoid duplicates. If | ||
you find an issue that addresses your problem or suggestion, feel free to add a comment to it. | ||
|
||
2. **Choose the Right Template**: When creating a new issue, select the template that best matches your situation. We | ||
have templates for bug reports and feature requests. | ||
|
||
3. **Provide Detailed Information**: Give a concise and informative title and fill out the rest of the form to your best | ||
knowledge. The more information you provide the better we can help you. | ||
|
||
4. **Submit the Issue**: Once you've filled out all the necessary information, submit the issue. | ||
|
||
### Create a discussion | ||
|
||
Engaging in discussions is a great way to ask questions, share ideas, or seek help with setting up `sdc11073`. Here's a | ||
step-by-step guide on how to create a discussion: | ||
|
||
1. **Navigate to the Discussions Tab**: Go to the main page of the `sdc11073` repository on GitHub. Click on the " | ||
Discussions" tab near the top of the page or | ||
follow [this link](https://github.com/Draegerwerk/sdc11073/discussions/new/choose) directly. | ||
|
||
2. **Choose a Category**: Select the appropriate category for your discussion. Categories might include Q&A, Ideas, | ||
General, etc., depending on what you want to discuss. | ||
|
||
3. **Title Your Discussion**: Enter a concise yet descriptive title for your discussion. This helps others understand at | ||
a glance what your discussion is about. | ||
|
||
4. **Write Your Message**: In the message body, provide detailed information about your question, idea, or the help | ||
you're seeking. Formatting tools and Markdown are available to structure your text. | ||
|
||
5. **Tag Your Discussion (Optional)**: You can add relevant labels to your discussion to make it easier for others to | ||
find and to categorize it better. | ||
|
||
6. **Review and Post**: Before posting, review your discussion to ensure it's clear and contains all necessary | ||
information. Once ready, click the "Post" button. | ||
|
||
By creating a discussion, you're contributing to the community around `sdc11073`. Engage respectfully and constructively | ||
to make the most out of the discussions. | ||
|
||
## Coding Standards / Style Guide | ||
|
||
This section outlines the coding standards and style guidelines for our project. Adhering to these guidelines ensures | ||
code readability, maintainability, and consistency across the project. It's crucial for all contributors to follow these | ||
practices to facilitate collaboration and code quality. | ||
|
||
### General Principles | ||
|
||
- **Readability**: Code should be written to be readable by humans. Clarity is preferred over cleverness. | ||
- **Consistency**: Follow the established patterns and practices in the project. | ||
- **Simplicity**: Strive for simplicity in your code. Avoid unnecessary complexity. | ||
|
||
### Formatting / Static Code Analysis | ||
|
||
- Use [ruff](https://docs.astral.sh/ruff/) to ensure your code adheres to our coding standards. | ||
- Use [mypy](http://mypy-lang.org/) for type checking. Ensure your code is typed and passes mypy checks. | ||
|
||
Checkout our [`pyproject.toml`](https://github.com/Draegerwerk/sdc11073/blob/master/pyproject.toml) for more details. | ||
|
||
### Naming Conventions | ||
|
||
- **Modules**: Use short, lowercase names. If necessary, use underscores to improve readability (e.g., `my_module`). | ||
- **Classes**: Use the CapWords convention (e.g., `MyClass`). | ||
- **Functions and Variables**: Use lowercase with words separated by underscores (e.g., `my_function`). | ||
- **Constants**: Use all uppercase with words separated by underscores (e.g., `MY_CONSTANT`). | ||
|
||
### Comments | ||
|
||
- Use inline comments sparingly and ensure they are relevant and add value. | ||
- Write docstrings for all public modules, functions, classes, and methods. Follow | ||
the [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) format. | ||
|
||
## Testing / Coverage | ||
|
||
We take testing seriously to ensure the reliability and stability of our project. Here's how you can contribute to | ||
testing: | ||
|
||
### Running Tests | ||
|
||
- To run the existing test suite, execute `pytest` at the root of the project. This will run all tests and display a | ||
report. | ||
- Ensure that all tests pass before submitting a pull request. | ||
|
||
### Writing Tests | ||
|
||
- When adding new features or fixing bugs, write tests that cover your changes. We strive for comprehensive test | ||
coverage to maintain code quality. | ||
- Follow our project's conventions for test structure and naming. Tests should be placed in the `tests` directory. | ||
- Use descriptive test function names that clearly state what is being tested. | ||
|
||
### Test Coverage | ||
|
||
- We aim for high test coverage but understand it's not always practical to achieve 100%. Focus on testing critical | ||
paths and complex logic. | ||
- After running tests, check the coverage report to ensure your changes are adequately covered. You can generate a | ||
coverage report by running `pytest --cov=src`. | ||
- We use [codecov](https://app.codecov.io/gh/Draegerwerk/sdc11073) to monitor test coverage. Ensure your pull request | ||
does not significantly decrease the project's overall coverage. | ||
|
||
By following these guidelines, you help ensure that our project remains stable, reliable, and easy to maintain. Thank | ||
you for contributing to our tests! | ||
|
||
## How to create a pull request | ||
|
||
Creating a pull request is a critical step in contributing to our project. Here's how to do it effectively: | ||
|
||
1. **Ensure Your Branch is Up-to-Date**: Before starting, make sure your branch is up-to-date with the branch you're | ||
planning to merge into. | ||
|
||
2. **Check Your Changes**: | ||
- Run tests with `pytest` to ensure all tests pass. | ||
- Use `ruff check /path/to/your/changes1 /path/to/your/changes2 ...` for static code analysis. | ||
- Apply `mypy /path/to/your/changes1 /path/to/your/changes2 ...` for type checking. | ||
|
||
3. **Commit Your Changes**: Commit your changes with clear, descriptive commit messages. | ||
|
||
4. **Push to Your Fork**: Push your changes to your fork of the repository. | ||
|
||
5. **Create the Pull Request**: | ||
- Navigate to the original repository you forked from. | ||
- Click on the "Pull requests" tab and then the "New pull request" button. | ||
- Choose your fork and the branch with your changes as the "compare" branch and the branch of our repository you | ||
want to merge into as the "base" branch. | ||
- Fill in the pull request form with a clear title and a detailed description of your changes. | ||
- If your pull request is related to an issue or discussion thread, reference it in the description or/and under | ||
the "Development" section. | ||
|
||
6. **Review and Adjust**: | ||
- After submitting, at least one of our maintainers has to review your pull request. Be open to feedback also from | ||
other contributors and ready to make adjustments as needed. | ||
- If requested, make further commits to your branch to address feedback. | ||
|
||
7. **Acceptance and Merge**: | ||
- Once your pull request is approved by a project maintainer and all CI checks pass, it will be merged. | ||
- Congratulations! You've successfully contributed to the project. | ||
|
||
## Acknowledgment | ||
|
||
We thank the following contributors for their valuable contributions to the project: | ||
|
||
- 2020-2024 Bernd Deichmann | ||
- 2023-2024 Leon Budnick | ||
|
||
If you want to be listed as a contributor, add your information in the following format: | ||
|
||
```markdown | ||
- <year(s) of contribution(s)> <your name> <optionally your email> | ||
``` | ||
|
||
If you have contributed in multiple years, you can define a range of years like `2020-2024` or single years | ||
like `2020-2022,2024`. Remember to update them with your first contribution in that year. | ||
|
||
**Thank you for contributing to our project!** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# **DRÄGER CONTRIBUTOR LICENSE** AGREEMENT | ||
|
||
At Dräger, we are keen on promoting Free and Open-Source Software (FOSS) — | ||
both for our own use and the use in the FOSS Community. For Us and for You to | ||
be certain what it means legally to contribute to one of our Projects, we are | ||
required to have this Agreement in place. It governs the way We are allowed to | ||
make use of your Contribution and the Project it is part of. | ||
|
||
This is a legally binding document, so please read it carefully before agreeing | ||
to it. | ||
|
||
Please note that by convention We capitalize the first letter of each word that | ||
is defined to have a specific meaning in this Agreement. | ||
|
||
By submitting Your Contribution to Us or to a Subsidiary of Us, You accept and | ||
agree to be bound to the following terms and conditions of this Agreement | ||
regarding Your Contribution. This Agreements becomes effective when we accept | ||
Your Contribution. Please note that We are under no obligation to use Your | ||
Contribution or to continue to use a Contribution in any of our Projects. | ||
Except for the license granted herein to Us and to the recipients of the | ||
open-source software made available by Us or by our Subsidiaries and/or | ||
Affiliates, You reserve all right, title, and interest in and to Your | ||
Contributions. | ||
|
||
## 1. Definitions | ||
|
||
"**Dräger**", "**Us**" or "**We**" means Drägerwerk AG & Co. KGaA or any of our | ||
Subsidiaries and/or Affiliates initiating or maintaining the open-source | ||
software project You intend to provide Your Contribution to. | ||
|
||
1.1 "**You**" (or "**Your**") shall mean the natural person or legal entity | ||
entering into this Agreement with Us. | ||
|
||
1.2 "**Copyright**" means all rights protecting works of authorship owned or | ||
controlled by You or Your Affiliates, for the full term of their existence. | ||
|
||
1.3 "**Affiliates**" means other legal entities that Control, are Controlled | ||
by, or under common Control (with) a legal entity. | ||
|
||
1.4 "**Subsidiaries**" means other legal entities that are controlled by a | ||
legal entity whereas control means (i) the power, direct or indirect, to cause | ||
the direction or management of such legal entity, whether by contract or | ||
otherwise, (ii) ownership of fifty percent (50%) or more of the outstanding | ||
shares or securities which vote to elect the management or other persons who | ||
direct such legal entity or (iii) beneficial ownership of such entity. | ||
|
||
1.5 "**Contribution**" means any original work of authorship, including any | ||
modifications or additions to an existing work, in which You own that copyright | ||
and that You Submit to Us for inclusion in the Project. | ||
|
||
"**Project**" means the work of authorship which is made available by Us to | ||
third parties which may or may not include Your Contribution. | ||
|
||
1.6 "**Submission Date**" means the date on which You Submit a Contribution to | ||
Us. | ||
|
||
"**Submit**" means any form of electronic, verbal, or written communication | ||
sent to Us, our Subsidiaries, Affiliates or our representatives, including but | ||
not limited to electronic mailing lists, source code management systems, and | ||
issue tracking systems that are managed by, or on behalf of, Us for the purpose | ||
of discussing and improving the Project. | ||
|
||
## 2. Grant of Copyright License. | ||
|
||
You hereby grant to Us a perpetual, | ||
worldwide, non-exclusive, no-charge, royalty-free, transferable, copyright | ||
license to use the Contribution by all means, including, but not limited to, | ||
reproduce, publish, modify, prepare derivative works of, publicly display, | ||
publicly perform, sublicense, and distribute Your Contributions and such | ||
derivative works. This includes all purposes, both commercial and | ||
non-commercial activities. | ||
|
||
## 3. Grant of Patent License. | ||
|
||
You hereby grant to Us and to the recipients of the Project a perpetual, | ||
worldwide, non-exclusive, no-charge, royalty-free, perpetual, transferable, | ||
patent license to make, have made, use, offer to sell, sell, import, and | ||
otherwise transfer the Project. This license applies to those patent claims | ||
licensable by You or by Your Affiliates that are necessarily infringed by Your | ||
Contribution(s) alone or by combination of Your Contribution(s) with the | ||
Project to which such Contribution(s) was submitted and covers both patens that | ||
are already acquired and those that are acquired hereafter. | ||
|
||
## 4. Our Right to Enforce Infringement Claims. | ||
|
||
You hereby authorize Us to assert claims in our name against third parties | ||
arising from the infringement of Your Copyrights vested in the Contribution. To | ||
the extent possible under applicable law, the right to assert claims applies to | ||
all of Your claims resulting from the infringement of Your Copyrights, | ||
including, without limitation, the right to demand the third party to cease and | ||
desist the infringing use, to demand information regarding the infringement and | ||
to destroy infringing products. You accept that We are under no obligation to | ||
assert such claims against third parties violating Your Copyrights. Your right | ||
to assert Your claims against third party infringers yourself remains | ||
unaffected. | ||
|
||
## 5. Representations | ||
|
||
You represent that You are legally entitled to grant the above licenses. You | ||
especially represent that each of Your Contributions is either Your original | ||
creation or, if You are a legal entity, the original creation of Your (or of | ||
Your Affiliates\') employees as part of their work for You (or for Your | ||
Affiliate), or, if neither You nor (if You are a legal entity) Your employees | ||
have created the Contribution as part of their work for You, that You are | ||
authorized to Submit the Contribution and to grant the licenses set out herein | ||
by the person or legal entity owning the rights to such Contribution. In case | ||
You have created the Contribution as an employee and You submit it, You | ||
represent that You are authorized by Your employer to submit the Contribution | ||
and to grant to Us the licenses set out herein. You represent that the use of | ||
Your Contribution is not subjected to any third-party license or other | ||
restriction (including, but not limited to, related patents and trademarks -- | ||
patents and trademarks only those of which you are aware of) that would | ||
restrict our ability to use Your Contribution as provided herein. You agree to | ||
notify Us of any facts or circumstances of which you become aware that would | ||
make these representations inaccurate in any respect. | ||
|
||
## 6. Limitation of liability | ||
|
||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR WE | ||
BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, | ||
INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT | ||
OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT | ||
OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters