Skip to content

Commit 2bf4197

Browse files
Create CONTRIBUTING.md (#92)
* Create CONTRIBUTING.md * Create pull_request_template.md * Create requirements-dev.txt * Update CONTRIBUTING.md * Update pull_request_template.md * Update CONTRIBUTING.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update requirements-dev.txt Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update .github/pull_request_template.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update .github/pull_request_template.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update .github/pull_request_template.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update .github/pull_request_template.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update CONTRIBUTING.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update CONTRIBUTING.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Update CONTRIBUTING.md Co-authored-by: Shawn Wells <shawn@shawndwells.io> * Typo fix - CONTRIBUTING.md * Update CONTRIBUTING.md * Update pull_request_template.md * Update pull_request_template.md * Update pull_request_template.md * Update pull_request_template.md Co-authored-by: Shawn Wells <shawn@shawndwells.io>
1 parent 8c4e4c9 commit 2bf4197

File tree

3 files changed

+179
-0
lines changed

3 files changed

+179
-0
lines changed

.github/pull_request_template.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
> Please review our [Code of Conduct](https://github.com/CrowdStrike/falconpy/CODE_OF_CONDUCT.md)
2+
> and our [Contribution Guidelines](https://github.com/CrowdStrike/falconpy/CONTRIBUTING.md) before submitting a Pull Request.
3+
4+
> REMOVE ALL PULL REQUEST HINTS BEFORE SUBMITTING
5+
6+
## PULL REQUEST TITLE
7+
Pull Request general description should go here.
8+
> Please fill out all values and then remove any help text before submitting your PR.
9+
> Refer to [this PR](https://github.com/CrowdStrike/falconpy/pull/67) as a reference example!
10+
11+
- [ ] Enhancement
12+
- [ ] Major Feature update
13+
- [ ] Bug fixes
14+
- [ ] Breaking Change
15+
- [ ] Updated unit tests
16+
- [ ] Documentation
17+
18+
> Check the values above that match your PR and remove the remaining.
19+
20+
```shell
21+
COVERAGE RESULTS SHOULD BE POSTED HERE
22+
PLEASE REVIEW CONTRIBUTING.md FOR MORE
23+
DETAILS ON GENERATING COVERAGE RESULTS
24+
```
25+
26+
## Added features and functionality
27+
+ If your PR adds features or functionality, what should be included in the next release notes?
28+
29+
## Issues resolved
30+
+ 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:
31+
32+
* Fixes https://github.com/CrowdStrike/falconpy/issues/1234 by doing foo
33+
* Mitigates https://github.com/CrowdStrike/falconpy/issues/5678 by updating bar.
34+
+ BE EXPLICIT in what you are resolving
35+
36+
## Other
37+
+ List any other details here
38+
+ Documentation regarding your changes can also be listed here

CONTRIBUTING.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Contributing to this repository <!-- omit in toc -->
2+
3+
## Getting started <!-- omit in toc -->
4+
_Welcome!_ We're excited you want to take part in the FalconPy community!
5+
6+
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
7+
posting your question in the [discussion board](https://github.com/CrowdStrike/falconpy/discussions).
8+
9+
### Before you begin
10+
- 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.
11+
12+
### Table of Contents
13+
- [How you can contribute](#how-you-can-contribute)
14+
- [Pull Requests](#pull-requests)
15+
- [Suggestions](#suggestions)
16+
17+
## How you can contribute
18+
- 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?_"
19+
- Join the [discussion board](https://github.com/CrowdStrike/falconpy/discussions) where you can:
20+
- [Interact](https://github.com/CrowdStrike/falconpy/discussions/categories/general) with other members of the community
21+
- Suggest [new functionality](https://github.com/CrowdStrike/falconpy/discussions/categories/ideas)
22+
- Provide [feedback](https://github.com/CrowdStrike/falconpy/discussions/categories/q-a)
23+
- [Show others](https://github.com/CrowdStrike/falconpy/discussions/categories/show-and-tell) how you are using FalconPy today
24+
- Submit a [Pull Request](#pull-requests)
25+
26+
### Bug reporting is handled using GitHub's issues
27+
We use GitHub issues to track bugs. Report a bug by opening a [new issue](https://github.com/CrowdStrike/falconpy/issues).
28+
29+
### GitHub's discussion board is used for questions, suggestions and feedback.
30+
We use GitHub's discussion board functionality to handling community discussions related to
31+
[questions](https://github.com/CrowdStrike/falconpy/discussions/categories/q-a),
32+
[feedback](https://github.com/CrowdStrike/falconpy/discussions/categories/general)
33+
or [functionality enhancements](https://github.com/CrowdStrike/falconpy/discussions/categories/ideas).
34+
35+
## Pull Requests
36+
37+
### All contributions will be submitted under the Unlicense license
38+
When you submit code changes, your submissions are understood to be under the same Unlicense [license](LICENSE) that covers the project.
39+
If this is a concern, contact the maintainers before contributing.
40+
41+
### Additional contributor package requirements
42+
`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.
43+
44+
### Unit testing & Code coverage
45+
+ All submitted code must also have an associated unit test that tests __all__ code paths within this new segment. (:100: percent coverage)
46+
- If the code submission is already covered by an existing unit test, additional unit tests are not required.
47+
- Please include coverage testing results in your Pull Request. (Example: [PR #67](https://github.com/CrowdStrike/falconpy/pull/67))
48+
+ 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.
49+
+ All new contributions __must__ pass unit testing before they will be merged.
50+
- 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.
51+
+ The util folder contains BASH scripts for triggering unit tests that match unit testing performed as part of our GitHub workflows.
52+
53+
#### Posting coverage results to Pull Requests
54+
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.
55+
56+
##### Example coverage results
57+
```shell
58+
Name Stmts Miss Cover
59+
---------------------------------------------------------------
60+
src/falconpy/__init__.py 10 0 100%
61+
src/falconpy/_endpoint.py 1 0 100%
62+
src/falconpy/_result.py 8 0 100%
63+
src/falconpy/_service_class.py 31 0 100%
64+
src/falconpy/_util.py 80 0 100%
65+
src/falconpy/_version.py 8 0 100%
66+
src/falconpy/api_complete.py 77 0 100%
67+
src/falconpy/cloud_connect_aws.py 66 0 100%
68+
src/falconpy/cspm_registration.py 114 0 100%
69+
src/falconpy/detects.py 34 0 100%
70+
src/falconpy/device_control_policies.py 67 0 100%
71+
src/falconpy/event_streams.py 15 0 100%
72+
src/falconpy/falconx_sandbox.py 78 0 100%
73+
src/falconpy/firewall_management.py 130 0 100%
74+
src/falconpy/firewall_policies.py 68 0 100%
75+
src/falconpy/host_group.py 61 0 100%
76+
src/falconpy/hosts.py 37 0 100%
77+
src/falconpy/incidents.py 39 0 100%
78+
src/falconpy/intel.py 89 0 100%
79+
src/falconpy/iocs.py 58 0 100%
80+
src/falconpy/oauth2.py 30 0 100%
81+
src/falconpy/prevention_policy.py 67 0 100%
82+
src/falconpy/real_time_response.py 135 0 100%
83+
src/falconpy/real_time_response_admin.py 82 0 100%
84+
src/falconpy/sensor_update_policy.py 103 0 100%
85+
src/falconpy/spotlight_vulnerabilities.py 15 0 100%
86+
src/falconpy/user_management.py 75 0 100%
87+
---------------------------------------------------------------
88+
TOTAL 1578 0 100%
89+
```
90+
91+
#### More details regarding PyTest and Coverage
92+
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).
93+
94+
To find out more above Coverage, review their [website](https://coverage.readthedocs.io/en/coverage-5.5/).
95+
96+
### Linting
97+
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.
98+
99+
More information about flake8 can be found [here](https://flake8.pycqa.org/en/latest/).
100+
101+
### Branch targeting
102+
_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.
103+
104+
We use [SemVer](https://semver.org/) as our versioning scheme. (Example branch name: _ver_0.4.3_)
105+
106+
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.
107+
108+
### Pull Request template
109+
Please use the pull request template provided, making sure the following details are included in your request:
110+
+ Is this a breaking change?
111+
+ Are all new or changed code paths covered by unit testing?
112+
+ A complete listing of issues addressed or closed with this change.
113+
+ A complete listing of any enhancements provided by this change.
114+
+ Any usage details developers may need to make use of this new functionality.
115+
- Does additional documentation need to be developed beyond what is listed in your pull request?
116+
+ Any other salient points of interest.
117+
118+
### Approval / Merging
119+
All Pull Requests must be approved by at least one maintainer. Once approved, a maintainer will perform the merge and execute any backend
120+
processes related to package deployment. At this time, contributors _do not_ have the ability to merge to the `main` branch.
121+
122+
## Suggestions
123+
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).

requirements-dev.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile requirements-dev.in
6+
#
7+
# These packages are not necessary in order to
8+
# communicate with the CrowdStrike Falcon OAuth2 API.
9+
#
10+
# These packages are only required if you intend
11+
# on using FalconShell, or are a contributor and are
12+
# developing unit tests for the project.
13+
#
14+
coverage>=5.5 # via -r requirements-dev.in
15+
flake8>=3.9.0 # via -r requirements-dev.in
16+
ipython>=7.21.0 # via -r requirements-dev.in
17+
pytest-cov>=2.11.1 # via -r requirements-dev.in
18+
pytest>=6.2.2 # via -r requirements-dev.in

0 commit comments

Comments
 (0)