dataflow-core 2.1.6__tar.gz → 2.1.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.

Potentially problematic release.


This version of dataflow-core might be problematic. Click here for more details.

Files changed (51) hide show
  1. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/PKG-INFO +1 -1
  2. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/authenticator/dataflowhubauthenticator.py +0 -1
  3. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/__init__.py +2 -1
  4. dataflow_core-2.1.7/dataflow/models/dataflow_zone.py +19 -0
  5. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/role.py +12 -2
  6. dataflow_core-2.1.7/dataflow/models/role_zone.py +17 -0
  7. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/user.py +2 -2
  8. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/utils/get_current_user.py +2 -0
  9. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/PKG-INFO +1 -1
  10. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/SOURCES.txt +2 -1
  11. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/setup.py +1 -1
  12. dataflow_core-2.1.6/dataflow/models/runtime.py +0 -11
  13. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/README.md +0 -0
  14. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/authenticator/__init__.py +0 -0
  15. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/authenticator/dataflowairflowauthenticator.py +0 -0
  16. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/authenticator/dataflowsupersetauthenticator.py +0 -0
  17. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/__init__.py +0 -0
  18. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/configuration.py +0 -0
  19. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/database_manager.py +0 -0
  20. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/dataflow.py +0 -0
  21. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/db.py +0 -0
  22. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/environment.py +0 -0
  23. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/app_types.py +0 -0
  24. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/blacklist_library.py +0 -0
  25. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/connection.py +0 -0
  26. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/environment.py +0 -0
  27. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/environment_status.py +0 -0
  28. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/git_ssh.py +0 -0
  29. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/pinned_projects.py +0 -0
  30. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/project_details.py +0 -0
  31. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/recent_project_studio.py +0 -0
  32. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/recent_projects.py +0 -0
  33. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/role_server.py +0 -0
  34. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/server_config.py +0 -0
  35. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/session.py +0 -0
  36. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/team.py +0 -0
  37. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/user_environment.py +0 -0
  38. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/user_team.py +0 -0
  39. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/models/variables.py +0 -0
  40. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/scripts/clone_environment.sh +0 -0
  41. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/scripts/create_environment.sh +0 -0
  42. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/scripts/update_environment.sh +0 -0
  43. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/utils/__init__.py +0 -0
  44. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/utils/aws_secrets_manager.py +0 -0
  45. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/utils/json_handler.py +0 -0
  46. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow/utils/logger.py +0 -0
  47. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/dependency_links.txt +0 -0
  48. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/entry_points.txt +0 -0
  49. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/requires.txt +0 -0
  50. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/dataflow_core.egg-info/top_level.txt +0 -0
  51. {dataflow_core-2.1.6 → dataflow_core-2.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataflow-core
3
- Version: 2.1.6
3
+ Version: 2.1.7
4
4
  Summary: Dataflow core package
5
5
  Author: Dataflow
6
6
  Author-email:
@@ -136,7 +136,6 @@ class DataflowBaseAuthenticator(Authenticator):
136
136
  last_name=last_name or "",
137
137
  email=email,
138
138
  role_id=role_id,
139
- active='Y',
140
139
  password='user@123',
141
140
  )
142
141
 
@@ -12,7 +12,8 @@ from .blacklist_library import BlacklistedLibrary
12
12
  from .environment_status import EnvironmentStatus
13
13
  from .session import Session
14
14
  from .server_config import ServerConfig, CustomServerConfig
15
- from .runtime import RuntimeZone
15
+ from .dataflow_zone import DataflowZone
16
+ from .role_zone import RoleZone
16
17
  from .environment_status import EnvironmentStatus
17
18
  from .user_team import UserTeam
18
19
  from .role_server import RoleServer
@@ -0,0 +1,19 @@
1
+ from sqlalchemy import Column, Integer, String, Boolean
2
+ from sqlalchemy.orm import relationship
3
+ from dataflow.db import Base
4
+
5
+ class DataflowZone(Base):
6
+ __tablename__ = "DATAFLOW_ZONE"
7
+
8
+ id = Column(Integer, primary_key=True, autoincrement=True)
9
+ slug = Column(String, unique=True, nullable=False)
10
+ display_name = Column(String, nullable=False)
11
+ is_runtime = Column(Boolean, default=False)
12
+ subdomain = Column(String)
13
+ spark_enabled = Column(Boolean, default=False)
14
+ display_order = Column(Integer, default=0)
15
+
16
+ role_zone_assocs = relationship("RoleZone", back_populates="zone")
17
+
18
+ def __repr__(self):
19
+ return f"<DataflowZone(id={self.id}, slug='{self.slug}', display_name='{self.display_name}', display_order={self.display_order})>"
@@ -2,6 +2,12 @@
2
2
  from sqlalchemy import Column, Integer, String, Enum
3
3
  from sqlalchemy.orm import relationship
4
4
  from dataflow.db import Base
5
+ import enum
6
+
7
+ class BaseRoleField(enum.Enum):
8
+ admin = "admin"
9
+ user = "user"
10
+ applicant = "applicant"
5
11
 
6
12
  class Role(Base):
