DeWitt Gibson commited on
Commit
982cc8a
·
unverified ·
2 Parent(s): 91c937296352dd

Merge pull request #93 from dewitt4/label-fix

Browse files
Files changed (3) hide show
  1. .github/workflows/docker-publish.yml +1 -1
  2. pyproject.toml +25 -6
  3. setup.py +50 -13
.github/workflows/docker-publish.yml CHANGED
@@ -88,7 +88,7 @@ jobs:
88
  if: github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch'
89
  uses: aquasecurity/trivy-action@master
90
  with:
91
- image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ fromJSON(steps.meta.outputs.json).tags[0] }}
92
  format: 'sarif'
93
  output: 'trivy-image-results.sarif'
94
  severity: 'CRITICAL,HIGH'
 
88
  if: github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch'
89
  uses: aquasecurity/trivy-action@master
90
  with:
91
+ image-ref: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
92
  format: 'sarif'
93
  output: 'trivy-image-results.sarif'
94
  severity: 'CRITICAL,HIGH'
pyproject.toml CHANGED
@@ -10,6 +10,7 @@ authors = [{name = "dewitt4"}]
10
  license = {file = "LICENSE"}
11
  readme = "README.md"
12
  requires-python = ">=3.8"
 
13
  classifiers = [
14
  "Development Status :: 4 - Beta",
15
  "Intended Audience :: Developers",
@@ -17,6 +18,11 @@ classifiers = [
17
  "Programming Language :: Python :: 3",
18
  "Programming Language :: Python :: 3.8",
19
  "Programming Language :: Python :: 3.9",
 
 
 
 
 
20
  ]
21
 
22
  dependencies = [
@@ -25,15 +31,12 @@ dependencies = [
25
  "pyyaml>=6.0.1",
26
  "psutil>=5.9.0",
27
  "python-json-logger>=2.0.7",
28
- "dataclasses>=0.6",
29
  "typing-extensions>=4.5.0",
30
  "pyjwt>=2.8.0",
31
  "cryptography>=41.0.0",
32
- "fastapi>=0.100.0",
33
- "streamlit>=1.24.0",
34
- "plotly>=5.15.0",
35
- "pandas>=2.0.0",
36
- "numpy>=1.24.0"
37
  ]
38
 
39
  [project.optional-dependencies]
@@ -51,6 +54,16 @@ test = [
51
  "pytest-cov>=4.1.0",
52
  "pytest-mock>=3.11.1"
53
  ]
 
 
 
 
 
 
 
 
 
 
54
 
55
  [project.urls]
56
  Homepage = "https://github.com/dewitt4/LLMGuardian"
@@ -58,9 +71,15 @@ Documentation = "https://llmguardian.readthedocs.io"
58
  Repository = "https://github.com/dewitt4/LLMGuardian.git"
59
  Issues = "https://github.com/dewitt4/LLMGuardian/issues"
60
 
 
 
 
61
  [tool.setuptools]
62
  package-dir = {"" = "src"}
63
 
 
 
 
64
  [tool.black]
65
  line-length = 88
66
  target-version = ['py38']
 
10
  license = {file = "LICENSE"}
11
  readme = "README.md"
12
  requires-python = ">=3.8"
13
+ dynamic = ["keywords", "scripts"]
14
  classifiers = [
15
  "Development Status :: 4 - Beta",
16
  "Intended Audience :: Developers",
 
18
  "Programming Language :: Python :: 3",
19
  "Programming Language :: Python :: 3.8",
20
  "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Topic :: Security",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ "Operating System :: OS Independent",
26
  ]
27
 
28
  dependencies = [
 
31
  "pyyaml>=6.0.1",
32
  "psutil>=5.9.0",
33
  "python-json-logger>=2.0.7",
 
34
  "typing-extensions>=4.5.0",
35
  "pyjwt>=2.8.0",
36
  "cryptography>=41.0.0",
37
+ "requests>=2.31.0",
38
+ "prometheus-client>=0.17.0",
39
+ "statsd>=4.0.1",
 
 
40
  ]
41
 
42
  [project.optional-dependencies]
 
54
  "pytest-cov>=4.1.0",
55
  "pytest-mock>=3.11.1"
56
  ]
57
+ dashboard = [
58
+ "streamlit>=1.24.0",
59
+ "plotly>=5.15.0",
60
+ "pandas>=2.0.0",
61
+ "numpy>=1.24.0"
62
+ ]
63
+ api = [
64
+ "fastapi>=0.100.0",
65
+ "uvicorn>=0.23.0"
66
+ ]
67
 
68
  [project.urls]
69
  Homepage = "https://github.com/dewitt4/LLMGuardian"
 
71
  Repository = "https://github.com/dewitt4/LLMGuardian.git"
72
  Issues = "https://github.com/dewitt4/LLMGuardian/issues"
73
 
74
+ [project.scripts]
75
+ llmguardian = "llmguardian.cli.main:cli"
76
+
77
  [tool.setuptools]
78
  package-dir = {"" = "src"}
79
 
80
+ [tool.setuptools.packages.find]
81
+ where = ["src"]
82
+
83
  [tool.black]
84
  line-length = 88
85
  target-version = ['py38']
setup.py CHANGED
@@ -6,12 +6,6 @@ from setuptools import setup, find_packages
6
  from pathlib import Path
7
  import re
8
 
9
- # Read the content of requirements files
10
- def read_requirements(filename):
11
- with open(Path("requirements") / filename) as f:
12
- return [line.strip() for line in f
13
- if line.strip() and not line.startswith(('#', '-r'))]
14
-
15
  # Read the version from __init__.py
16
  def get_version():
17
  init_file = Path("src/llmguardian/__init__.py").read_text()
@@ -23,6 +17,49 @@ def get_version():
23
  # Read the long description from README.md
24
  long_description = Path("README.md").read_text(encoding="utf-8")
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  setup(
27
  name="llmguardian",
28
  version=get_version(),
@@ -51,18 +88,21 @@ setup(
51
  "Operating System :: OS Independent",
52
  "Environment :: Console",
53
  ],
54
- keywords="llm, security, ai, machine-learning, prompt-injection, cybersecurity",
55
  package_dir={"": "src"},
56
  packages=find_packages(where="src"),
57
  python_requires=">=3.8",
58
 
59
  # Core dependencies
60
- install_requires=read_requirements("base.txt"),
61
 
62
  # Optional/extra dependencies
63
  extras_require={
64
- "dev": read_requirements("dev.txt"),
65
- "test": read_requirements("test.txt"),
 
 
 
66
  },
67
 
68
  # Entry points for CLI
@@ -84,7 +124,4 @@ setup(
84
  # Additional metadata
85
  platforms=["any"],
86
  zip_safe=False,
87
-
88
- # Testing
89
- test_suite="tests",
90
  )
 
6
  from pathlib import Path
7
  import re
8
 
 
 
 
 
 
 
9
  # Read the version from __init__.py
10
  def get_version():
11
  init_file = Path("src/llmguardian/__init__.py").read_text()
 
17
  # Read the long description from README.md
18
  long_description = Path("README.md").read_text(encoding="utf-8")
19
 
20
+ # Core dependencies - defined in pyproject.toml but listed here for setup.py compatibility
21
+ CORE_DEPS = [
22
+ "click>=8.1.0",
23
+ "rich>=13.0.0",
24
+ "pyyaml>=6.0.1",
25
+ "psutil>=5.9.0",
26
+ "python-json-logger>=2.0.7",
27
+ "typing-extensions>=4.5.0",
28
+ "pyjwt>=2.8.0",
29
+ "cryptography>=41.0.0",
30
+ "requests>=2.31.0",
31
+ "prometheus-client>=0.17.0",
32
+ "statsd>=4.0.1",
33
+ ]
34
+
35
+ DEV_DEPS = [
36
+ "pytest>=7.4.0",
37
+ "pytest-cov>=4.1.0",
38
+ "pytest-mock>=3.11.1",
39
+ "black>=23.9.1",
40
+ "flake8>=6.1.0",
41
+ "mypy>=1.5.1",
42
+ "isort>=5.12.0",
43
+ ]
44
+
45
+ TEST_DEPS = [
46
+ "pytest>=7.4.0",
47
+ "pytest-cov>=4.1.0",
48
+ "pytest-mock>=3.11.1",
49
+ ]
50
+
51
+ DASHBOARD_DEPS = [
52
+ "streamlit>=1.24.0",
53
+ "plotly>=5.15.0",
54
+ "pandas>=2.0.0",
55
+ "numpy>=1.24.0",
56
+ ]
57
+
58
+ API_DEPS = [
59
+ "fastapi>=0.100.0",
60
+ "uvicorn>=0.23.0",
61
+ ]
62
+
63
  setup(
64
  name="llmguardian",
65
  version=get_version(),
 
88
  "Operating System :: OS Independent",
89
  "Environment :: Console",
90
  ],
91
+ keywords=["llm", "security", "ai", "machine-learning", "prompt-injection", "cybersecurity"],
92
  package_dir={"": "src"},
93
  packages=find_packages(where="src"),
94
  python_requires=">=3.8",
95
 
96
  # Core dependencies
97
+ install_requires=CORE_DEPS,
98
 
99
  # Optional/extra dependencies
100
  extras_require={
101
+ "dev": DEV_DEPS,
102
+ "test": TEST_DEPS,
103
+ "dashboard": DASHBOARD_DEPS,
104
+ "api": API_DEPS,
105
+ "all": DEV_DEPS + DASHBOARD_DEPS + API_DEPS,
106
  },
107
 
108
  # Entry points for CLI
 
124
  # Additional metadata
125
  platforms=["any"],
126
  zip_safe=False,
 
 
 
127
  )