-
Notifications
You must be signed in to change notification settings - Fork 133
Create CONTRIBUTING.md #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8449f79
Create CONTRIBUTING.md
jshcodes 645f26c
Create pull_request_template.md
jshcodes 8ed9184
Create requirements-dev.txt
jshcodes d761225
Update CONTRIBUTING.md
jshcodes 167bc1c
Update pull_request_template.md
jshcodes d395d92
Update CONTRIBUTING.md
jshcodes e9e7faa
Update requirements-dev.txt
jshcodes b1fe015
Update .github/pull_request_template.md
jshcodes 66a2b7a
Update .github/pull_request_template.md
jshcodes 7e9e88e
Update .github/pull_request_template.md
jshcodes 6cd8fc2
Update .github/pull_request_template.md
jshcodes f1e6825
Update CONTRIBUTING.md
jshcodes 2707824
Update CONTRIBUTING.md
jshcodes 42a2661
Update CONTRIBUTING.md
jshcodes 5724449
Typo fix - CONTRIBUTING.md
jshcodes f8927f9
Update CONTRIBUTING.md
jshcodes 543470e
Update pull_request_template.md
jshcodes 871b784
Update pull_request_template.md
jshcodes 64a8f42
Update pull_request_template.md
jshcodes ec2bf25
Update pull_request_template.md
jshcodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,38 @@ | ||
> Please review our [Code of Conduct](https://github.com/CrowdStrike/falconpy/CODE_OF_CONDUCT.md) | ||
> and our [Contribution Guidelines](https://github.com/CrowdStrike/falconpy/CONTRIBUTING.md) before submitting a Pull Request. | ||
> REMOVE ALL PULL REQUEST HINTS BEFORE SUBMITTING | ||
## PULL REQUEST TITLE | ||
Pull Request general description should go here. | ||
> Please fill out all values and then remove any help text before submitting your PR. | ||
> Refer to [this PR](https://github.com/CrowdStrike/falconpy/pull/67) as a reference example! | ||
- [ ] Enhancement | ||
- [ ] Major Feature update | ||
- [ ] Bug fixes | ||
- [ ] Breaking Change | ||
- [ ] Updated unit tests | ||
- [ ] Documentation | ||
|
||
> Check the values above that match your PR and remove the remaining. | ||
```shell | ||
COVERAGE RESULTS SHOULD BE POSTED HERE | ||
PLEASE REVIEW CONTRIBUTING.md FOR MORE | ||
DETAILS ON GENERATING COVERAGE RESULTS | ||
``` | ||
|
||
## Added features and functionality | ||
+ If your PR adds features or functionality, what should be included in the next release notes? | ||
|
||
## Issues resolved | ||
+ Bug fix: Please list related bugs individually. Identifying the ticket or bug report in the PR description auto-updates the affected ticket and helps the community with ticket triage. For example: | ||
|
||
* Fixes https://github.com/CrowdStrike/falconpy/issues/1234 by doing foo | ||
* Mitigates https://github.com/CrowdStrike/falconpy/issues/5678 by updating bar. | ||
+ BE EXPLICIT in what you are resolving | ||
|
||
## Other | ||
+ List any other details here | ||
+ Documentation regarding your changes can also be listed here |
This file contains hidden or 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 @@ | ||
# Contributing to this repository <!-- omit in toc --> | ||
|
||
## Getting started <!-- omit in toc --> | ||
_Welcome!_ We're excited you want to take part in the FalconPy community! | ||
|
||
Please review this document for details regarding getting started with your first contribution, packages you'll need to install as a developer, and our pull request process. If you have any questions, please let us know by | ||
posting your question in the [discussion board](https://github.com/CrowdStrike/falconpy/discussions). | ||
|
||
### Before you begin | ||
- Have you read the [Code of Conduct](CODE_OF_CONDUCT.md)? The Code of Conduct helps us establish community norms and how they'll be enforced. | ||
|
||
### Table of Contents | ||
- [How you can contribute](#how-you-can-contribute) | ||
- [Pull Requests](#pull-requests) | ||
- [Suggestions](#suggestions) | ||
|
||
## How you can contribute | ||
- See something? Say something! Submit a [bug report](https://github.com/CrowdStrike/falconpy/issues) to let the community know what you've experienced or found. Bonus points if you suggest possible fixes or what you feel may resolve the issue. For example: "_Attempted to use the XZY API class but it errored out. Could a more descriptive error code be returned?_" | ||
- Join the [discussion board](https://github.com/CrowdStrike/falconpy/discussions) where you can: | ||
- [Interact](https://github.com/CrowdStrike/falconpy/discussions/categories/general) with other members of the community | ||
- Suggest [new functionality](https://github.com/CrowdStrike/falconpy/discussions/categories/ideas) | ||
- Provide [feedback](https://github.com/CrowdStrike/falconpy/discussions/categories/q-a) | ||
- [Show others](https://github.com/CrowdStrike/falconpy/discussions/categories/show-and-tell) how you are using FalconPy today | ||
- Submit a [Pull Request](#pull-requests) | ||
|
||
### Bug reporting is handled using GitHub's issues | ||
We use GitHub issues to track bugs. Report a bug by opening a [new issue](https://github.com/CrowdStrike/falconpy/issues). | ||
|
||
### GitHub's discussion board is used for questions, suggestions and feedback. | ||
We use GitHub's discussion board functionality to handling community discussions related to | ||
[questions](https://github.com/CrowdStrike/falconpy/discussions/categories/q-a), | ||
[feedback](https://github.com/CrowdStrike/falconpy/discussions/categories/general) | ||
or [functionality enhancements](https://github.com/CrowdStrike/falconpy/discussions/categories/ideas). | ||
|
||
## Pull Requests | ||
|
||
### All contributions will be submitted under the Unlicense license | ||
When you submit code changes, your submissions are understood to be under the same Unlicense [license](LICENSE) that covers the project. | ||
If this is a concern, contact the maintainers before contributing. | ||
|
||
### Additional contributor package requirements | ||
`requirements-dev.txt` contains Python modules required for unit test development and for accessing the integrated debugger within FalconShell. Review this file's contents and install missing requirements as needed. | ||
|
||
### Unit testing & Code coverage | ||
+ All submitted code must also have an associated unit test that tests __all__ code paths within this new segment. (:100: percent coverage) | ||
- If the code submission is already covered by an existing unit test, additional unit tests are not required. | ||
- Please include coverage testing results in your Pull Request. (Example: [PR #67](https://github.com/CrowdStrike/falconpy/pull/67)) | ||
+ Unit testing is intended to prove out code formatting and functionality, not necessarily API functionality. Unit testing does not need to communicate with the API in order to provide the necessary coverage. | ||
+ All new contributions __must__ pass unit testing before they will be merged. | ||
- For scenarios where unit testing passes in the PR and fails post-merge, a maintainer will address the issue. If the problem is programmatic and related to code within the pull request, the merge may be reverted. | ||
+ The util folder contains BASH scripts for triggering unit tests that match unit testing performed as part of our GitHub workflows. | ||
|
||
#### Posting coverage results to Pull Requests | ||
Our Pull Request template provides an area for you to post the coverage results from your local unit tests. This table is generated by the command `coverage report` and is executed when you use the "run-tests.sh" BASH script found in the util folder. This table is output only when all unit tests have passed successfully, and is a required element for Pull Request approval. | ||
|
||
##### Example coverage results | ||
```shell | ||
Name Stmts Miss Cover | ||
--------------------------------------------------------------- | ||
src/falconpy/__init__.py 10 0 100% | ||
src/falconpy/_endpoint.py 1 0 100% | ||
src/falconpy/_result.py 8 0 100% | ||
src/falconpy/_service_class.py 31 0 100% | ||
src/falconpy/_util.py 80 0 100% | ||
src/falconpy/_version.py 8 0 100% | ||
src/falconpy/api_complete.py 77 0 100% | ||
src/falconpy/cloud_connect_aws.py 66 0 100% | ||
src/falconpy/cspm_registration.py 114 0 100% | ||
src/falconpy/detects.py 34 0 100% | ||
src/falconpy/device_control_policies.py 67 0 100% | ||
src/falconpy/event_streams.py 15 0 100% | ||
src/falconpy/falconx_sandbox.py 78 0 100% | ||
src/falconpy/firewall_management.py 130 0 100% | ||
src/falconpy/firewall_policies.py 68 0 100% | ||
src/falconpy/host_group.py 61 0 100% | ||
src/falconpy/hosts.py 37 0 100% | ||
src/falconpy/incidents.py 39 0 100% | ||
src/falconpy/intel.py 89 0 100% | ||
src/falconpy/iocs.py 58 0 100% | ||
src/falconpy/oauth2.py 30 0 100% | ||
src/falconpy/prevention_policy.py 67 0 100% | ||
src/falconpy/real_time_response.py 135 0 100% | ||
src/falconpy/real_time_response_admin.py 82 0 100% | ||
src/falconpy/sensor_update_policy.py 103 0 100% | ||
src/falconpy/spotlight_vulnerabilities.py 15 0 100% | ||
src/falconpy/user_management.py 75 0 100% | ||
--------------------------------------------------------------- | ||
TOTAL 1578 0 100% | ||
``` | ||
|
||
#### More details regarding PyTest and Coverage | ||
For more information regarding PyTest, and how we leverage it to perform unit testing, refer to the [PyTest documentation](https://docs.pytest.org/en/stable/contents.html#toc). | ||
|
||
To find out more above Coverage, review their [website](https://coverage.readthedocs.io/en/coverage-5.5/). | ||
|
||
### Linting | ||
All submitted code must meet minimum linting requirements. We use `flake8` for linting. Refer to the "lint.sh" script within the util folder to review our standard linting parameters. | ||
|
||
More information about flake8 can be found [here](https://flake8.pycqa.org/en/latest/). | ||
|
||
### Branch targeting | ||
_Please do not target the `main` branch with your Pull Request unless directed to do so by a maintainer_. Instead, target your PR at the most recent development branch. | ||
|
||
We use [SemVer](https://semver.org/) as our versioning scheme. (Example branch name: _ver_0.4.3_) | ||
|
||
If you are unable to identify the current development branch, please reach out to the maintainers or post a message to the general discussion board. | ||
|
||
### Pull Request template | ||
Please use the pull request template provided, making sure the following details are included in your request: | ||
+ Is this a breaking change? | ||
+ Are all new or changed code paths covered by unit testing? | ||
+ A complete listing of issues addressed or closed with this change. | ||
+ A complete listing of any enhancements provided by this change. | ||
+ Any usage details developers may need to make use of this new functionality. | ||
- Does additional documentation need to be developed beyond what is listed in your pull request? | ||
+ Any other salient points of interest. | ||
|
||
### Approval / Merging | ||
All Pull Requests must be approved by at least one maintainer. Once approved, a maintainer will perform the merge and execute any backend | ||
processes related to package deployment. At this time, contributors _do not_ have the ability to merge to the `main` branch. | ||
|
||
## Suggestions | ||
If you have suggestions on how this process could be improved, please let us know by [starting a new discussion](https://github.com/CrowdStrike/falconpy/discussions). |
This file contains hidden or 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,18 @@ | ||
# | ||
# This file is autogenerated by pip-compile | ||
# To update, run: | ||
# | ||
# pip-compile requirements-dev.in | ||
# | ||
# These packages are not necessary in order to | ||
# communicate with the CrowdStrike Falcon OAuth2 API. | ||
# | ||
# These packages are only required if you intend | ||
# on using FalconShell, or are a contributor and are | ||
# developing unit tests for the project. | ||
jshcodes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# | ||
coverage>=5.5 # via -r requirements-dev.in | ||
flake8>=3.9.0 # via -r requirements-dev.in | ||
ipython>=7.21.0 # via -r requirements-dev.in | ||
pytest-cov>=2.11.1 # via -r requirements-dev.in | ||
pytest>=6.2.2 # via -r requirements-dev.in |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.