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

Commit 2686e8a

Browse files
authored
⚙️ Migrating to pyproject.toml and flit (#173)
* bump version and change description * add pyproject.toml * remove legacy package files * fix package description * adapt workflows to use flit * update documentation URL * fix project dependencies * fix requests dep * fix tinydb dep
1 parent 333bed6 commit 2686e8a

File tree

8 files changed

+68
-125
lines changed

8 files changed

+68
-125
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
17+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
1818

1919
steps:
2020
- uses: actions/checkout@v2
@@ -25,15 +25,13 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -r requirements_dev.txt
28+
pip install .[test]
2929
- name: Lint with flake8
3030
run: |
31-
pip install flake8
3231
# stop the build if there are Python syntax errors or undefined names
3332
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3433
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3534
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3635
- name: Test with pytest
3736
run: |
38-
pip install pytest
3937
pytest

.github/workflows/pythonpublish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ jobs:
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip
20-
pip install setuptools wheel twine
20+
pip install flit
2121
- name: Build and publish
2222
env:
23-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
24-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
23+
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
24+
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2525
run: |
26-
python setup.py sdist bdist_wheel
27-
twine upload dist/*
26+
flit publish

pan_cortex_data_lake/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3-
"""Main package for cortex."""
3+
"""Python idiomatic SDK for Cortex™ Data Lake."""
44

55
__author__ = "Palo Alto Networks"
6-
__version__ = "2.0.0-a14"
6+
__version__ = "2.0.0b1"
77

88
from .exceptions import ( # noqa: F401
99
CortexError,

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[build-system]
2+
requires = ["flit_core >=3.2,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "pan-cortex-data-lake"
7+
keywords = [
8+
"cortex",
9+
"data",
10+
"lake",
11+
"datalake",
12+
"sdk",
13+
"api",
14+
"palo alto networks",
15+
]
16+
authors = [
17+
{name = "Steven Serrata", email = "sserrata@paloaltonetworks.com"},
18+
]
19+
maintainers = [
20+
{name = "Steven Serrata", email = "sserrata@paloaltonetworks.com"},
21+
{name = "Developer Relations", email = "devrel@paloaltonetworks.com"},
22+
]
23+
readme = "README.md"
24+
classifiers = [
25+
"Development Status :: 4 - Beta",
26+
"Intended Audience :: Developers",
27+
"License :: OSI Approved :: ISC License (ISCL)",
28+
"Natural Language :: English",
29+
"Programming Language :: Python :: 3",
30+
"Programming Language :: Python :: 3.5",
31+
"Programming Language :: Python :: 3.6",
32+
"Programming Language :: Python :: 3.7",
33+
"Programming Language :: Python :: 3.8",
34+
"Programming Language :: Python :: 3.9",
35+
]
36+
license = {file = "LICENSE"}
37+
requires-python = ">=3.5"
38+
dynamic = ["version", "description"]
39+
dependencies = [
40+
"requests >=2",
41+
"tinydb >=3,<4"
42+
]
43+
44+
[project.optional-dependencies]
45+
test = [
46+
"pytest >=2.7.3",
47+
"pytest-cov",
48+
"flake8",
49+
"tox",
50+
"coverage",
51+
]
52+
53+
[project.urls]
54+
Home = "https://cortex.pan.dev"
55+
Source = "https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python"
56+
Documentation = "https://cortex.pan.dev/docs/develop/cdl_python_installation"
57+
58+
[tool.flit.module]
59+
name = "pan_cortex_data_lake"
60+

requirements.txt

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

requirements_dev.txt

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

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)