dataflow-core 2.1.14rc1__py3-none-any.whl → 2.1.14rc3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- dataflow/environment.py +6 -3
- dataflow/models/__init__.py +1 -1
- dataflow/models/environment.py +43 -2
- dataflow/scripts/create_environment.sh +3 -0
- {dataflow_core-2.1.14rc1.dist-info → dataflow_core-2.1.14rc3.dist-info}/METADATA +1 -1
- {dataflow_core-2.1.14rc1.dist-info → dataflow_core-2.1.14rc3.dist-info}/RECORD +9 -9
- {dataflow_core-2.1.14rc1.dist-info → dataflow_core-2.1.14rc3.dist-info}/WHEEL +0 -0
- {dataflow_core-2.1.14rc1.dist-info → dataflow_core-2.1.14rc3.dist-info}/entry_points.txt +0 -0
- {dataflow_core-2.1.14rc1.dist-info → dataflow_core-2.1.14rc3.dist-info}/top_level.txt +0 -0
dataflow/environment.py
CHANGED
|
@@ -53,7 +53,8 @@ class EnvironmentManager:
|
|
|
53
53
|
status="published",
|
|
54
54
|
mode="create",
|
|
55
55
|
yaml_file_path=yaml_path,
|
|
56
|
-
version=int(env_version)
|
|
56
|
+
version=int(env_version),
|
|
57
|
+
py_version=py_version
|
|
57
58
|
)
|
|
58
59
|
elif status == "draft":
|
|
59
60
|
mode = "create" if env_version == '1' else "update"
|
|
@@ -63,7 +64,8 @@ class EnvironmentManager:
|
|
|
63
64
|
mode=mode,
|
|
64
65
|
yaml_file_path=yaml_path,
|
|
65
66
|
log_file_location=log_file_location,
|
|
66
|
-
version=int(env_version)
|
|
67
|
+
version=int(env_version),
|
|
68
|
+
py_version=py_version
|
|
67
69
|
)
|
|
68
70
|
|
|
69
71
|
# Update job log status if db was provided
|
|
@@ -189,6 +191,7 @@ class EnvironmentManager:
|
|
|
189
191
|
version: int,
|
|
190
192
|
source_path=None,
|
|
191
193
|
log_file_location=None,
|
|
194
|
+
py_version=None
|
|
192
195
|
):
|
|
193
196
|
"""
|
|
194
197
|
Executes environment operations (create or clone).
|
|
@@ -220,7 +223,7 @@ class EnvironmentManager:
|
|
|
220
223
|
|
|
221
224
|
if mode == "create":
|
|
222
225
|
create_env_script_path = pkg_resources.resource_filename('dataflow', 'scripts/create_environment.sh')
|
|
223
|
-
command = ["bash", create_env_script_path, yaml_file_path, conda_env_path]
|
|
226
|
+
command = ["bash", create_env_script_path, yaml_file_path, conda_env_path, py_version]
|
|
224
227
|
|
|
225
228
|
elif mode == "update":
|
|
226
229
|
update_env_script_path = pkg_resources.resource_filename('dataflow', 'scripts/update_environment.sh')
|
dataflow/models/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from .role import Role
|
|
4
4
|
from .user import User
|
|
5
5
|
from .team import Team
|
|
6
|
-
from .environment import (Environment, LocalEnvironment, ArchivedEnvironment, JobLogs)
|
|
6
|
+
from .environment import (Environment, LocalEnvironment, ArchivedEnvironment, JobLogs, PipSource)
|
|
7
7
|
from .project_details import ProjectDetails
|
|
8
8
|
from .recent_projects import RecentProjects
|
|
9
9
|
from .pinned_projects import PinnedProject
|
dataflow/models/environment.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
from sqlalchemy import
|
|
1
|
+
from sqlalchemy import (
|
|
2
|
+
Column, Integer, String, Boolean, Text,
|
|
3
|
+
ForeignKey, DateTime, UniqueConstraint, CheckConstraint
|
|
4
|
+
)
|
|
5
|
+
from sqlalchemy.orm import relationship, Session
|
|
2
6
|
from sqlalchemy.orm import relationship
|
|
3
7
|
from sqlalchemy.sql import func
|
|
4
8
|
from datetime import datetime, timezone
|
|
@@ -79,4 +83,41 @@ class LocalEnvironment(Base):
|
|
|
79
83
|
|
|
80
84
|
class EnvType(str, Enum):
|
|
81
85
|
dataflow = "dataflow"
|
|
82
|
-
local = "local"
|
|
86
|
+
local = "local"
|
|
87
|
+
|
|
88
|
+
class PipSource(Base):
|
|
89
|
+
__tablename__ = "PIP_SOURCE"
|
|
90
|
+
|
|
91
|
+
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
92
|
+
|
|
93
|
+
user_name = Column(String, ForeignKey("USER.user_name", ondelete="CASCADE"), nullable=True, index=True)
|
|
94
|
+
|
|
95
|
+
name = Column(String, nullable=False)
|
|
96
|
+
url = Column(String, nullable=False)
|
|
97
|
+
is_index = Column(Boolean, default=False, nullable=False, server_default='false')
|
|
98
|
+
|
|
99
|
+
created_at = Column(DateTime, default=datetime.now(timezone.utc), nullable=False)
|
|
100
|
+
updated_at = Column(DateTime, default=datetime.now(timezone.utc), onupdate=datetime.now(timezone.utc), nullable=False)
|
|
101
|
+
|
|
102
|
+
__table_args__ = (
|
|
103
|
+
UniqueConstraint("name", "user_name", name="uq_pip_source_per_user"),
|
|
104
|
+
CheckConstraint("NOT (is_index = TRUE AND user_name IS NOT NULL)", name="check_no_user_index_url"),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def get_admin_sources(cls, session: Session):
|
|
109
|
+
"""
|
|
110
|
+
Returns all admin/system-wide sources (user_name is NULL).
|
|
111
|
+
"""
|
|
112
|
+
return session.query(cls).filter(
|
|
113
|
+
cls.user_name == None
|
|
114
|
+
).all()
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def get_user_sources(cls, session: Session, user_name: str):
|
|
118
|
+
"""
|
|
119
|
+
Returns merged sources for a user (admin-level + user-level personal sources).
|
|
120
|
+
"""
|
|
121
|
+
return session.query(cls).filter(
|
|
122
|
+
(cls.user_name == None) | (cls.user_name == user_name)
|
|
123
|
+
).all()
|
|
@@ -5,6 +5,7 @@ set -e
|
|
|
5
5
|
# Accept new parameters
|
|
6
6
|
yaml_file_path=$1
|
|
7
7
|
conda_env_path=$2
|
|
8
|
+
py_version=$3
|
|
8
9
|
|
|
9
10
|
# Validate inputs
|
|
10
11
|
if [ -z "$yaml_file_path" ] || [ -z "$conda_env_path" ]; then
|
|
@@ -23,6 +24,8 @@ env_name=$(basename "$conda_env_path")
|
|
|
23
24
|
# Set unique cache dir per environment
|
|
24
25
|
export CONDA_PKGS_DIRS="/dataflow/envs/cache/${env_name}"
|
|
25
26
|
mkdir -p "$CONDA_PKGS_DIRS"
|
|
27
|
+
export PIP_CONSTRAINT="/dataflow/setup/pip_constraints/py${py_version}-constraints.txt"
|
|
28
|
+
export NO_CONDA_PLUGIN_PIP_CONSTRAINT="true"
|
|
26
29
|
|
|
27
30
|
# Create the conda environment from the YAML file
|
|
28
31
|
conda env create --file "$yaml_file_path" --prefix "$conda_env_path" --yes
|
|
@@ -7,13 +7,13 @@ dataflow/configuration.py,sha256=7To6XwH1eESiYp39eqPcswXWwrdBUdPF6xN6WnazOF0,663
|
|
|
7
7
|
dataflow/database_manager.py,sha256=tJHMuOZ9Muskrh9t4uLRlTuFU0VkHAzoHlGP5DORIC4,899
|
|
8
8
|
dataflow/dataflow.py,sha256=0kPDIpFgrEcK81QYeLQGb-rQTrAH-83gLpn566yvBGA,14004
|
|
9
9
|
dataflow/db.py,sha256=73ojGqpCTRVTlPszD73Ozhjih_BI2KTHmazqxxL6iWk,3780
|
|
10
|
-
dataflow/environment.py,sha256=
|
|
11
|
-
dataflow/models/__init__.py,sha256=
|
|
10
|
+
dataflow/environment.py,sha256=IuhhYtKR7h3KuqRBKpaa_b-NW4M3b64tmCTGFKT3sF8,28391
|
|
11
|
+
dataflow/models/__init__.py,sha256=Z3pf61pq9Gw0c4csDvAYZ-XmQfLpHHDIBezCsCIs8gs,992
|
|
12
12
|
dataflow/models/app_types.py,sha256=yE_ZB13lhpK7AZ7PyBwnQlf0RlIHYs_-vdMKx7_RMlY,379
|
|
13
13
|
dataflow/models/blacklist_library.py,sha256=B2oi3Z8GcR_glhLAyinFk0W8c9txXvm3uOER6dY-q7I,991
|
|
14
14
|
dataflow/models/connection.py,sha256=_VJL3KuIrm8t4lJmtunIL3-AXF9Yvi5wUolzdR3tE0E,1017
|
|
15
15
|
dataflow/models/dataflow_zone.py,sha256=yFCvQXos5M1cU7ksbVSO338_RkT3hkdw2wr3kCJ_rec,769
|
|
16
|
-
dataflow/models/environment.py,sha256=
|
|
16
|
+
dataflow/models/environment.py,sha256=IpM3aJ4ViS351fmWrj5zKIlg7HM_Jn2hV4EqnEjhhVU,4413
|
|
17
17
|
dataflow/models/environment_status.py,sha256=lvPDNUsUoTW9D97B07aKqJQHRKp4LvPM28pQDMPH1ac,536
|
|
18
18
|
dataflow/models/git_ssh.py,sha256=W15SDypxzGOz_aZkHEnVZ6DIMVsjAsbSIXVIEt2mPYU,694
|
|
19
19
|
dataflow/models/pinned_projects.py,sha256=I-XMQq7__XJJi2lyOdEvQEfhPRz8D6KHA6Cbavbf05o,606
|
|
@@ -37,7 +37,7 @@ dataflow/schemas/connection.py,sha256=ut2sqz06yOjmFKzHry92FEt7DN09Bj30GYse35__Cu
|
|
|
37
37
|
dataflow/schemas/git_ssh.py,sha256=N1O7HM6ZbygIBZn2rKvNR0e7IM3ZJMAH6aJtjaghDr0,1283
|
|
38
38
|
dataflow/schemas/secret.py,sha256=wMSCn6zoBHS-R4NoKwljq2JUad8p9JY542UNJFa86X8,1183
|
|
39
39
|
dataflow/scripts/clone_environment.sh,sha256=Qy0GylsA3kUVUL_L1MirxIWujOFhT1tikKqXNtCTWd4,506
|
|
40
|
-
dataflow/scripts/create_environment.sh,sha256=
|
|
40
|
+
dataflow/scripts/create_environment.sh,sha256=Ny6iXYK4K5o5h_BLcRPjl0hMU-WQZWXhxiL2uKj166w,975
|
|
41
41
|
dataflow/scripts/update_environment.sh,sha256=2dtn2xlNi6frpig-sqlGE1_IKRbbkqYOCpf_qyMKKII,992
|
|
42
42
|
dataflow/secrets_manager/__init__.py,sha256=idGqIDtYl0De2WIK9Obl-N7SDPSYtVM0D-wXfZjCiy4,559
|
|
43
43
|
dataflow/secrets_manager/factory.py,sha256=k1sIyXBKtas1upWJpq8Mks2d8kjLAHU7CFvjeuMXXxs,2160
|
|
@@ -50,8 +50,8 @@ dataflow/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
50
50
|
dataflow/utils/exceptions.py,sha256=8GRFoYZ5dPGQckVm2znaHpPi0ZAs69fK-RGKukEsapk,4432
|
|
51
51
|
dataflow/utils/get_current_user.py,sha256=4nSO3SPVMZhW-MsIgxR3f9ZzrFaIZIuyrM6hvfyE7PQ,1202
|
|
52
52
|
dataflow/utils/logger.py,sha256=7BFrOq5Oiqn8P4XZbgJzMP5O07d2fpdECbbfsjrUuHw,1213
|
|
53
|
-
dataflow_core-2.1.
|
|
54
|
-
dataflow_core-2.1.
|
|
55
|
-
dataflow_core-2.1.
|
|
56
|
-
dataflow_core-2.1.
|
|
57
|
-
dataflow_core-2.1.
|
|
53
|
+
dataflow_core-2.1.14rc3.dist-info/METADATA,sha256=Fb6jxrYq_5C2scDOAPFyoJteluYEvu3904HhS74ZtV8,373
|
|
54
|
+
dataflow_core-2.1.14rc3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
55
|
+
dataflow_core-2.1.14rc3.dist-info/entry_points.txt,sha256=ppj_EIbYrJJwCPg1kfdsZk5q1N-Ejfis1neYrnjhO8o,117
|
|
56
|
+
dataflow_core-2.1.14rc3.dist-info/top_level.txt,sha256=SZsUOpSCK9ntUy-3Tusxzf5A2e8ebwD8vouPb1dPt_8,23
|
|
57
|
+
dataflow_core-2.1.14rc3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|