|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Contributions are welcome, and they are greatly appreciated\! Every |
| 4 | +little bit helps, and credit will always be given. |
| 5 | + |
| 6 | +You can contribute in many ways: |
| 7 | + |
| 8 | +## Types of Contributions |
| 9 | + |
| 10 | +### Report Bugs |
| 11 | + |
| 12 | +Report bugs at |
| 13 | +<https://github.com/PaloAltoNetworks/cortex-data-lake-python/issues>. |
| 14 | + |
| 15 | +If you are reporting a bug, please include: |
| 16 | + |
| 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. |
| 21 | + |
| 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 | +
|
| 25 | +### Fix Bugs |
| 26 | + |
| 27 | +Look through the GitHub issues for bugs. Anything tagged with "bug" and |
| 28 | +"help wanted" is open to whoever wants to implement it. |
| 29 | + |
| 30 | +### Implement Features |
| 31 | + |
| 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 | + |
| 36 | +# Write Documentation |
| 37 | + |
| 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 | + |
| 42 | +More details can be found here: |
| 43 | +<https://cortex.pan.dev/docs/contributing> |
| 44 | + |
| 45 | +# Submit Feedback |
| 46 | + |
| 47 | +The best way to send feedback is to file an issue at |
| 48 | +<https://github.com/PaloAltoNetworks/cortex-data-lake-python/issues>. |
| 49 | + |
| 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 [email protected]: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 |
0 commit comments