|
1 | | -# Contributing |
| 1 | +# How to contribute |
2 | 2 |
|
3 | | -Contributions are welcome, and they are greatly appreciated\! Every |
4 | | -little bit helps, and credit will always be given. |
| 3 | +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: |
5 | 4 |
|
6 | | -You can contribute in many ways: |
| 5 | +It's people like you that make security open source such a force in preventing |
| 6 | +successful cyber-attacks. Following these guidelines helps keep the project |
| 7 | +maintainable, easy to contribute to, and more secure. Thank you for taking the |
| 8 | +time to follow this guide. |
7 | 9 |
|
8 | | -## Types of Contributions |
| 10 | +## Where to start |
9 | 11 |
|
10 | | -### Report Bugs |
| 12 | +There are many ways to contribute. You can fix a bug, improve the documentation, |
| 13 | +submit bug reports and feature requests, or take a first shot at a feature you |
| 14 | +need for yourself. |
11 | 15 |
|
12 | | -Report bugs at |
13 | | -<https://github.com/PaloAltoNetworks/cortex-data-lake-python/issues>. |
| 16 | +Pull requests are necessary for all contributions of code or documentation. |
14 | 17 |
|
15 | | -If you are reporting a bug, please include: |
| 18 | +## New to open source? |
16 | 19 |
|
17 | | -- Your operating system name and version. |
18 | | -- Any details about your local setup that might be helpful in |
19 | | - troubleshooting. |
20 | | -- Detailed steps to reproduce the bug. |
| 20 | +If you're **new to open source** and not sure what a pull request is, welcome!! |
| 21 | +We're glad to have you! All of us once had a contribution to make and didn't |
| 22 | +know where to start. |
21 | 23 |
|
22 | | -> If you are reporting a bug specific to the Cortex Data Lake API, please |
23 | | -> contact Palo Alto Networks TAC to open a case. |
| 24 | +Even if you don't write code for your job, don't worry, the skills you learn |
| 25 | +during your first contribution to open source can be applied in so many ways, |
| 26 | +you'll wonder what you ever did before you had this knowledge. It's worth |
| 27 | +learning. |
24 | 28 |
|
25 | | -### Fix Bugs |
| 29 | +[Learn how to make a pull request](https://github.com/PaloAltoNetworks/.github/blob/master/Learn-GitHub.md#learn-how-to-make-a-pull-request) |
26 | 30 |
|
27 | | -Look through the GitHub issues for bugs. Anything tagged with "bug" and |
28 | | -"help wanted" is open to whoever wants to implement it. |
| 31 | +## Fixing a typo, or a one or two line fix |
29 | 32 |
|
30 | | -### Implement Features |
| 33 | +Many fixes require little effort or review, such as: |
31 | 34 |
|
32 | | -Look through the GitHub issues for features. Anything tagged with |
33 | | -"enhancement" and "help wanted" is open to whoever wants to implement |
34 | | -it. |
| 35 | +> - Spelling / grammar, typos, white space and formatting changes |
| 36 | +> - Comment clean up |
| 37 | +> - Change logging messages or debugging output |
35 | 38 |
|
36 | | -# Write Documentation |
| 39 | +These small changes can be made directly in GitHub if you like. |
37 | 40 |
|
38 | | -The Cortex Data Lake Python SDK could always use more documentation, |
39 | | -whether as part of the official docs, in docstrings, or even on the web |
40 | | -in blog posts, articles, and such. |
| 41 | +Click the pencil icon in GitHub above the file to edit the file directly in |
| 42 | +GitHub. This will automatically create a fork and pull request with the change. |
| 43 | +See: |
| 44 | +[Make a small change with a Pull Request](https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github/) |
41 | 45 |
|
42 | | -More details can be found here: |
43 | | -<https://cortex.pan.dev/docs/contributing> |
| 46 | +## Bug fixes and features |
44 | 47 |
|
45 | | -# Submit Feedback |
| 48 | +For something that is bigger than a one or two line fix, go through the process |
| 49 | +of making a fork and pull request yourself: |
46 | 50 |
|
47 | | -The best way to send feedback is to file an issue at |
48 | | -<https://github.com/PaloAltoNetworks/cortex-data-lake-python/issues>. |
| 51 | +> 1. Create your own fork of the code |
| 52 | +> 2. Clone the fork locally |
| 53 | +> 3. Make the changes in your local clone |
| 54 | +> 4. Push the changes from local to your fork |
| 55 | +> 5. Create a pull request to pull the changes from your fork back into the |
| 56 | +> upstream repository |
49 | 57 |
|
50 | | -If you are proposing a feature: |
51 | | - |
52 | | -- Explain in detail how it would work. |
53 | | -- Keep the scope as narrow as possible, to make it easier to |
54 | | - implement. |
55 | | -- Remember that this is a volunteer-driven project, and that |
56 | | - contributions are welcome :) |
57 | | - |
58 | | -## Get Started\! |
59 | | - |
60 | | -Ready to contribute? Here's how to set up `cortex-data-lake-python` for |
61 | | -local development. |
62 | | - |
63 | | -1. Fork the `cortex-data-lake-python` repo on GitHub. |
64 | | - |
65 | | -2. Clone your fork locally: |
66 | | - |
67 | | - $ git clone git@github.com:your_name_here/cortex-data-lake-python.git |
68 | | - |
69 | | -3. Install your local copy into a virtual environment. Assuming you have `venv` |
70 | | - installed, this is how you set up your fork for local development: |
71 | | - |
72 | | - $ python -m venv env |
73 | | - $ source env/bin/activate |
74 | | - $ pip install -r requirements_dev.txt |
75 | | - |
76 | | -4. Create a branch for local development: |
77 | | - |
78 | | - $ git checkout -b name-of-your-bugfix-or-feature |
79 | | - |
80 | | - Now you can make your changes locally. |
81 | | - |
82 | | -5. When you're done making changes, check that your changes pass flake8 |
83 | | - and the tests, including testing other Python versions with tox: |
84 | | - |
85 | | - $ flake8 cortex tests |
86 | | - $ python setup.py test or py.test |
87 | | - $ tox |
88 | | - |
89 | | -6. Commit your changes and push your branch to GitHub: |
90 | | - |
91 | | - $ git add . |
92 | | - $ git commit -m "Your detailed description of your changes." |
93 | | - $ git push origin name-of-your-bugfix-or-feature |
94 | | - |
95 | | -7. Submit a pull request through the GitHub website. |
96 | | - |
97 | | -## Pull Request Guidelines |
98 | | - |
99 | | -Before you submit a pull request, check that it meets these guidelines: |
100 | | - |
101 | | -1. The pull request should include tests. |
102 | | -2. If the pull request adds functionality, the docs should be updated. |
103 | | - Put your new functionality into a function with a docstring, and add |
104 | | - the feature to the list in README.rst. |
105 | | -3. The pull request should work for Python 2.7, 3.5 and 3.6, 3.8, and |
106 | | - for PyPy2 and PyPy3. |
107 | | - |
108 | | -## Tips |
109 | | - |
110 | | -To run a subset of tests: |
111 | | - |
112 | | - $ pytest tests.test_httpclient |
| 58 | +Please use clear commit messages so we can understand what each commit does. |
| 59 | +We'll review every PR and might offer feedback or request changes before |
| 60 | +merging. |
0 commit comments