7
13
  """
@@ -13,7 +19,11 @@ class Role(Base):
13
19
  id = Column(Integer, primary_key=True, index=True, autoincrement=True, nullable=False)
14
20
  name = Column(String, unique=True, nullable=False)
15
21
  description = Column(String, nullable=True)
16
- base_role = Column(Enum('admin', 'user', 'applicant', name='base_role_field'), default='user', nullable=False)
22
+ base_role = Column(Enum(BaseRoleField), nullable=False, default=BaseRoleField.user)
17
23
 
18
24
  users = relationship("User", back_populates="role_details", cascade="all, delete-orphan")
19
- role_server_assocs = relationship("RoleServer", back_populates="role")
25
+ role_server_assocs = relationship("RoleServer", back_populates="role")
26
+ role_zone_assocs = relationship("RoleZone", back_populates="role")
27
+
28
+ def __repr__(self):
29
+ return f"<Role(id={self.id}, name='{self.name}', base_role='{self.base_role}')>"
@@ -0,0 +1,17 @@
1
+ from typing import Dict, List, Optional
2
+ from sqlalchemy import Column, Integer, ForeignKey, UniqueConstraint, Boolean
3
+ from sqlalchemy.orm import relationship
4
+ from dataflow.db import Base
5
+
6
+ class RoleZone(Base):
7
+ __tablename__ = 'ROLE_ZONE'
8
+
9
+ role_id = Column(Integer, ForeignKey('ROLE.id', ondelete="CASCADE"), primary_key=True)
10
+ zone_id = Column(Integer, ForeignKey('DATAFLOW_ZONE.id', ondelete="CASCADE"), primary_key=True)
11
+ is_default = Column(Boolean, default=False, nullable=False)
12
+
13
+ role = relationship("Role", back_populates="role_zone_assocs")
14
+ zone = relationship("DataflowZone", back_populates="role_zone_assocs")
15
+
16
+ def __repr__(self):
17
+ return f"<RoleZone(role_id={self.role_id}, zone_id={self.zone_id}, is_default={self.is_default})>"
@@ -1,5 +1,5 @@
1
1
  """models.py"""
2
- from sqlalchemy import Column, Integer, String, Boolean, LargeBinary, Enum, ForeignKey
2
+ from sqlalchemy import Column, Integer, String, Boolean, LargeBinary, ForeignKey
3
3
  from sqlalchemy.orm import relationship
4
4
  from dataflow.db import Base
5
5
 
@@ -18,7 +18,7 @@ class User(Base):
18
18
  role_id = Column(Integer, ForeignKey('ROLE.id'), nullable=False)
19
19
  image = Column(LargeBinary)
20
20
  image_url = Column(String, nullable=True)
21
- active = Column(Enum('N', 'Y', name='active_field'), nullable=False, server_default=str("N"))
21
+ active = Column(Boolean, nullable=False, default=True)
22
22
  password = Column(String, nullable=False)
23
23
  active_env = Column(String)
24
24
  active_env_type = Column(String, nullable=True)
@@ -26,9 +26,11 @@ def get_user_from_session(session_id: str, db: Session):
26
26
  raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="User not found")
27
27
 
28
28
  base_role = user.role_details.base_role
29
+ role_id = user.role_details.id
29
30
  role_name = user.role_details.name
30
31
  user.base_role = base_role
31
32
  user.role = role_name
33
+ user.role_id = role_id
32
34
 
33
35
  return user
34
36
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataflow-core
3
- Version: 2.1.6
3
+ Version: 2.1.7
4
4
  Summary: Dataflow core package
5
5
  Author: Dataflow
6
6
  Author-email:
@@ -14,6 +14,7 @@ dataflow/models/__init__.py
14
14
  dataflow/models/app_types.py
15
15
  dataflow/models/blacklist_library.py
16
16
  dataflow/models/connection.py
17
+ dataflow/models/dataflow_zone.py
17
18
  dataflow/models/environment.py
18
19
  dataflow/models/environment_status.py
19
20
  dataflow/models/git_ssh.py
@@ -23,7 +24,7 @@ dataflow/models/recent_project_studio.py
23
24
  dataflow/models/recent_projects.py
24
25
  dataflow/models/role.py
25
26
  dataflow/models/role_server.py
26
- dataflow/models/runtime.py
27
+ dataflow/models/role_zone.py
27
28
  dataflow/models/server_config.py
28
29
  dataflow/models/session.py
29
30
  dataflow/models/team.py
@@ -14,7 +14,7 @@ class PostInstall(install):
14
14
 
15
15
  setup(
16
16
  name="dataflow-core",
17
- version="2.1.6",
17
+ version="2.1.7",
18
18
  packages=find_packages(include=["dataflow", "dataflow.*", "authenticator", "authenticator.*"]),
19
19
  include_package_data=True,
20
20
  package_data={
@@ -1,11 +0,0 @@
1
- from sqlalchemy import Column, Integer, String, Boolean
2
- from dataflow.db import Base
3
-
4
- class RuntimeZone(Base):
5
- __tablename__ = "RUNTIME_ZONE"
6
-
7
- id = Column(Integer, primary_key=True, autoincrement=True, unique=True)
8
- name = Column(String, unique=True, nullable=False)
9
- display_name = Column(String, nullable=False)
10
- display_order = Column(Integer)
11
- spark_enabled = Column(Boolean, default=False)
File without changes
File without changes