dcicutils 8.4.0.1b10__py3-none-any.whl → 8.4.0.1b11__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.
- dcicutils/structured_data.py +41 -9
 - {dcicutils-8.4.0.1b10.dist-info → dcicutils-8.4.0.1b11.dist-info}/METADATA +1 -1
 - {dcicutils-8.4.0.1b10.dist-info → dcicutils-8.4.0.1b11.dist-info}/RECORD +6 -6
 - {dcicutils-8.4.0.1b10.dist-info → dcicutils-8.4.0.1b11.dist-info}/LICENSE.txt +0 -0
 - {dcicutils-8.4.0.1b10.dist-info → dcicutils-8.4.0.1b11.dist-info}/WHEEL +0 -0
 - {dcicutils-8.4.0.1b10.dist-info → dcicutils-8.4.0.1b11.dist-info}/entry_points.txt +0 -0
 
    
        dcicutils/structured_data.py
    CHANGED
    
    | 
         @@ -543,11 +543,11 @@ class Schema: 
     | 
|
| 
       543 
543 
     | 
    
         
             
            class PortalBase:
         
     | 
| 
       544 
544 
     | 
    
         | 
| 
       545 
545 
     | 
    
         
             
                def __init__(self,
         
     | 
| 
       546 
     | 
    
         
            -
                             arg: Optional[Union[VirtualApp, TestApp, Router,  
     | 
| 
      
 546 
     | 
    
         
            +
                             arg: Optional[Union[VirtualApp, TestApp, Router, PortalBase, dict, tuple, str]] = None,
         
     | 
| 
       547 
547 
     | 
    
         
             
                             env: Optional[str] = None, app: OrchestratedApp = APP_SMAHT, server: Optional[str] = None,
         
     | 
| 
       548 
548 
     | 
    
         
             
                             key: Optional[Union[dict, tuple]] = None,
         
     | 
| 
       549 
     | 
    
         
            -
                             portal: Optional[Union[VirtualApp, TestApp, Router,  
     | 
| 
       550 
     | 
    
         
            -
                    if ((isinstance(arg, (VirtualApp, TestApp, Router,  
     | 
| 
      
 549 
     | 
    
         
            +
                             portal: Optional[Union[VirtualApp, TestApp, Router, PortalBase, str]] = None) -> PortalBase:
         
     | 
| 
      
 550 
     | 
    
         
            +
                    if ((isinstance(arg, (VirtualApp, TestApp, Router, PortalBase)) or
         
     | 
| 
       551 
551 
     | 
    
         
             
                         isinstance(arg, str) and arg.endswith(".ini")) and not portal):
         
     | 
| 
       552 
552 
     | 
    
         
             
                        portal = arg
         
     | 
| 
       553 
553 
     | 
    
         
             
                    elif isinstance(arg, str) and not env:
         
     | 
| 
         @@ -557,8 +557,11 @@ class PortalBase: 
     | 
|
| 
       557 
557 
     | 
    
         
             
                    self._vapp = None
         
     | 
| 
       558 
558 
     | 
    
         
             
                    self._key = None
         
     | 
| 
       559 
559 
     | 
    
         
             
                    self._key_pair = None
         
     | 
| 
      
 560 
     | 
    
         
            +
                    self._key_file = None
         
     | 
| 
      
 561 
     | 
    
         
            +
                    self._env = env
         
     | 
| 
      
 562 
     | 
    
         
            +
                    self._app = app
         
     | 
| 
       560 
563 
     | 
    
         
             
                    self._server = None
         
     | 
| 
       561 
     | 
    
         
            -
                    if isinstance(portal,  
     | 
| 
      
 564 
     | 
    
         
            +
                    if isinstance(portal, PortalBase):
         
     | 
| 
       562 
565 
     | 
    
         
             
                        self._vapp = portal._vapp
         
     | 
| 
       563 
566 
     | 
    
         
             
                        self._key = portal._key
         
     | 
| 
       564 
567 
     | 
    
         
             
                        self._key_pair = portal._key_pair
         
     | 
| 
         @@ -585,6 +588,35 @@ class PortalBase: 
     | 
|
| 
       585 
588 
     | 
    
         
             
                            self._key = key_manager.get_keydict_for_server(server)
         
     | 
| 
       586 
589 
     | 
    
         
             
                            self._server = server
         
     | 
| 
       587 
590 
     | 
    
         
             
                        self._key_pair = key_manager.keydict_to_keypair(self._key) if self._key else None
         
     | 
| 
      
 591 
     | 
    
         
            +
                        self._key_file = key_manager.keys_file
         
     | 
| 
      
 592 
     | 
    
         
            +
             
     | 
| 
      
 593 
     | 
    
         
            +
                @property
         
     | 
| 
      
 594 
     | 
    
         
            +
                def env(self):
         
     | 
| 
      
 595 
     | 
    
         
            +
                    return self._env
         
     | 
| 
      
 596 
     | 
    
         
            +
             
     | 
| 
      
 597 
     | 
    
         
            +
                @property
         
     | 
| 
      
 598 
     | 
    
         
            +
                def app(self):
         
     | 
| 
      
 599 
     | 
    
         
            +
                    return self._app
         
     | 
| 
      
 600 
     | 
    
         
            +
             
     | 
| 
      
 601 
     | 
    
         
            +
                @property
         
     | 
| 
      
 602 
     | 
    
         
            +
                def key(self):
         
     | 
| 
      
 603 
     | 
    
         
            +
                    return self._key
         
     | 
| 
      
 604 
     | 
    
         
            +
             
     | 
| 
      
 605 
     | 
    
         
            +
                @property
         
     | 
| 
      
 606 
     | 
    
         
            +
                def key_pair(self):
         
     | 
| 
      
 607 
     | 
    
         
            +
                    return self._key_pair
         
     | 
| 
      
 608 
     | 
    
         
            +
             
     | 
| 
      
 609 
     | 
    
         
            +
                @property
         
     | 
| 
      
 610 
     | 
    
         
            +
                def key_file(self):
         
     | 
| 
      
 611 
     | 
    
         
            +
                    return self._key_file
         
     | 
| 
      
 612 
     | 
    
         
            +
             
     | 
| 
      
 613 
     | 
    
         
            +
                @property
         
     | 
| 
      
 614 
     | 
    
         
            +
                def server(self):
         
     | 
| 
      
 615 
     | 
    
         
            +
                    return self._server
         
     | 
| 
      
 616 
     | 
    
         
            +
             
     | 
| 
      
 617 
     | 
    
         
            +
                @property
         
     | 
| 
      
 618 
     | 
    
         
            +
                def vapp(self):
         
     | 
| 
      
 619 
     | 
    
         
            +
                    return self._vapp
         
     | 
| 
       588 
620 
     | 
    
         | 
| 
       589 
621 
     | 
    
         
             
                def get_metadata(self, object_id: str) -> Optional[dict]:
         
     | 
| 
       590 
622 
     | 
    
         
             
                    return get_metadata(obj_id=object_id, vapp=self._vapp, key=self._key)
         
     | 
| 
         @@ -661,15 +693,15 @@ class PortalBase: 
     | 
|
| 
       661 
693 
     | 
    
         
             
                @staticmethod
         
     | 
| 
       662 
694 
     | 
    
         
             
                def create_for_testing(ini_file: Optional[str] = None) -> PortalBase:
         
     | 
| 
       663 
695 
     | 
    
         
             
                    if isinstance(ini_file, str):
         
     | 
| 
       664 
     | 
    
         
            -
                        return  
     | 
| 
      
 696 
     | 
    
         
            +
                        return PortalBase(PortalBase._create_testapp(ini_file))
         
     | 
| 
       665 
697 
     | 
    
         
             
                    minimal_ini_for_unit_testing = "[app:app]\nuse = egg:encoded\nsqlalchemy.url = postgresql://dummy\n"
         
     | 
| 
       666 
698 
     | 
    
         
             
                    with temporary_file(content=minimal_ini_for_unit_testing, suffix=".ini") as ini_file:
         
     | 
| 
       667 
     | 
    
         
            -
                        return  
     | 
| 
      
 699 
     | 
    
         
            +
                        return PortalBase(PortalBase._create_testapp(ini_file))
         
     | 
| 
       668 
700 
     | 
    
         | 
| 
       669 
701 
     | 
    
         
             
                @staticmethod
         
     | 
| 
       670 
     | 
    
         
            -
                def create_for_testing_local(ini_file: Optional[str] = None) ->  
     | 
| 
      
 702 
     | 
    
         
            +
                def create_for_testing_local(ini_file: Optional[str] = None) -> PortalBase:
         
     | 
| 
       671 
703 
     | 
    
         
             
                    if isinstance(ini_file, str) and ini_file:
         
     | 
| 
       672 
     | 
    
         
            -
                        return  
     | 
| 
      
 704 
     | 
    
         
            +
                        return PortalBase(PortalBase._create_testapp(ini_file))
         
     | 
| 
       673 
705 
     | 
    
         
             
                    minimal_ini_for_testing_local = "\n".join([
         
     | 
| 
       674 
706 
     | 
    
         
             
                        "[app:app]\nuse = egg:encoded\nfile_upload_bucket = dummy",
         
     | 
| 
       675 
707 
     | 
    
         
             
                        "sqlalchemy.url = postgresql://postgres@localhost:5441/postgres?host=/tmp/snovault/pgdata",
         
     | 
| 
         @@ -690,7 +722,7 @@ class PortalBase: 
     | 
|
| 
       690 
722 
     | 
    
         
             
                        "multiauth.policy.auth0.base = encoded.authentication.Auth0AuthenticationPolicy"
         
     | 
| 
       691 
723 
     | 
    
         
             
                    ])
         
     | 
| 
       692 
724 
     | 
    
         
             
                    with temporary_file(content=minimal_ini_for_testing_local, suffix=".ini") as minimal_ini_file:
         
     | 
| 
       693 
     | 
    
         
            -
                        return  
     | 
| 
      
 725 
     | 
    
         
            +
                        return PortalBase(PortalBase._create_testapp(minimal_ini_file))
         
     | 
| 
       694 
726 
     | 
    
         | 
| 
       695 
727 
     | 
    
         
             
                @staticmethod
         
     | 
| 
       696 
728 
     | 
    
         
             
                def _create_testapp(value: Union[str, Router, TestApp] = "development.ini") -> TestApp:
         
     | 
| 
         @@ -55,14 +55,14 @@ dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19 
     | 
|
| 
       55 
55 
     | 
    
         
             
            dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
         
     | 
| 
       56 
56 
     | 
    
         
             
            dcicutils/snapshot_utils.py,sha256=ymP7PXH6-yEiXAt75w0ldQFciGNqWBClNxC5gfX2FnY,22961
         
     | 
| 
       57 
57 
     | 
    
         
             
            dcicutils/ssl_certificate_utils.py,sha256=F0ifz_wnRRN9dfrfsz7aCp4UDLgHEY8LaK7PjnNvrAQ,9707
         
     | 
| 
       58 
     | 
    
         
            -
            dcicutils/structured_data.py,sha256= 
     | 
| 
      
 58 
     | 
    
         
            +
            dcicutils/structured_data.py,sha256=2kbilJVmGPsZh57xEreSEjTYWCjkOvDCO0L0QxWsIxQ,44093
         
     | 
| 
       59 
59 
     | 
    
         
             
            dcicutils/task_utils.py,sha256=MF8ujmTD6-O2AC2gRGPHyGdUrVKgtr8epT5XU8WtNjk,8082
         
     | 
| 
       60 
60 
     | 
    
         
             
            dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
         
     | 
| 
       61 
61 
     | 
    
         
             
            dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
         
     | 
| 
       62 
62 
     | 
    
         
             
            dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
         
     | 
| 
       63 
63 
     | 
    
         
             
            dcicutils/zip_utils.py,sha256=0OXR0aLNwyLIZOzIFTM_5DOun7dxIv6TIZbFiithkO0,3276
         
     | 
| 
       64 
     | 
    
         
            -
            dcicutils-8.4.0. 
     | 
| 
       65 
     | 
    
         
            -
            dcicutils-8.4.0. 
     | 
| 
       66 
     | 
    
         
            -
            dcicutils-8.4.0. 
     | 
| 
       67 
     | 
    
         
            -
            dcicutils-8.4.0. 
     | 
| 
       68 
     | 
    
         
            -
            dcicutils-8.4.0. 
     | 
| 
      
 64 
     | 
    
         
            +
            dcicutils-8.4.0.1b11.dist-info/LICENSE.txt,sha256=t0_-jIjqxNnymZoNJe-OltRIuuF8qfhN0ATlHyrUJPk,1102
         
     | 
| 
      
 65 
     | 
    
         
            +
            dcicutils-8.4.0.1b11.dist-info/METADATA,sha256=Uxe75Y_H7TDmO4UlOuw_VsaPcC7UEoxpS58zn8EjHQE,3315
         
     | 
| 
      
 66 
     | 
    
         
            +
            dcicutils-8.4.0.1b11.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
         
     | 
| 
      
 67 
     | 
    
         
            +
            dcicutils-8.4.0.1b11.dist-info/entry_points.txt,sha256=8wbw5csMIgBXhkwfgsgJeuFcoUc0WsucUxmOyml2aoA,209
         
     | 
| 
      
 68 
     | 
    
         
            +
            dcicutils-8.4.0.1b11.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |