-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix audit and test reqs * revert sklearn version and ignore vuln
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
# Distributed under the terms of the Modified BSD License. | ||
import os | ||
from os.path import join as pjoin | ||
from pathlib import Path | ||
|
||
from setuptools import setup | ||
|
||
|
@@ -47,7 +48,7 @@ | |
setup_args = dict( | ||
cmdclass=cmdclass, | ||
author_email="[email protected]", | ||
long_description=open("README.md").read(), | ||
long_description=(Path(__file__).parent / "README.md").read_text("utf8"), | ||
long_description_content_type="text/markdown", | ||
include_package_data=True, | ||
install_requires=[ | ||
|
@@ -64,13 +65,13 @@ | |
"litestar>=2.8.3", | ||
"typing-inspect>=0.9.0", | ||
"uvicorn[standard]>=0.22.0", | ||
"watchdog>=3", | ||
"watchdog>=3.0.0", | ||
"typer>=0.3", | ||
"rich>=13", | ||
"iterative-telemetry>=0.0.5", | ||
"dynaconf>=3.2.4", | ||
"certifi>=2023.07.22", | ||
"urllib3>=1.26.18", | ||
"urllib3>=1.26.19", | ||
"fsspec>=2024.2.0", | ||
"ujson>=5.4.0", | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pathlib import Path | ||
|
||
from setup import setup_args | ||
|
||
|
||
def test_minimal_requirements(): | ||
path = Path(__file__).parent.parent | ||
with open(path / "requirements.min.txt") as f: | ||
lines = {line.strip().split("#")[0] for line in f.readlines()} | ||
min_reqs = {k.split("[")[0]: v for line in lines if line.strip() for k, v in (line.strip().split("=="),)} | ||
|
||
install_reqs = {k.split("[")[0]: v for r in setup_args["install_requires"] for k, v in (r.split(">="),)} | ||
extra = [] | ||
wrong_version = [] | ||
for m, v in install_reqs.items(): | ||
if m not in min_reqs: | ||
extra.append(f"{m}>={v}") | ||
continue | ||
if v != min_reqs[m]: | ||
wrong_version.append(f"{m}>={v}") | ||
continue | ||
|
||
assert ( | ||
len(extra) == 0 and len(wrong_version) == 0 | ||
), f"install_requires has extra reqs {extra} and wrong versions of {wrong_version}" |