albert 1.9.6__tar.gz → 1.10.0rc1__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.
- {albert-1.9.6 → albert-1.10.0rc1}/.circleci/config.yml +26 -0
- {albert-1.9.6 → albert-1.10.0rc1}/PKG-INFO +2 -1
- {albert-1.9.6 → albert-1.10.0rc1}/mkdocs.yml +0 -1
- {albert-1.9.6 → albert-1.10.0rc1}/pyproject.toml +1 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/__init__.py +1 -1
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/attachments.py +25 -8
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/custom_templates.py +0 -3
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/data_templates.py +168 -5
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/entity_types.py +5 -21
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/parameters.py +0 -1
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/property_data.py +2 -4
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/reports.py +0 -4
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/tasks.py +265 -192
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/worksheets.py +0 -3
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/attachments.py +8 -2
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/data_templates.py +77 -8
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/notes.py +5 -3
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/tasks.py +159 -0
- albert-1.10.0rc1/src/albert/resources/worker_jobs.py +60 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/utils/_patch.py +44 -1
- albert-1.10.0rc1/src/albert/utils/data_template.py +436 -0
- albert-1.10.0rc1/src/albert/utils/tasks.py +555 -0
- {albert-1.9.6 → albert-1.10.0rc1}/.gitignore +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/.pre-commit-config.yaml +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/.vscode/settings.json +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/CHANGELOG.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/CONTRIBUTING.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/LICENSE +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/README.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/CONTRIBUTING.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/albert.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/assets/Vector_Favicon_Blue.svg +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/assets/Wordmark_Black.png +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/assets/Wordmark_White.png +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/authentication.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/activities.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/attachments.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/base.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/batch_data.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/btdataset.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/btinsight.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/btmodel.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/cas.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/companies.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/custom_fields.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/custom_templates.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/data_columns.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/data_templates.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/entity_types.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/files.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/hazards.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/inventory.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/links.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/lists.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/locations.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/lots.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/notebooks.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/notes.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/parameter_groups.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/parameters.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/pricings.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/product_design.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/projects.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/property_data.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/reports.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/roles.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/storage_classes.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/storage_locations.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/substances.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/tags.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/tasks.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/un_numbers.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/units.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/users.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/workflows.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/collections/worksheets.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/concepts.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/configuration.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/credentials.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/index.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/installation.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/migration.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/activities.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/attachments.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/batch_data.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/btdataset.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/btinsight.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/btmodel.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/cas.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/companies.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/custom_fields.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/custom_templates.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/data_columns.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/data_templates.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/entity_types.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/files.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/hazards.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/identifiers.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/inventory.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/links.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/lists.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/locations.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/lots.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/notebooks.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/notes.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/parameter_groups.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/parameters.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/pricings.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/product_design.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/projects.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/property_data.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/reports.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/roles.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/sheets.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/storage_classes.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/storage_locations.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/substances.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/tags.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/tasks.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/un_numbers.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/units.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/users.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/workflows.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/resources/worksheets.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/sso.md +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/docs/styles/extra.css +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/scripts/validate_release_tag.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/scripts/validate_version_bump.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/setup.sh +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/client.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/activities.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/base.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/batch_data.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/btdataset.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/btinsight.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/btmodel.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/cas.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/companies.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/custom_fields.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/data_columns.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/files.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/hazards.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/inventory.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/links.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/lists.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/lots.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/notebooks.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/notes.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/parameter_groups.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/pricings.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/product_design.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/projects.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/report_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/roles.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/storage_classes.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/storage_locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/substance.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/tags.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/un_numbers.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/units.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/users.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/collections/workflows.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/auth/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/auth/_listener.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/auth/_manager.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/auth/credentials.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/auth/sso.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/base.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/logging.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/pagination.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/session.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/enums.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/identifiers.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/models/base.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/models/patch.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/core/shared/types.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/exceptions.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/_mixins.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/acls.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/activities.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/batch_data.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/btdataset.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/btinsight.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/btmodel.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/cas.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/companies.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/custom_fields.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/custom_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/data_columns.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/entity_types.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/facet.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/files.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/hazards.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/inventory.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/links.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/lists.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/lots.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/notebooks.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/parameter_groups.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/parameters.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/pricings.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/product_design.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/projects.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/property_data.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/report_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/reports.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/roles.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/sheets.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/storage_classes.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/storage_locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/substance.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/tagged_base.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/tags.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/un_numbers.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/units.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/users.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/workflows.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/resources/worksheets.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/utils/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/utils/_auth.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/src/albert/utils/inventory.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_activities.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_attachments.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_batch_data.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_btdataset.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_btinsight.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_btmodel.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_cas.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_company.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_custom_fields.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_custom_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_data_columns.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_data_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_entity_types.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_files.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_hazards.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_inventory.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_links.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_lists.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_lots.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_notebooks.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_notes.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_parameter_groups.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_parameters.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_pricings.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_product_design.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_projects.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_property_data.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_report_templates.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_reports.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_roles.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_storage_classes.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_storage_locations.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_substance.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_tags.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_tasks.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_un_number.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_units.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_users.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_workflows.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/collections/test_worksheet.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/conftest.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/core/shared/__init__.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/core/shared/test_identifiers.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/core/shared/test_types.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/core/test_auth.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/data/SDS_HCL.pdf +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/data/dontpanic.jpg +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/resources/test_inventory.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/resources/test_lots.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/resources/test_notebooks.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/resources/test_sheets.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/seeding.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/utils/fake_session.py +0 -0
- {albert-1.9.6 → albert-1.10.0rc1}/tests/utils/test_patches.py +0 -0
|
@@ -12,6 +12,29 @@ commands:
|
|
|
12
12
|
command: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
13
13
|
|
|
14
14
|
jobs:
|
|
15
|
+
snyk_app_scan:
|
|
16
|
+
executor:
|
|
17
|
+
name: python/default
|
|
18
|
+
tag: "3.10.15"
|
|
19
|
+
steps:
|
|
20
|
+
- checkout
|
|
21
|
+
- add_ssh_keys:
|
|
22
|
+
fingerprints:
|
|
23
|
+
- "SHA256:8xP/cfKKsXJOx9XDojfxU3nx9NRtDCEVSVm0uL6qL5I"
|
|
24
|
+
- install_uv
|
|
25
|
+
- run:
|
|
26
|
+
name: Export dependencies
|
|
27
|
+
command: |
|
|
28
|
+
uv sync
|
|
29
|
+
uv export > requirements_lock.txt
|
|
30
|
+
uv pip compile requirements_lock.txt > requirements.txt
|
|
31
|
+
uv pip install --system -r requirements.txt
|
|
32
|
+
- snyk/scan:
|
|
33
|
+
fail-on-issues: true
|
|
34
|
+
monitor-on-build: true
|
|
35
|
+
severity-threshold: high
|
|
36
|
+
token-variable: SNYK_TOKEN
|
|
37
|
+
|
|
15
38
|
test:
|
|
16
39
|
executor:
|
|
17
40
|
name: python/default
|
|
@@ -136,6 +159,9 @@ jobs:
|
|
|
136
159
|
workflows:
|
|
137
160
|
main:
|
|
138
161
|
jobs:
|
|
162
|
+
- snyk_app_scan:
|
|
163
|
+
name: Snyk App Scan
|
|
164
|
+
context: dev
|
|
139
165
|
- test:
|
|
140
166
|
name: Test
|
|
141
167
|
context: dev
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: albert
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.10.0rc1
|
|
4
4
|
Summary: The official Python SDK for the Albert Invent platform.
|
|
5
5
|
Project-URL: Homepage, https://www.albertinvent.com/
|
|
6
6
|
Project-URL: Documentation, https://docs.developer.albertinvent.com/albert-python
|
|
@@ -220,6 +220,7 @@ Requires-Dist: pandas<3,>=2.2.2
|
|
|
220
220
|
Requires-Dist: pydantic[email]<3,>=2.8.2
|
|
221
221
|
Requires-Dist: pyjwt<3,>=2.10.0
|
|
222
222
|
Requires-Dist: requests<3,>=2.32.3
|
|
223
|
+
Requires-Dist: tenacity>=8.2.3
|
|
223
224
|
Description-Content-Type: text/markdown
|
|
224
225
|
|
|
225
226
|
# Albert Python SDK
|
|
@@ -9,7 +9,7 @@ from pydantic import validate_call
|
|
|
9
9
|
from albert.collections.base import BaseCollection
|
|
10
10
|
from albert.collections.files import FileCollection
|
|
11
11
|
from albert.collections.notes import NotesCollection
|
|
12
|
-
from albert.core.shared.identifiers import AttachmentId, InventoryId
|
|
12
|
+
from albert.core.shared.identifiers import AttachmentId, DataColumnId, InventoryId
|
|
13
13
|
from albert.core.shared.types import MetadataItem
|
|
14
14
|
from albert.resources.attachments import Attachment, AttachmentCategory
|
|
15
15
|
from albert.resources.files import FileCategory, FileNamespace
|
|
@@ -49,7 +49,9 @@ class AttachmentCollection(BaseCollection):
|
|
|
49
49
|
response = self.session.get(url=f"{self.base_path}/{id}")
|
|
50
50
|
return Attachment(**response.json())
|
|
51
51
|
|
|
52
|
-
def get_by_parent_ids(
|
|
52
|
+
def get_by_parent_ids(
|
|
53
|
+
self, *, parent_ids: list[str], data_column_ids: list[DataColumnId] | None = None
|
|
54
|
+
) -> dict[str, list[Attachment]]:
|
|
53
55
|
"""Retrieves attachments by their parent IDs.
|
|
54
56
|
|
|
55
57
|
Note: This method returns a dictionary where the keys are parent IDs
|
|
@@ -69,7 +71,10 @@ class AttachmentCollection(BaseCollection):
|
|
|
69
71
|
dict[str, list[Attachment]]
|
|
70
72
|
A dictionary mapping parent IDs to lists of Attachment objects associated with each parent ID.
|
|
71
73
|
"""
|
|
72
|
-
response = self.session.get(
|
|
74
|
+
response = self.session.get(
|
|
75
|
+
url=f"{self.base_path}/parents",
|
|
76
|
+
params={"id": parent_ids, "dataColumnId": data_column_ids},
|
|
77
|
+
)
|
|
73
78
|
response_data = response.json()
|
|
74
79
|
return {
|
|
75
80
|
parent["parentId"]: [
|
|
@@ -125,7 +130,12 @@ class AttachmentCollection(BaseCollection):
|
|
|
125
130
|
self.session.delete(f"{self.base_path}/{id}")
|
|
126
131
|
|
|
127
132
|
def upload_and_attach_file_as_note(
|
|
128
|
-
self,
|
|
133
|
+
self,
|
|
134
|
+
parent_id: str,
|
|
135
|
+
file_data: IO,
|
|
136
|
+
note_text: str = "",
|
|
137
|
+
file_name: str = "",
|
|
138
|
+
upload_key: str | None = None,
|
|
129
139
|
) -> Note:
|
|
130
140
|
"""Uploads a file and attaches it to a new note. A user can be tagged in the note_text string by using f-string and the User.to_note_mention() method.
|
|
131
141
|
This allows for easy tagging and referencing of users within notes. example: f"Hello {tagged_user.to_note_mention()}!"
|
|
@@ -140,24 +150,31 @@ class AttachmentCollection(BaseCollection):
|
|
|
140
150
|
Any additional text to add to the note, by default ""
|
|
141
151
|
file_name : str, optional
|
|
142
152
|
The name of the file, by default ""
|
|
153
|
+
upload_key : str | None, optional
|
|
154
|
+
Override the storage key used when signing and uploading the file.
|
|
155
|
+
Defaults to the provided ``file_name``.
|
|
143
156
|
|
|
144
157
|
Returns
|
|
145
158
|
-------
|
|
146
159
|
Note
|
|
147
160
|
The created note.
|
|
148
161
|
"""
|
|
149
|
-
|
|
162
|
+
upload_name = upload_key or file_name
|
|
163
|
+
if not upload_name:
|
|
164
|
+
raise ValueError("A file name or upload key must be provided for attachment upload.")
|
|
165
|
+
|
|
166
|
+
file_type = mimetypes.guess_type(file_name or upload_name)[0]
|
|
150
167
|
file_collection = self._get_file_collection()
|
|
151
168
|
note_collection = self._get_note_collection()
|
|
152
169
|
|
|
153
170
|
file_collection.sign_and_upload_file(
|
|
154
171
|
data=file_data,
|
|
155
|
-
name=
|
|
172
|
+
name=upload_name,
|
|
156
173
|
namespace=FileNamespace.RESULT.value,
|
|
157
174
|
content_type=file_type,
|
|
158
175
|
)
|
|
159
176
|
file_info = file_collection.get_by_name(
|
|
160
|
-
name=
|
|
177
|
+
name=upload_name, namespace=FileNamespace.RESULT.value
|
|
161
178
|
)
|
|
162
179
|
note = Note(
|
|
163
180
|
parent_id=parent_id,
|
|
@@ -166,7 +183,7 @@ class AttachmentCollection(BaseCollection):
|
|
|
166
183
|
registered_note = note_collection.create(note=note)
|
|
167
184
|
self.attach_file_to_note(
|
|
168
185
|
note_id=registered_note.id,
|
|
169
|
-
file_name=file_name,
|
|
186
|
+
file_name=file_name or Path(upload_name).name,
|
|
170
187
|
file_key=file_info.name,
|
|
171
188
|
)
|
|
172
189
|
return note_collection.get_by_id(id=registered_note.id)
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from collections.abc import Iterator
|
|
2
2
|
|
|
3
|
-
from pydantic import validate_call
|
|
4
|
-
|
|
5
3
|
from albert.collections.base import BaseCollection
|
|
6
4
|
from albert.core.logging import logger
|
|
7
5
|
from albert.core.pagination import AlbertPaginator
|
|
@@ -30,7 +28,6 @@ class CustomTemplatesCollection(BaseCollection):
|
|
|
30
28
|
super().__init__(session=session)
|
|
31
29
|
self.base_path = f"/api/{CustomTemplatesCollection._api_version}/customtemplates"
|
|
32
30
|
|
|
33
|
-
@validate_call
|
|
34
31
|
def get_by_id(self, *, id: CustomTemplateId) -> CustomTemplate:
|
|
35
32
|
"""Get a Custom Template by ID
|
|
36
33
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
from collections.abc import Iterator
|
|
2
2
|
from itertools import islice
|
|
3
|
+
from pathlib import Path
|
|
3
4
|
|
|
4
5
|
from pydantic import Field, validate_call
|
|
5
6
|
|
|
7
|
+
from albert.collections.attachments import AttachmentCollection
|
|
6
8
|
from albert.collections.base import BaseCollection
|
|
9
|
+
from albert.collections.files import FileCollection
|
|
7
10
|
from albert.core.logging import logger
|
|
8
11
|
from albert.core.pagination import AlbertPaginator
|
|
9
12
|
from albert.core.session import AlbertSession
|
|
10
13
|
from albert.core.shared.enums import OrderBy, PaginationMode
|
|
11
|
-
from albert.core.shared.identifiers import DataTemplateId, UserId
|
|
14
|
+
from albert.core.shared.identifiers import AttachmentId, DataColumnId, DataTemplateId, UserId
|
|
12
15
|
from albert.core.shared.models.patch import (
|
|
13
16
|
GeneralPatchDatum,
|
|
14
17
|
GeneralPatchPayload,
|
|
@@ -23,7 +26,19 @@ from albert.resources.data_templates import (
|
|
|
23
26
|
ParameterValue,
|
|
24
27
|
)
|
|
25
28
|
from albert.resources.parameter_groups import DataType, EnumValidationValue, ValueValidation
|
|
29
|
+
from albert.resources.tasks import ImportMode
|
|
26
30
|
from albert.utils._patch import generate_data_template_patches
|
|
31
|
+
from albert.utils.data_template import (
|
|
32
|
+
build_curve_import_patch_payload,
|
|
33
|
+
create_curve_import_job,
|
|
34
|
+
derive_curve_csv_mapping,
|
|
35
|
+
exec_curve_script,
|
|
36
|
+
get_script_attachment,
|
|
37
|
+
get_target_data_column,
|
|
38
|
+
prepare_curve_input_attachment,
|
|
39
|
+
validate_data_column_type,
|
|
40
|
+
)
|
|
41
|
+
from albert.utils.tasks import CSV_EXTENSIONS, fetch_csv_table_rows
|
|
27
42
|
|
|
28
43
|
|
|
29
44
|
class DCPatchDatum(PGPatchPayload):
|
|
@@ -83,6 +98,158 @@ class DataTemplateCollection(BaseCollection):
|
|
|
83
98
|
return self.add_parameters(data_template_id=dt.id, parameters=parameter_values)
|
|
84
99
|
|
|
85
100
|
@validate_call
|
|
101
|
+
def import_curve_data(
|
|
102
|
+
self,
|
|
103
|
+
*,
|
|
104
|
+
data_template_id: DataTemplateId,
|
|
105
|
+
data_column_id: DataColumnId | None = None,
|
|
106
|
+
data_column_name: str | None = None,
|
|
107
|
+
mode: ImportMode = ImportMode.CSV,
|
|
108
|
+
field_mapping: dict[str, str] | None = None,
|
|
109
|
+
file_path: str | Path | None = None,
|
|
110
|
+
attachment_id: AttachmentId | None = None,
|
|
111
|
+
) -> DataTemplate:
|
|
112
|
+
"""Import curve data in a data template column.
|
|
113
|
+
|
|
114
|
+
Parameters
|
|
115
|
+
----------
|
|
116
|
+
data_template_id : DataTemplateId
|
|
117
|
+
Target data template Id.
|
|
118
|
+
data_column_id : DataColumnId | None, optional
|
|
119
|
+
Specific data column to upload the curve data to. Provide exactly one of ``data_column_id`` or
|
|
120
|
+
``data_column_name``.
|
|
121
|
+
data_column_name : str | None, optional
|
|
122
|
+
Case-insensitive data column display name. Provide exactly one of the column
|
|
123
|
+
identifier or name.
|
|
124
|
+
mode : ImportMode, optional
|
|
125
|
+
Import mode. ``ImportMode.SCRIPT`` runs the attached automation script and requires
|
|
126
|
+
a script attachment on the data template; ``ImportMode.CSV`` ingests the
|
|
127
|
+
uploaded CSV directly. Defaults to ``ImportMode.CSV``.
|
|
128
|
+
field_mapping : dict[str, str] | None, optional
|
|
129
|
+
Optional manual mapping from CSV headers to curve result column names on the target column. Example: ``{"visc": "Viscosity"}`` maps the
|
|
130
|
+
"visc" CSV header to the "Viscosity" curve result column. Mappings are matched
|
|
131
|
+
case-insensitively and override auto-detection. In ``ImportMode.SCRIPT`` this applies to the headers emitted by the script before ingestion.
|
|
132
|
+
attachment_id : AttachmentId | None, optional
|
|
133
|
+
Existing attachment to use. Exactly one of ``attachment_id`` or ``file_path`` must be provided.
|
|
134
|
+
file_path : str | Path | None, optional
|
|
135
|
+
Local file to upload and attach to a new note on the data template. Exactly one of
|
|
136
|
+
``attachment_id`` or ``file_path`` must be provided.
|
|
137
|
+
Returns
|
|
138
|
+
-------
|
|
139
|
+
DataTemplate
|
|
140
|
+
The data template refreshed after the curve import job completes.
|
|
141
|
+
|
|
142
|
+
Examples
|
|
143
|
+
--------
|
|
144
|
+
!!! example "Import curve data from a CSV file"
|
|
145
|
+
```python
|
|
146
|
+
dt = client.data_templates.import_curve_data(
|
|
147
|
+
data_template_id="DT123",
|
|
148
|
+
data_column_name="APHA Color",
|
|
149
|
+
mode=ImportMode.CSV,
|
|
150
|
+
file_path="path/to/curve.csv",
|
|
151
|
+
field_mapping={"visc": "Viscosity"},
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
"""
|
|
155
|
+
data_template = self.get_by_id(id=data_template_id)
|
|
156
|
+
target_column = get_target_data_column(
|
|
157
|
+
data_template=data_template,
|
|
158
|
+
data_template_id=data_template_id,
|
|
159
|
+
data_column_id=data_column_id,
|
|
160
|
+
data_column_name=data_column_name,
|
|
161
|
+
)
|
|
162
|
+
validate_data_column_type(target_column=target_column)
|
|
163
|
+
column_id = target_column.data_column_id
|
|
164
|
+
attachment_collection = AttachmentCollection(session=self.session)
|
|
165
|
+
|
|
166
|
+
script_attachment_signed_url: str | None = None
|
|
167
|
+
|
|
168
|
+
if mode is ImportMode.SCRIPT:
|
|
169
|
+
script_attachment, script_extensions = get_script_attachment(
|
|
170
|
+
attachment_collection=attachment_collection,
|
|
171
|
+
data_template_id=data_template_id,
|
|
172
|
+
column_id=column_id,
|
|
173
|
+
)
|
|
174
|
+
if not script_extensions:
|
|
175
|
+
raise ValueError("Script attachment must define allowed extensions.")
|
|
176
|
+
script_attachment_signed_url = script_attachment.signed_url
|
|
177
|
+
allowed_extensions = set(script_extensions)
|
|
178
|
+
else:
|
|
179
|
+
allowed_extensions = set(CSV_EXTENSIONS)
|
|
180
|
+
raw_attachment = prepare_curve_input_attachment(
|
|
181
|
+
attachment_collection=attachment_collection,
|
|
182
|
+
data_template_id=data_template_id,
|
|
183
|
+
column_id=column_id,
|
|
184
|
+
allowed_extensions=allowed_extensions,
|
|
185
|
+
file_path=file_path,
|
|
186
|
+
attachment_id=attachment_id,
|
|
187
|
+
require_signed_url=mode is ImportMode.SCRIPT,
|
|
188
|
+
)
|
|
189
|
+
raw_key = raw_attachment.key
|
|
190
|
+
if raw_attachment.id is None:
|
|
191
|
+
raise ValueError("Curve input attachment did not return an identifier.")
|
|
192
|
+
resolved_attachment_id = AttachmentId(raw_attachment.id)
|
|
193
|
+
|
|
194
|
+
processed_input_key: str = raw_key
|
|
195
|
+
column_headers: dict[str, str] = {}
|
|
196
|
+
|
|
197
|
+
if mode is ImportMode.SCRIPT:
|
|
198
|
+
file_collection = FileCollection(session=self.session)
|
|
199
|
+
processed_input_key, column_headers = exec_curve_script(
|
|
200
|
+
session=self.session,
|
|
201
|
+
api_version=self._api_version,
|
|
202
|
+
data_template_id=data_template_id,
|
|
203
|
+
column_id=column_id,
|
|
204
|
+
raw_attachment=raw_attachment,
|
|
205
|
+
file_collection=file_collection,
|
|
206
|
+
script_attachment_signed_url=script_attachment_signed_url,
|
|
207
|
+
)
|
|
208
|
+
else:
|
|
209
|
+
table_rows = fetch_csv_table_rows(
|
|
210
|
+
session=self.session,
|
|
211
|
+
attachment_id=resolved_attachment_id,
|
|
212
|
+
headers_only=True,
|
|
213
|
+
)
|
|
214
|
+
header_row = table_rows[0]
|
|
215
|
+
if not isinstance(header_row, dict):
|
|
216
|
+
raise ValueError("Unexpected CSV header format returned by preview endpoint.")
|
|
217
|
+
column_headers = {
|
|
218
|
+
key: value
|
|
219
|
+
for key, value in header_row.items()
|
|
220
|
+
if isinstance(key, str) and isinstance(value, str) and value
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
csv_mapping = derive_curve_csv_mapping(
|
|
224
|
+
target_column=target_column,
|
|
225
|
+
column_headers=column_headers,
|
|
226
|
+
field_mapping=field_mapping,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
job_id, partition_uuid, s3_output_key = create_curve_import_job(
|
|
230
|
+
session=self.session,
|
|
231
|
+
data_template_id=data_template_id,
|
|
232
|
+
column_id=column_id,
|
|
233
|
+
csv_mapping=csv_mapping,
|
|
234
|
+
raw_attachment=raw_attachment,
|
|
235
|
+
processed_input_key=processed_input_key,
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
patch_payload = build_curve_import_patch_payload(
|
|
239
|
+
target_column=target_column,
|
|
240
|
+
job_id=job_id,
|
|
241
|
+
csv_mapping=csv_mapping,
|
|
242
|
+
raw_attachment=raw_attachment,
|
|
243
|
+
partition_uuid=partition_uuid,
|
|
244
|
+
s3_output_key=s3_output_key,
|
|
245
|
+
)
|
|
246
|
+
self.session.patch(
|
|
247
|
+
f"{self.base_path}/{data_template_id}",
|
|
248
|
+
json=patch_payload.model_dump(by_alias=True, mode="json", exclude_none=True),
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
return self.get_by_id(id=data_template_id)
|
|
252
|
+
|
|
86
253
|
def _add_param_enums(
|
|
87
254
|
self,
|
|
88
255
|
*,
|
|
@@ -196,7 +363,6 @@ class DataTemplateCollection(BaseCollection):
|
|
|
196
363
|
response = self.session.get(f"{self.base_path}/{id}")
|
|
197
364
|
return DataTemplate(**response.json())
|
|
198
365
|
|
|
199
|
-
@validate_call
|
|
200
366
|
def get_by_ids(self, *, ids: list[DataTemplateId]) -> list[DataTemplate]:
|
|
201
367
|
"""Get a list of data templates by their IDs.
|
|
202
368
|
|
|
@@ -236,7 +402,6 @@ class DataTemplateCollection(BaseCollection):
|
|
|
236
402
|
return t.hydrate()
|
|
237
403
|
return None
|
|
238
404
|
|
|
239
|
-
@validate_call
|
|
240
405
|
def add_data_columns(
|
|
241
406
|
self, *, data_template_id: DataTemplateId, data_columns: list[DataColumnValue]
|
|
242
407
|
) -> DataTemplate:
|
|
@@ -280,7 +445,6 @@ class DataTemplateCollection(BaseCollection):
|
|
|
280
445
|
)
|
|
281
446
|
return self.get_by_id(id=data_template_id)
|
|
282
447
|
|
|
283
|
-
@validate_call
|
|
284
448
|
def add_parameters(
|
|
285
449
|
self, *, data_template_id: DataTemplateId, parameters: list[ParameterValue]
|
|
286
450
|
) -> DataTemplate:
|
|
@@ -559,7 +723,6 @@ class DataTemplateCollection(BaseCollection):
|
|
|
559
723
|
)
|
|
560
724
|
return self.get_by_id(id=data_template.id)
|
|
561
725
|
|
|
562
|
-
@validate_call
|
|
563
726
|
def delete(self, *, id: DataTemplateId) -> None:
|
|
564
727
|
"""Deletes a data template by its ID.
|
|
565
728
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from collections.abc import Iterator
|
|
2
2
|
|
|
3
|
-
from pydantic import validate_call
|
|
4
|
-
|
|
5
3
|
from albert.collections.base import BaseCollection
|
|
6
4
|
from albert.core.pagination import AlbertPaginator, PaginationMode
|
|
7
5
|
from albert.core.session import AlbertSession
|
|
@@ -43,7 +41,6 @@ class EntityTypeCollection(BaseCollection):
|
|
|
43
41
|
super().__init__(session=session)
|
|
44
42
|
self.base_path = f"/api/{EntityTypeCollection._api_version}/entitytypes"
|
|
45
43
|
|
|
46
|
-
@validate_call
|
|
47
44
|
def get_by_id(self, *, id: EntityTypeId) -> EntityType:
|
|
48
45
|
"""Get an entity type by its ID.
|
|
49
46
|
Parameters
|
|
@@ -118,14 +115,8 @@ class EntityTypeCollection(BaseCollection):
|
|
|
118
115
|
PatchDatum(
|
|
119
116
|
operation=PatchOperation.UPDATE,
|
|
120
117
|
attribute="customFields",
|
|
121
|
-
new_value=[
|
|
122
|
-
|
|
123
|
-
for x in updated.custom_fields
|
|
124
|
-
],
|
|
125
|
-
old_value=[
|
|
126
|
-
x.model_dump(by_alias=True, exclude_none=True)
|
|
127
|
-
for x in existing.custom_fields
|
|
128
|
-
],
|
|
118
|
+
new_value=[x.model_dump(by_alias=True) for x in updated.custom_fields],
|
|
119
|
+
old_value=[x.model_dump(by_alias=True) for x in existing.custom_fields],
|
|
129
120
|
)
|
|
130
121
|
)
|
|
131
122
|
if updated.custom_fields is not None and existing.custom_fields is None:
|
|
@@ -133,10 +124,7 @@ class EntityTypeCollection(BaseCollection):
|
|
|
133
124
|
PatchDatum(
|
|
134
125
|
operation=PatchOperation.ADD,
|
|
135
126
|
attribute="customFields",
|
|
136
|
-
new_value=[
|
|
137
|
-
x.model_dump(by_alias=True, exclude_none=True)
|
|
138
|
-
for x in updated.custom_fields
|
|
139
|
-
],
|
|
127
|
+
new_value=[x.model_dump(by_alias=True) for x in updated.custom_fields],
|
|
140
128
|
)
|
|
141
129
|
)
|
|
142
130
|
|
|
@@ -206,7 +194,6 @@ class EntityTypeCollection(BaseCollection):
|
|
|
206
194
|
|
|
207
195
|
return patches
|
|
208
196
|
|
|
209
|
-
@validate_call
|
|
210
197
|
def delete(self, *, id: EntityTypeId) -> None:
|
|
211
198
|
"""Delete an entity type.
|
|
212
199
|
Parameters
|
|
@@ -216,7 +203,6 @@ class EntityTypeCollection(BaseCollection):
|
|
|
216
203
|
"""
|
|
217
204
|
self.session.delete(f"{self.base_path}/{id}")
|
|
218
205
|
|
|
219
|
-
@validate_call
|
|
220
206
|
def get_rules(self, *, id: EntityTypeId) -> list[EntityTypeRule]:
|
|
221
207
|
"""Get the rules for an entity type.
|
|
222
208
|
Parameters
|
|
@@ -227,7 +213,6 @@ class EntityTypeCollection(BaseCollection):
|
|
|
227
213
|
response = self.session.get(f"{self.base_path}/rules/{id}")
|
|
228
214
|
return [EntityTypeRule(**rule) for rule in response.json()]
|
|
229
215
|
|
|
230
|
-
@validate_call
|
|
231
216
|
def set_rules(self, *, id: EntityTypeId, rules: list[EntityTypeRule]) -> list[EntityTypeRule]:
|
|
232
217
|
"""Create or update the rules for an entity type.
|
|
233
218
|
Parameters
|
|
@@ -247,7 +232,6 @@ class EntityTypeCollection(BaseCollection):
|
|
|
247
232
|
)
|
|
248
233
|
return [EntityTypeRule(**rule) for rule in response.json()]
|
|
249
234
|
|
|
250
|
-
@validate_call
|
|
251
235
|
def delete_rules(self, *, id: EntityTypeId) -> None:
|
|
252
236
|
"""Delete the rules for an entity type.
|
|
253
237
|
Parameters
|
|
@@ -270,12 +254,12 @@ class EntityTypeCollection(BaseCollection):
|
|
|
270
254
|
----------
|
|
271
255
|
service : EntityServiceType | None, optional
|
|
272
256
|
The service type the entity type is associated with, by default None
|
|
273
|
-
limit : int, optional
|
|
274
|
-
Maximum number of results to return, by default 100
|
|
275
257
|
start_key : str | None, optional
|
|
276
258
|
Key to start pagination from, by default None
|
|
277
259
|
order : OrderBy | None, optional
|
|
278
260
|
Sort order (ascending/descending), by default None
|
|
261
|
+
max_items : int | None, optional
|
|
262
|
+
Maximum number of items to return, by default None
|
|
279
263
|
Yields
|
|
280
264
|
------
|
|
281
265
|
Iterator[EntityType]
|
|
@@ -7,7 +7,6 @@ import pandas as pd
|
|
|
7
7
|
from pydantic import validate_call
|
|
8
8
|
|
|
9
9
|
from albert.collections.base import BaseCollection
|
|
10
|
-
from albert.collections.tasks import TaskCollection
|
|
11
10
|
from albert.core.logging import logger
|
|
12
11
|
from albert.core.pagination import AlbertPaginator
|
|
13
12
|
from albert.core.session import AlbertSession
|
|
@@ -65,6 +64,8 @@ class PropertyDataCollection(BaseCollection):
|
|
|
65
64
|
|
|
66
65
|
@validate_call
|
|
67
66
|
def _get_task_from_id(self, *, id: TaskId) -> PropertyTask:
|
|
67
|
+
from albert.collections.tasks import TaskCollection
|
|
68
|
+
|
|
68
69
|
return TaskCollection(session=self.session).get_by_id(id=id)
|
|
69
70
|
|
|
70
71
|
@validate_call
|
|
@@ -309,7 +310,6 @@ class PropertyDataCollection(BaseCollection):
|
|
|
309
310
|
)
|
|
310
311
|
return all_info
|
|
311
312
|
|
|
312
|
-
@validate_call
|
|
313
313
|
def _resolve_return_scope(
|
|
314
314
|
self,
|
|
315
315
|
*,
|
|
@@ -553,7 +553,6 @@ class PropertyDataCollection(BaseCollection):
|
|
|
553
553
|
lot_id=lot_id,
|
|
554
554
|
)
|
|
555
555
|
|
|
556
|
-
@validate_call
|
|
557
556
|
def bulk_load_task_properties(
|
|
558
557
|
self,
|
|
559
558
|
*,
|
|
@@ -677,7 +676,6 @@ class PropertyDataCollection(BaseCollection):
|
|
|
677
676
|
return_scope=return_scope,
|
|
678
677
|
)
|
|
679
678
|
|
|
680
|
-
@validate_call
|
|
681
679
|
def bulk_delete_task_data(
|
|
682
680
|
self,
|
|
683
681
|
*,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
from pydantic import validate_call
|
|
4
|
-
|
|
5
3
|
from albert.collections.base import BaseCollection
|
|
6
4
|
from albert.core.session import AlbertSession
|
|
7
5
|
from albert.core.shared.identifiers import ReportId
|
|
@@ -138,7 +136,6 @@ class ReportCollection(BaseCollection):
|
|
|
138
136
|
input_data=input_data,
|
|
139
137
|
)
|
|
140
138
|
|
|
141
|
-
@validate_call
|
|
142
139
|
def get_full_report(self, *, report_id: ReportId) -> FullAnalyticalReport:
|
|
143
140
|
"""Get a full analytical report by its ID.
|
|
144
141
|
|
|
@@ -195,7 +192,6 @@ class ReportCollection(BaseCollection):
|
|
|
195
192
|
response = self.session.post(path, json=report_data)
|
|
196
193
|
return FullAnalyticalReport(**response.json())
|
|
197
194
|
|
|
198
|
-
@validate_call
|
|
199
195
|
def delete(self, *, id: ReportId) -> None:
|
|
200
196
|
"""Delete a report.
|
|
201
197
|
|