Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

Commit 04f05c7

Browse files
authored
Additional repo cleanup (#174)
* cleanup tox.ini * udpate README * rename workflows * update contributing * add SUPPORT.md
1 parent fae1e38 commit 04f05c7

File tree

9 files changed

+94
-222
lines changed

9 files changed

+94
-222
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PyPI upload
1+
name: PyPI Publish
22

33
on:
44
release:

CONTRIBUTING.md

Lines changed: 42 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,60 @@
1-
# Contributing
1+
# How to contribute
22

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:
54

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.
79

8-
## Types of Contributions
10+
## Where to start
911

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.
1115

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.
1417

15-
If you are reporting a bug, please include:
18+
## New to open source?
1619

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.
2123

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.
2428

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)
2630

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
2932

30-
### Implement Features
33+
Many fixes require little effort or review, such as:
3134

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
3538
36-
# Write Documentation
39+
These small changes can be made directly in GitHub if you like.
3740

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/)
4145

42-
More details can be found here:
43-
<https://cortex.pan.dev/docs/contributing>
46+
## Bug fixes and features
4447

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:
4650

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
4957
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.

MANIFEST.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 76 deletions
This file was deleted.

README.md

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Tests](https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/workflows/Tests/badge.svg) ![PyPI upload](https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/workflows/PyPI%20upload/badge.svg?branch=master) [![PyPI version](https://badge.fury.io/py/pan-cortex-data-lake.svg)](https://badge.fury.io/py/pan-cortex-data-lake)
1+
![Tests](https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/workflows/Tests/badge.svg) ![PyPI upload](https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/workflows/PyPI%20upload/badge.svg?branch=master) ![![PyPI version](https://badge.fury.io/py/pan-cortex-data-lake.svg)](https://badge.fury.io/py/pan-cortex-data-lake)
22

33
# Palo Alto Networks Cortex™ Data Lake SDK
44

@@ -18,10 +18,11 @@ common tasks/operations.
1818

1919
- Log/event pagination
2020
- OAuth 2.0 and token refreshing
21-
- More, coming soon!
21+
22+
Resources:
2223

2324
- Documentation: <https://cortex.pan.dev>
24-
- Free software: ISC license
25+
- Free software: [ISC license](https://choosealicense.com/licenses/isc/)
2526

2627
---
2728

@@ -36,13 +37,27 @@ common tasks/operations.
3637

3738
## Status
3839

39-
The Palo Alto Networks Cortex™ Data Lake Python SDK is considered **alpha** at this time.
40+
The Palo Alto Networks Cortex™ Data Lake Python SDK is considered **beta** at this time.
4041

4142
## Installation
4243

4344
From PyPI:
4445

45-
$ pip install pan-cortex-data-lake
46+
```bash
47+
pip install pan-cortex-data-lake
48+
```
49+
50+
From source:
51+
52+
```bash
53+
pip install .
54+
```
55+
56+
To run tests:
57+
58+
```bash
59+
pip install .[test]
60+
```
4661

4762
## Obtaining and Using OAuth 2.0 Tokens
4863

@@ -51,22 +66,21 @@ If you're an app developer, work with your Developer Relations representative to
5166
# Example
5267

5368
```python
54-
>>> from pan_cortex_data_lake import Credentials, QueryService
55-
>>> c = Credentials()
56-
>>> qs = QueryService(credentials=c)
57-
>>> query_params = {
58-
... "query": "SELECT * FROM `1234567890.firewall.traffic` LIMIT 1",
59-
... }
60-
>>> q = qs.create_query(query_params=query_params)
61-
>>> q.status_code
62-
201
63-
>>> q.json()
64-
{'jobId': '40fedce6-ddf5-44cf-9af2-7c3d5303f388', 'uri': '/query/v2/jobs/40fedce6-ddf5-44cf-9af2-7c3d5303f388'}
65-
>>> results = qs.get_job_results(job_id='40fedce6-ddf5-44cf-9af2-7c3d5303f388')
66-
>>> results.json()
69+
from pan_cortex_data_lake import Credentials, QueryService
70+
71+
72+
c = Credentials()
73+
qs = QueryService(credentials=c)
74+
query_params = {
75+
"query": "SELECT * FROM `1234567890.firewall.traffic` LIMIT 1",
76+
}
77+
q = qs.create_query(query_params=query_params)
78+
results = qs.get_job_results(job_id=q.json()['jobId'])
79+
print(results.json())
6780
```
6881

6982
# Contributors
7083

71-
- Kevin Steves - [github](https://github.com/kevinsteves)
72-
- Steven Serrata - [github](https://github.com/sserrata)
84+
<a href="https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/graphs/contributors">
85+
<img src="https://contrib.rocks/image?repo=PaloAltoNetworks/pan-cortex-data-lake-python" />
86+
</a>

SUPPORT.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Community Supported
2+
3+
The software and templates in the repo are released under an as-is, best effort,
4+
support policy. This software should be seen as community supported and Palo
5+
Alto Networks will contribute our expertise as and when possible. We do not
6+
provide technical support or help in using or troubleshooting the components of
7+
the project through our normal support options such as Palo Alto Networks
8+
support teams, or ASC (Authorized Support Centers) partners and backline support
9+
options. The underlying product used (the VM-Series firewall) by the scripts or
10+
templates are still supported, but the support is only for the product
11+
functionality and not for help in deploying or using the template or script
12+
itself. Unless explicitly tagged, all projects or work posted in our GitHub
13+
repository (at https://github.com/PaloAltoNetworks) or sites other than our
14+
official Downloads page on https://support.paloaltonetworks.com are provided
15+
under the best effort policy.

tox.ini

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
[tox]
2-
envlist = py27, py35, py36, py37, py38, pypy, pypy3 flake8
2+
envlist = py35, py36, py37, py38, pypy3 flake8
33
skipsdist = True
44

5-
[travis]
6-
python =
7-
pypy3: pypy3
8-
pypy: pypy
9-
3.8: py38
10-
3.7: py37
11-
3.6: py36
12-
3.5: py35
13-
2.7: py27
14-
155
[testenv:flake8]
166
basepython=python
177
deps=flake8
@@ -20,17 +10,10 @@ commands=flake8 pan_cortex_data_lake
2010
[testenv]
2111
setenv =
2212
PYTHONPATH = {toxinidir}
23-
deps =
24-
-r{toxinidir}/requirements_dev.txt
25-
-r{toxinidir}/requirements.txt
2613
commands =
2714
pip install -U pip
15+
pip install .[test]
2816
py.test -v ./tests --basetemp={envtmpdir}
2917

3018
[flake8]
3119
ignore = E501, E402
32-
33-
; If you want to make tox run the tests with the same versions, create a
34-
; requirements.txt with the pinned versions and uncomment the following lines:
35-
; deps =
36-
; -r{toxinidir}/requirements.txt

0 commit comments

Comments
 (0)