Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Release 14/11/24 (#135)
Browse files Browse the repository at this point in the history
- Update SQLAlchemy version from <2.0 to >2.0&<3.0
- Update setup.py to install SQL files

---------

Co-authored-by: Haris Angelidakis <64154020+harisang@users.noreply.github.com>
  • Loading branch information
bram-vdberg and harisang authored Nov 15, 2024
1 parent 748478c commit 978fabd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions manifest.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include logging.conf
include requirements/prod.txt
include src/sql/**/*.sql
2 changes: 1 addition & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pandas==2.1.4
ndjson>=0.3.1
py-multiformats-cid>=0.4.4
boto3>=1.26.12
SQLAlchemy<2.0
SQLAlchemy>=2.0,<3.0
26 changes: 25 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ def read_requirements(filename):
return [line.strip() for line in f.readlines() if line.strip()]


def get_sql_files(directory):
sql_files = []
for root, _, files in os.walk(directory):
for file in files:
if file.endswith(".sql"):
# Add 'src/' prefix to the path
sql_files.append(
os.path.join(
"src", os.path.relpath(os.path.join(root, file), start="src")
)
)
return sql_files


setup(
name="src",
version="1.6.4",
Expand All @@ -22,7 +36,17 @@ def read_requirements(filename):
"lib", "python{0}.{1}".format(*os.sys.version_info[:2]), "site-packages"
),
["logging.conf"],
)
),
(
os.path.join(
"lib",
"python{0}.{1}".format(*os.sys.version_info[:2]),
"site-packages",
"src",
"sql",
),
get_sql_files("src/sql"),
),
],
install_requires=read_requirements("requirements/prod.txt"),
)

0 comments on commit 978fabd

Please sign in to comment.