dataflow-core 2.0.6__tar.gz → 2.0.7__tar.gz
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.
- dataflow_core-2.0.7/PKG-INFO +14 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/dataflowhubauthenticator.py +17 -1
- dataflow_core-2.0.7/dataflow/scripts/create_environment.sh +34 -0
- dataflow_core-2.0.7/dataflow_core.egg-info/PKG-INFO +14 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow_core.egg-info/SOURCES.txt +1 -2
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow_core.egg-info/entry_points.txt +0 -1
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/setup.py +2 -2
- dataflow-core-2.0.6/PKG-INFO +0 -10
- dataflow-core-2.0.6/dataflow/models/session.py +0 -17
- dataflow-core-2.0.6/dataflow/models/user.py +0 -23
- dataflow-core-2.0.6/dataflow_core.egg-info/PKG-INFO +0 -10
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/README.md +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/dataflowairflowauthenticator.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/dataflowsupersetauthenticator.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/configuration.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/models/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/models/database.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/models/session.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/authenticator/package/models/user.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/configuration.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/dataflow.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/models/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/models/database.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/utils/__init__.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow/utils/aws_secrets_manager.py +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow_core.egg-info/dependency_links.txt +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow_core.egg-info/requires.txt +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/dataflow_core.egg-info/top_level.txt +0 -0
- {dataflow-core-2.0.6 → dataflow_core-2.0.7}/setup.cfg +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dataflow-core
|
|
3
|
+
Version: 2.0.7
|
|
4
|
+
Summary: Dataflow core package
|
|
5
|
+
Author: Dataflow
|
|
6
|
+
Author-email:
|
|
7
|
+
Requires-Dist: sqlalchemy
|
|
8
|
+
Requires-Dist: boto3
|
|
9
|
+
Requires-Dist: psycopg2-binary
|
|
10
|
+
Requires-Dist: pymysql
|
|
11
|
+
Requires-Dist: requests
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: requires-dist
|
|
14
|
+
Dynamic: summary
|
|
@@ -65,7 +65,23 @@ class DataflowHubAuthenticator(Authenticator):
|
|
|
65
65
|
self.db.refresh(db_item)
|
|
66
66
|
|
|
67
67
|
expires = datetime.now(timezone.utc) + timedelta(days=365)
|
|
68
|
-
handler.
|
|
68
|
+
host = handler.request.host
|
|
69
|
+
parts = host.split('.')
|
|
70
|
+
if len(parts) >= 2:
|
|
71
|
+
domain = '.'.join(parts[-2:])
|
|
72
|
+
else:
|
|
73
|
+
domain = host
|
|
74
|
+
base_domain = f".{domain}"
|
|
75
|
+
handler.set_cookie(
|
|
76
|
+
"dataflow_session",
|
|
77
|
+
session_id,
|
|
78
|
+
domain=base_domain,
|
|
79
|
+
path="/",
|
|
80
|
+
expires=expires,
|
|
81
|
+
secure=True,
|
|
82
|
+
httponly=True,
|
|
83
|
+
samesite="None"
|
|
84
|
+
)
|
|
69
85
|
user_dict = {"name": username, "session_id": session_id}
|
|
70
86
|
return user_dict
|
|
71
87
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
IFS=',' read -r -a libraries <<< $1
|
|
5
|
+
conda_env_path=$2
|
|
6
|
+
py_version=$3
|
|
7
|
+
|
|
8
|
+
# Use an isolated conda package cache to avoid concurrency issues
|
|
9
|
+
export CONDA_PKGS_DIRS=$(mktemp -d)
|
|
10
|
+
# to delete conda package cache after script finishes
|
|
11
|
+
trap 'rm -rf "$CONDA_PKGS_DIRS"' EXIT
|
|
12
|
+
|
|
13
|
+
# 1. Creating conda environment
|
|
14
|
+
conda create --prefix ${conda_env_path} --yes python=${py_version}
|
|
15
|
+
${conda_env_path}/bin/pip install --root-user-action ignore ${libraries[@]}
|
|
16
|
+
|
|
17
|
+
# 3. Install Dataflow Airflow to a separate path in environment
|
|
18
|
+
${conda_env_path}/bin/pip install \
|
|
19
|
+
--force-reinstall --root-user-action ignore \
|
|
20
|
+
--no-warn-conflicts dataflow-airflow==2.10.5 \
|
|
21
|
+
--target ${conda_env_path}/bin/airflow-libraries/ \
|
|
22
|
+
--constraint https://raw.githubusercontent.com//apache/airflow/constraints-2.10.5/constraints-${py_version}.txt || true
|
|
23
|
+
|
|
24
|
+
files=(
|
|
25
|
+
${conda_env_path}/lib/python${py_version}/site-packages/dbt/config/profile.py
|
|
26
|
+
${conda_env_path}/lib/python${py_version}/site-packages/dbt/task/debug.py
|
|
27
|
+
)
|
|
28
|
+
for file in ${files[@]}
|
|
29
|
+
do
|
|
30
|
+
awk '{gsub("from dbt.clients.yaml_helper import load_yaml_text", "from dbt.dataflow_config.secrets_manager import load_yaml_text"); print}' $file > temp
|
|
31
|
+
mv temp $file
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
echo "Environment Creation Successful"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dataflow-core
|
|
3
|
+
Version: 2.0.7
|
|
4
|
+
Summary: Dataflow core package
|
|
5
|
+
Author: Dataflow
|
|
6
|
+
Author-email:
|
|
7
|
+
Requires-Dist: sqlalchemy
|
|
8
|
+
Requires-Dist: boto3
|
|
9
|
+
Requires-Dist: psycopg2-binary
|
|
10
|
+
Requires-Dist: pymysql
|
|
11
|
+
Requires-Dist: requests
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: requires-dist
|
|
14
|
+
Dynamic: summary
|
|
@@ -15,8 +15,7 @@ dataflow/configuration.py
|
|
|
15
15
|
dataflow/dataflow.py
|
|
16
16
|
dataflow/models/__init__.py
|
|
17
17
|
dataflow/models/database.py
|
|
18
|
-
dataflow/
|
|
19
|
-
dataflow/models/user.py
|
|
18
|
+
dataflow/scripts/create_environment.sh
|
|
20
19
|
dataflow/utils/__init__.py
|
|
21
20
|
dataflow/utils/aws_secrets_manager.py
|
|
22
21
|
dataflow_core.egg-info/PKG-INFO
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="dataflow-core",
|
|
5
|
-
version="2.0.
|
|
5
|
+
version="2.0.7",
|
|
6
6
|
packages=find_packages(include=["dataflow", "dataflow.*", "authenticator", "authenticator.*"]),
|
|
7
7
|
include_package_data=True,
|
|
8
8
|
package_data={
|
|
@@ -23,4 +23,4 @@ setup(
|
|
|
23
23
|
'dataflow_authenticator = authenticator.dataflowhubauthenticator:DataflowHubAuthenticator',
|
|
24
24
|
],
|
|
25
25
|
},
|
|
26
|
-
)
|
|
26
|
+
)
|
dataflow-core-2.0.6/PKG-INFO
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"""models.py"""
|
|
2
|
-
from sqlalchemy import Column, Integer, String
|
|
3
|
-
from sqlalchemy.ext.declarative import declarative_base
|
|
4
|
-
|
|
5
|
-
#instance for create declarative base
|
|
6
|
-
Base=declarative_base()
|
|
7
|
-
|
|
8
|
-
class Session_table(Base):
|
|
9
|
-
"""
|
|
10
|
-
Table SESSIONS
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
__tablename__='SESSION'
|
|
14
|
-
|
|
15
|
-
id = Column(Integer, primary_key=True, index=True, unique=True, nullable=False, autoincrement=True)
|
|
16
|
-
session_id = Column(String, unique=True, nullable=False)
|
|
17
|
-
user_id = Column(String, nullable=False)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"""models.py"""
|
|
2
|
-
from sqlalchemy import Column, Integer, String, LargeBinary, Enum
|
|
3
|
-
from sqlalchemy.ext.declarative import declarative_base
|
|
4
|
-
|
|
5
|
-
#instance for create declarative base
|
|
6
|
-
Base=declarative_base()
|
|
7
|
-
|
|
8
|
-
class User(Base):
|
|
9
|
-
"""
|
|
10
|
-
Table USER
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
__tablename__='USER'
|
|
14
|
-
|
|
15
|
-
user_id = Column(Integer, primary_key=True, index=True, autoincrement=True, nullable=False)
|
|
16
|
-
user_name = Column(String, unique=True, nullable=False)
|
|
17
|
-
first_name = Column(String)
|
|
18
|
-
last_name = Column(String)
|
|
19
|
-
email = Column(String, unique=True)
|
|
20
|
-
role = Column(Enum('admin', 'user', name='role_field'), nullable=False)
|
|
21
|
-
image = Column(LargeBinary)
|
|
22
|
-
active = Column(Enum('N', 'Y', name='active_field'), nullable=False, server_default=str("N"))
|
|
23
|
-
password = Column(String, nullable=False)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|