Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read formatting dependencies from requirements-fmt.txt for setup #3130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
# pytest-cov requires pytest >= 3.6
DEV_REQUIRES = [
"beautifulsoup4",
"black==24.2.0",
"flake8",
"hypothesis",
"Jinja2",
"pyfakefs",
Expand All @@ -50,6 +48,17 @@
"numpy<2.0",
]


def read_deps_from_file(filename):
"""Read in requirements file and return items as list of strings"""
root_dir = os.path.dirname(__file__)
with open(os.path.join(root_dir, filename), "r") as fh:
return [line.strip() for line in fh.readlines() if not line.startswith("#")]


# Read in pinned versions of the formatting tools
DEV_REQUIRES += read_deps_from_file("requirements-fmt.txt")

MYSQL_REQUIRES = ["SQLAlchemy==1.4.17"]

NOTEBOOK_REQUIRES = ["jupyter"]
Expand Down