spinta 0.2.dev26__py3-none-any.whl → 0.2.dev28__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.
- spinta/accesslog/__init__.py +2 -10
- spinta/accesslog/file.py +3 -6
- spinta/accesslog/python.py +1 -2
- spinta/adapters/soap_plugins.py +2 -2
- spinta/api/__init__.py +44 -30
- spinta/api/inspect.py +7 -8
- spinta/api/schema.py +9 -9
- spinta/api/validators.py +2 -2
- spinta/asgi.py +1 -1
- spinta/auth.py +19 -25
- spinta/backends/__init__.py +46 -59
- spinta/backends/components.py +2 -5
- spinta/backends/fs/commands/bootstrap.py +1 -1
- spinta/backends/fs/commands/changes.py +1 -1
- spinta/backends/fs/commands/decode.py +2 -2
- spinta/backends/fs/commands/encode.py +1 -1
- spinta/backends/fs/commands/init.py +3 -3
- spinta/backends/fs/commands/load.py +2 -2
- spinta/backends/fs/commands/migrate.py +1 -1
- spinta/backends/fs/commands/read.py +4 -7
- spinta/backends/fs/commands/validate.py +5 -5
- spinta/backends/fs/commands/wait.py +1 -1
- spinta/backends/fs/commands/wipe.py +1 -1
- spinta/backends/fs/commands/write.py +6 -8
- spinta/backends/helpers.py +6 -19
- spinta/backends/memory/commands/bootstrap.py +1 -1
- spinta/backends/memory/commands/init.py +2 -2
- spinta/backends/memory/commands/load.py +2 -2
- spinta/backends/memory/commands/read.py +4 -5
- spinta/backends/memory/commands/wait.py +1 -1
- spinta/backends/memory/commands/wipe.py +1 -2
- spinta/backends/memory/components.py +2 -3
- spinta/backends/mongo/commands/bootstrap.py +1 -1
- spinta/backends/mongo/commands/changes.py +2 -2
- spinta/backends/mongo/commands/encode.py +1 -1
- spinta/backends/mongo/commands/init.py +1 -1
- spinta/backends/mongo/commands/load.py +1 -1
- spinta/backends/mongo/commands/migrate.py +1 -1
- spinta/backends/mongo/commands/read.py +3 -7
- spinta/backends/mongo/commands/validate.py +2 -2
- spinta/backends/mongo/commands/wait.py +1 -1
- spinta/backends/mongo/commands/wipe.py +1 -1
- spinta/backends/mongo/commands/write.py +4 -5
- spinta/backends/mongo/components.py +1 -2
- spinta/backends/mongo/helpers.py +1 -1
- spinta/backends/mongo/types/array/write.py +4 -4
- spinta/backends/mongo/types/file/write.py +4 -4
- spinta/backends/mongo/types/object/write.py +2 -2
- spinta/backends/mongo/ufuncs/components.py +3 -3
- spinta/backends/mongo/ufuncs/ufuncs.py +5 -16
- spinta/backends/nobackend/commands/load.py +1 -1
- spinta/backends/nobackend/commands/read.py +3 -4
- spinta/backends/nobackend/commands/wait.py +1 -1
- spinta/backends/nobackend/commands/wipe.py +1 -2
- spinta/backends/nobackend/commands/write.py +3 -3
- spinta/backends/postgresql/commands/bootstrap.py +3 -3
- spinta/backends/postgresql/commands/changes.py +1 -1
- spinta/backends/postgresql/commands/column.py +5 -5
- spinta/backends/postgresql/commands/encode.py +3 -5
- spinta/backends/postgresql/commands/load.py +1 -1
- spinta/backends/postgresql/commands/migrate/migrate.py +6 -6
- spinta/backends/postgresql/commands/migrate/model.py +11 -11
- spinta/backends/postgresql/commands/migrate/property.py +1 -1
- spinta/backends/postgresql/commands/migrate/types/array.py +4 -4
- spinta/backends/postgresql/commands/migrate/types/datatype.py +13 -14
- spinta/backends/postgresql/commands/migrate/types/file.py +1 -1
- spinta/backends/postgresql/commands/migrate/types/object.py +3 -3
- spinta/backends/postgresql/commands/migrate/types/ref.py +16 -16
- spinta/backends/postgresql/commands/migrate/types/string.py +4 -4
- spinta/backends/postgresql/commands/migrate/types/text.py +2 -2
- spinta/backends/postgresql/commands/read.py +5 -8
- spinta/backends/postgresql/commands/redirect.py +1 -1
- spinta/backends/postgresql/commands/summary.py +8 -10
- spinta/backends/postgresql/commands/validate.py +1 -1
- spinta/backends/postgresql/commands/wait.py +1 -1
- spinta/backends/postgresql/commands/wipe.py +2 -2
- spinta/backends/postgresql/commands/write.py +4 -4
- spinta/backends/postgresql/components.py +5 -7
- spinta/backends/postgresql/files.py +1 -3
- spinta/backends/postgresql/helpers/__init__.py +1 -1
- spinta/backends/postgresql/helpers/changes.py +2 -3
- spinta/backends/postgresql/helpers/exceptions.py +4 -4
- spinta/backends/postgresql/helpers/migrate/actions.py +7 -3
- spinta/backends/postgresql/helpers/migrate/citus.py +5 -6
- spinta/backends/postgresql/helpers/migrate/migrate.py +13 -13
- spinta/backends/postgresql/helpers/migrate/name.py +1 -2
- spinta/backends/postgresql/helpers/name.py +1 -1
- spinta/backends/postgresql/helpers/type.py +1 -1
- spinta/backends/postgresql/helpers/validate.py +1 -1
- spinta/backends/postgresql/sqlalchemy.py +2 -4
- spinta/backends/postgresql/types/array/init.py +3 -4
- spinta/backends/postgresql/types/array/wipe.py +2 -2
- spinta/backends/postgresql/types/array/write.py +3 -4
- spinta/backends/postgresql/types/denorm/init.py +1 -1
- spinta/backends/postgresql/types/external_ref/init.py +3 -3
- spinta/backends/postgresql/types/file/init.py +5 -6
- spinta/backends/postgresql/types/file/read.py +6 -7
- spinta/backends/postgresql/types/file/write.py +8 -9
- spinta/backends/postgresql/types/geometry/encode.py +5 -10
- spinta/backends/postgresql/types/geometry/write.py +1 -1
- spinta/backends/postgresql/types/object/init.py +1 -1
- spinta/backends/postgresql/types/object/read.py +5 -10
- spinta/backends/postgresql/types/object/wipe.py +1 -1
- spinta/backends/postgresql/types/ref/init.py +1 -1
- spinta/backends/postgresql/types/ref/validate.py +2 -3
- spinta/backends/postgresql/types/text/init.py +1 -1
- spinta/backends/postgresql/ufuncs/query/components.py +5 -8
- spinta/backends/postgresql/ufuncs/query/ufuncs.py +31 -24
- spinta/backends/postgresql/ufuncs/result/components.py +2 -1
- spinta/backends/postgresql/ufuncs/result/ufuncs.py +1 -1
- spinta/cli/admin.py +3 -3
- spinta/cli/auth.py +8 -13
- spinta/cli/comment.py +2 -7
- spinta/cli/data.py +8 -10
- spinta/cli/get.py +3 -3
- spinta/cli/helpers/admin/registry.py +7 -6
- spinta/cli/helpers/admin/scripts/changelog.py +4 -4
- spinta/cli/helpers/admin/scripts/citus_shard.py +58 -4
- spinta/cli/helpers/admin/scripts/deduplicate.py +3 -3
- spinta/cli/helpers/admin/scripts/enums.py +2 -4
- spinta/cli/helpers/admin/scripts/remove_local_ids.py +0 -1
- spinta/cli/helpers/auth.py +1 -4
- spinta/cli/helpers/data.py +6 -15
- spinta/cli/helpers/export/backends/postgresql/commands.py +8 -8
- spinta/cli/helpers/export/backends/postgresql/components.py +2 -1
- spinta/cli/helpers/export/backends/postgresql/helpers.py +3 -3
- spinta/cli/helpers/export/commands.py +2 -2
- spinta/cli/helpers/export/helpers.py +3 -3
- spinta/cli/helpers/migrate.py +1 -1
- spinta/cli/helpers/push/__init__.py +1 -1
- spinta/cli/helpers/push/components.py +1 -4
- spinta/cli/helpers/push/delete.py +3 -7
- spinta/cli/helpers/push/error.py +2 -6
- spinta/cli/helpers/push/read.py +5 -10
- spinta/cli/helpers/push/state.py +2 -6
- spinta/cli/helpers/push/sync.py +3 -5
- spinta/cli/helpers/push/utils.py +4 -8
- spinta/cli/helpers/push/write.py +4 -13
- spinta/cli/helpers/script/core.py +2 -2
- spinta/cli/helpers/script/helpers.py +0 -1
- spinta/cli/helpers/script/registry.py +0 -1
- spinta/cli/helpers/store.py +10 -7
- spinta/cli/helpers/sync/api_helpers.py +1 -2
- spinta/cli/helpers/sync/controllers/data_service.py +1 -1
- spinta/cli/helpers/sync/controllers/dataset.py +4 -3
- spinta/cli/helpers/sync/controllers/distribution.py +2 -1
- spinta/cli/helpers/sync/controllers/dsa.py +2 -1
- spinta/cli/helpers/sync/controllers/synchronization/connection.py +1 -1
- spinta/cli/helpers/sync/controllers/synchronization/manifest_catalog_to_agent.py +3 -4
- spinta/cli/helpers/sync/helpers.py +14 -12
- spinta/cli/helpers/typer.py +1 -2
- spinta/cli/helpers/upgrade/registry.py +5 -6
- spinta/cli/helpers/upgrade/scripts/backends/postgresql/comments.py +5 -8
- spinta/cli/helpers/upgrade/scripts/backends/postgresql/schemas.py +7 -10
- spinta/cli/helpers/upgrade/scripts/clients.py +6 -6
- spinta/cli/helpers/upgrade/scripts/keymaps/sqlalchemy/helpers.py +2 -2
- spinta/cli/helpers/upgrade/scripts/keymaps/sqlalchemy/initial_setup.py +3 -3
- spinta/cli/helpers/upgrade/scripts/keymaps/sqlalchemy/modified_time.py +1 -1
- spinta/cli/helpers/upgrade/scripts/keymaps/sqlalchemy/redirect_support.py +2 -1
- spinta/cli/helpers/upgrade/scripts/redirect.py +4 -4
- spinta/cli/init.py +1 -1
- spinta/cli/inspect.py +2 -5
- spinta/cli/keymap.py +4 -6
- spinta/cli/main.py +7 -19
- spinta/cli/migrate.py +4 -7
- spinta/cli/pii.py +7 -21
- spinta/cli/pull.py +3 -6
- spinta/cli/push.py +6 -12
- spinta/cli/server.py +6 -9
- spinta/cli/show.py +3 -6
- spinta/cli/sync.py +6 -6
- spinta/cli/uncomment.py +3 -9
- spinta/cli/upgrade.py +3 -4
- spinta/client.py +6 -5
- spinta/commands/__init__.py +10 -28
- spinta/commands/read.py +12 -17
- spinta/commands/search.py +3 -3
- spinta/commands/write.py +9 -17
- spinta/compat.py +0 -1
- spinta/components.py +30 -23
- spinta/config.py +15 -1
- spinta/config.yml +6 -0
- spinta/core/access.py +3 -8
- spinta/core/config.py +3 -6
- spinta/core/context.py +2 -7
- spinta/core/enums.py +1 -1
- spinta/core/ufuncs.py +1 -4
- spinta/datasets/backends/dataframe/backends/csv/commands/read.py +2 -2
- spinta/datasets/backends/dataframe/backends/json/commands/read.py +3 -3
- spinta/datasets/backends/dataframe/backends/soap/commands/read.py +2 -2
- spinta/datasets/backends/dataframe/backends/soap/components.py +1 -1
- spinta/datasets/backends/dataframe/backends/soap/ufuncs/ufuncs.py +3 -3
- spinta/datasets/backends/dataframe/backends/xml/commands/read.py +3 -3
- spinta/datasets/backends/dataframe/commands/read.py +11 -11
- spinta/datasets/backends/dataframe/ufuncs/query/components.py +3 -4
- spinta/datasets/backends/dataframe/ufuncs/query/ufuncs.py +8 -6
- spinta/datasets/backends/helpers.py +2 -2
- spinta/datasets/backends/notimpl/commands/load.py +1 -2
- spinta/datasets/backends/sql/backends/mariadb/ufuncs/query/components.py +1 -1
- spinta/datasets/backends/sql/backends/mysql/ufuncs/query/components.py +1 -1
- spinta/datasets/backends/sql/backends/oracle/helpers.py +6 -5
- spinta/datasets/backends/sql/backends/oracle/types/geometry/encode.py +1 -0
- spinta/datasets/backends/sql/backends/oracle/ufuncs/query/components.py +1 -1
- spinta/datasets/backends/sql/backends/oracle/ufuncs/query/ufuncs.py +3 -4
- spinta/datasets/backends/sql/backends/postgresql/helpers.py +1 -1
- spinta/datasets/backends/sql/backends/postgresql/ufuncs/query/ufuncs.py +3 -3
- spinta/datasets/backends/sql/backends/sas/commands/__init__.py +5 -3
- spinta/datasets/backends/sql/backends/sas/commands/cast.py +1 -1
- spinta/datasets/backends/sql/backends/sas/commands/load.py +2 -2
- spinta/datasets/backends/sql/backends/sas/commands/read.py +1 -3
- spinta/datasets/backends/sql/backends/sas/constants.py +1 -1
- spinta/datasets/backends/sql/backends/sas/dialect.py +4 -3
- spinta/datasets/backends/sql/backends/sas/formats.py +2 -1
- spinta/datasets/backends/sql/backends/sas/helpers.py +0 -1
- spinta/datasets/backends/sql/backends/sas/introspection.py +1 -1
- spinta/datasets/backends/sql/backends/sas/types.py +1 -0
- spinta/datasets/backends/sql/backends/sas/ufuncs/query/components.py +1 -1
- spinta/datasets/backends/sql/backends/sas/ufuncs/query/ufuncs.py +1 -1
- spinta/datasets/backends/sql/backends/sqlite/ufuncs/query/ufuncs.py +3 -3
- spinta/datasets/backends/sql/commands/cast.py +3 -3
- spinta/datasets/backends/sql/commands/column.py +2 -1
- spinta/datasets/backends/sql/commands/load.py +1 -1
- spinta/datasets/backends/sql/commands/read.py +3 -4
- spinta/datasets/backends/sql/components.py +1 -2
- spinta/datasets/backends/sql/helpers.py +3 -3
- spinta/datasets/backends/sql/ufuncs/query/components.py +3 -9
- spinta/datasets/backends/sql/ufuncs/query/helpers.py +1 -1
- spinta/datasets/backends/sql/ufuncs/query/ufuncs.py +7 -21
- spinta/datasets/backends/sql/ufuncs/result/components.py +2 -1
- spinta/datasets/backends/sql/ufuncs/result/ufuncs.py +1 -1
- spinta/datasets/backends/sql/ufuncs/ufuncs.py +2 -3
- spinta/datasets/backends/sqldump/commands/inspect.py +5 -17
- spinta/datasets/backends/sqldump/commands/load.py +1 -2
- spinta/datasets/backends/sqldump/ufuncs/ufuncs.py +2 -5
- spinta/datasets/backends/wsdl/components.py +1 -0
- spinta/datasets/commands/check.py +1 -2
- spinta/datasets/commands/error.py +1 -1
- spinta/datasets/commands/link.py +1 -1
- spinta/datasets/commands/load.py +9 -16
- spinta/datasets/commands/wipe.py +1 -2
- spinta/datasets/components.py +4 -10
- spinta/datasets/helpers.py +7 -13
- spinta/datasets/inspect/commands/merge.py +9 -11
- spinta/datasets/inspect/helpers.py +6 -16
- spinta/datasets/keymaps/components.py +1 -1
- spinta/datasets/keymaps/redis.py +3 -4
- spinta/datasets/keymaps/sqlalchemy.py +5 -6
- spinta/datasets/keymaps/sync.py +3 -3
- spinta/datasets/utils.py +2 -5
- spinta/dimensions/comments/helpers.py +2 -4
- spinta/dimensions/enum/commands.py +3 -8
- spinta/dimensions/enum/components.py +2 -3
- spinta/dimensions/enum/helpers.py +6 -18
- spinta/dimensions/enum/ufuncs.py +2 -2
- spinta/dimensions/lang/components.py +1 -2
- spinta/dimensions/param/components.py +2 -2
- spinta/dimensions/param/helpers.py +3 -3
- spinta/dimensions/param/ufuncs.py +2 -4
- spinta/dimensions/prefix/commands/load.py +2 -4
- spinta/dimensions/prefix/helpers.py +1 -3
- spinta/dimensions/scope/components.py +2 -2
- spinta/dimensions/scope/ufuncs.py +2 -2
- spinta/dispatcher.py +3 -10
- spinta/fetcher.py +1 -1
- spinta/formats/ascii/commands.py +3 -4
- spinta/formats/ascii/components.py +5 -5
- spinta/formats/csv/commands.py +4 -10
- spinta/formats/helpers.py +5 -20
- spinta/formats/html/commands.py +53 -48
- spinta/formats/html/components.py +1 -5
- spinta/formats/html/helpers.py +94 -18
- spinta/formats/json/commands.py +3 -3
- spinta/formats/json/components.py +1 -1
- spinta/formats/jsonlines/commands.py +3 -3
- spinta/formats/rdf/commands.py +23 -18
- spinta/formats/xlsx/commands.py +3 -8
- spinta/hacks/urlparams.py +2 -1
- spinta/handlers.py +1 -0
- spinta/logging_config.py +2 -2
- spinta/manifests/backend/commands/load.py +1 -1
- spinta/manifests/backend/commands/migrate.py +1 -2
- spinta/manifests/backend/commands/sync.py +4 -5
- spinta/manifests/backend/helpers.py +5 -13
- spinta/manifests/commands/error.py +1 -2
- spinta/manifests/commands/inspect.py +2 -4
- spinta/manifests/commands/read.py +6 -4
- spinta/manifests/components.py +3 -15
- spinta/manifests/dict/commands/configure.py +1 -1
- spinta/manifests/dict/commands/load.py +1 -1
- spinta/manifests/dict/helpers.py +6 -9
- spinta/manifests/helpers.py +10 -19
- spinta/manifests/internal_sql/commands/auth.py +1 -0
- spinta/manifests/internal_sql/commands/bootstrap.py +2 -2
- spinta/manifests/internal_sql/commands/configure.py +1 -0
- spinta/manifests/internal_sql/commands/load.py +3 -3
- spinta/manifests/internal_sql/commands/read.py +5 -4
- spinta/manifests/internal_sql/components.py +3 -2
- spinta/manifests/internal_sql/helpers.py +14 -14
- spinta/manifests/mermaid/helpers.py +2 -3
- spinta/manifests/open_api/helpers.py +2 -4
- spinta/manifests/open_api/openapi_generator.py +7 -7
- spinta/manifests/rdf/helpers.py +1 -1
- spinta/manifests/sql/components.py +2 -1
- spinta/manifests/sql/helpers.py +6 -13
- spinta/manifests/tabular/commands/configure.py +1 -3
- spinta/manifests/tabular/commands/load.py +1 -3
- spinta/manifests/tabular/components.py +1 -8
- spinta/manifests/tabular/formats/gsheets.py +2 -5
- spinta/manifests/tabular/helpers.py +106 -83
- spinta/manifests/xsd/commands/load.py +1 -1
- spinta/manifests/xsd/helpers.py +1 -2
- spinta/manifests/yaml/commands/configure.py +1 -2
- spinta/manifests/yaml/commands/load.py +2 -4
- spinta/manifests/yaml/components.py +1 -3
- spinta/manifests/yaml/helpers.py +6 -9
- spinta/middlewares.py +86 -4
- spinta/naming/components.py +1 -2
- spinta/naming/helpers.py +4 -9
- spinta/naming/ufuncts.py +2 -6
- spinta/nodes.py +5 -17
- spinta/renderer.py +3 -5
- spinta/spyna.py +1 -3
- spinta/templates/base.html +6 -8
- spinta/testing/citus.py +0 -2
- spinta/testing/cli.py +1 -3
- spinta/testing/client.py +4 -10
- spinta/testing/config.py +1 -1
- spinta/testing/context.py +5 -10
- spinta/testing/data.py +1 -8
- spinta/testing/datasets.py +1 -2
- spinta/testing/dtypes.py +2 -2
- spinta/testing/migration.py +1 -2
- spinta/testing/pytest.py +4 -7
- spinta/testing/request.py +2 -8
- spinta/testing/tabular.py +1 -3
- spinta/testing/utils.py +3 -5
- spinta/types/array/check.py +2 -2
- spinta/types/array/link.py +4 -4
- spinta/types/backref/link.py +2 -2
- spinta/types/command.py +1 -1
- spinta/types/config.py +13 -7
- spinta/types/datatype.py +7 -13
- spinta/types/denorm/link.py +2 -2
- spinta/types/file/decode.py +4 -4
- spinta/types/geometry/helpers.py +1 -2
- spinta/types/geometry/load.py +2 -5
- spinta/types/helpers.py +4 -9
- spinta/types/model.py +4 -4
- spinta/types/namespace.py +4 -17
- spinta/types/partial/link.py +1 -1
- spinta/types/ref/link.py +2 -3
- spinta/types/store.py +4 -6
- spinta/types/text/components.py +1 -2
- spinta/typing.py +1 -3
- spinta/ufuncs/binds.py +1 -6
- spinta/ufuncs/changebase/components.py +1 -2
- spinta/ufuncs/changebase/helpers.py +2 -4
- spinta/ufuncs/changebase/ufuncs.py +2 -6
- spinta/ufuncs/common.py +1 -1
- spinta/ufuncs/components.py +3 -6
- spinta/ufuncs/helpers.py +1 -2
- spinta/ufuncs/linkbuilder/components.py +1 -1
- spinta/ufuncs/linkbuilder/ufuncs.py +1 -1
- spinta/ufuncs/loadbuilder/components.py +1 -1
- spinta/ufuncs/loadbuilder/helpers.py +3 -2
- spinta/ufuncs/loadbuilder/ufuncs.py +3 -3
- spinta/ufuncs/propertyresolver/ufuncs.py +5 -5
- spinta/ufuncs/querybuilder/components.py +2 -2
- spinta/ufuncs/querybuilder/helpers.py +4 -4
- spinta/ufuncs/querybuilder/ufuncs.py +10 -10
- spinta/ufuncs/requestparamsbuilder/components.py +1 -1
- spinta/ufuncs/requestparamsbuilder/helpers.py +1 -1
- spinta/ufuncs/requestparamsbuilder/ufuncs.py +3 -3
- spinta/ufuncs/resultbuilder/helpers.py +1 -1
- spinta/ufuncs/resultbuilder/ufuncs.py +16 -7
- spinta/ufuncs/summaryenv/ufuncs.py +3 -3
- spinta/units/helpers.py +1 -5
- spinta/urlparams.py +14 -11
- spinta/utils/__init__.py +4 -2
- spinta/utils/aiotools.py +1 -2
- spinta/utils/config.py +1 -1
- spinta/utils/enums.py +2 -1
- spinta/utils/errors.py +0 -1
- spinta/utils/imports.py +1 -2
- spinta/utils/itertools.py +2 -7
- spinta/utils/json.py +2 -2
- spinta/utils/nestedstruct.py +4 -9
- spinta/utils/path.py +1 -1
- spinta/utils/response.py +12 -19
- spinta/utils/schema.py +1 -1
- spinta/utils/scopes.py +1 -2
- spinta/utils/sqlalchemy.py +2 -2
- spinta/utils/sqlite.py +1 -1
- spinta/utils/streams.py +2 -4
- spinta/utils/tree.py +1 -2
- spinta/utils/url.py +1 -1
- {spinta-0.2.dev26.dist-info → spinta-0.2.dev28.dist-info}/METADATA +3 -1
- {spinta-0.2.dev26.dist-info → spinta-0.2.dev28.dist-info}/RECORD +401 -401
- {spinta-0.2.dev26.dist-info → spinta-0.2.dev28.dist-info}/WHEEL +0 -0
- {spinta-0.2.dev26.dist-info → spinta-0.2.dev28.dist-info}/entry_points.txt +0 -0
- {spinta-0.2.dev26.dist-info → spinta-0.2.dev28.dist-info}/licenses/LICENSE +0 -0
spinta/accesslog/__init__.py
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import os
|
|
3
3
|
import time
|
|
4
|
-
from typing import Any
|
|
5
|
-
from typing import Dict
|
|
6
|
-
from typing import Iterable
|
|
7
|
-
from typing import Iterator
|
|
8
|
-
from typing import List
|
|
9
|
-
from typing import TypeVar
|
|
10
|
-
from typing import AsyncIterator
|
|
11
|
-
from typing import overload
|
|
4
|
+
from typing import Any, AsyncIterator, Dict, Iterable, Iterator, List, TypeVar, overload
|
|
12
5
|
|
|
13
6
|
import psutil
|
|
14
7
|
from starlette.requests import Request
|
|
15
8
|
|
|
16
9
|
from spinta import commands
|
|
17
10
|
from spinta.auth import Token, get_default_auth_client_id
|
|
18
|
-
from spinta.components import Context,
|
|
19
|
-
from spinta.components import UrlParams
|
|
11
|
+
from spinta.components import Config, Context, UrlParams
|
|
20
12
|
|
|
21
13
|
|
|
22
14
|
class AccessLog:
|
spinta/accesslog/file.py
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
from typing import Any
|
|
2
|
-
from typing import Dict
|
|
3
|
-
from typing import TextIO, Union
|
|
4
|
-
|
|
5
1
|
import json
|
|
6
|
-
import sys
|
|
7
2
|
import pathlib
|
|
3
|
+
import sys
|
|
4
|
+
from typing import Any, Dict, TextIO, Union
|
|
8
5
|
|
|
9
6
|
from starlette.requests import Request
|
|
10
7
|
|
|
11
8
|
from spinta import commands
|
|
12
9
|
from spinta.accesslog import AccessLog
|
|
13
|
-
from spinta.components import
|
|
10
|
+
from spinta.components import Config, Context, Store
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
class FileAccessLog(AccessLog):
|
spinta/accesslog/python.py
CHANGED
spinta/adapters/soap_plugins.py
CHANGED
|
@@ -6,10 +6,10 @@ from pathlib import Path
|
|
|
6
6
|
from types import ModuleType
|
|
7
7
|
from typing import Any, Callable
|
|
8
8
|
|
|
9
|
-
from spinta.core.ufuncs import Expr, UFuncRegistry
|
|
10
9
|
from spinta.core.config import RawConfig
|
|
11
|
-
from spinta.ufuncs
|
|
10
|
+
from spinta.core.ufuncs import Expr, UFuncRegistry
|
|
12
11
|
from spinta.datasets.backends.dataframe.backends.soap.ufuncs.components import SoapQueryBuilder
|
|
12
|
+
from spinta.ufuncs.loadbuilder.components import LoadBuilder
|
|
13
13
|
|
|
14
14
|
log = logging.getLogger(__name__)
|
|
15
15
|
|
spinta/api/__init__.py
CHANGED
|
@@ -11,50 +11,51 @@ from starlette.datastructures import FormData
|
|
|
11
11
|
from starlette.exceptions import HTTPException
|
|
12
12
|
from starlette.middleware import Middleware
|
|
13
13
|
from starlette.requests import Request
|
|
14
|
-
from starlette.responses import RedirectResponse
|
|
15
|
-
from starlette.
|
|
16
|
-
from starlette.routing import Route, Mount
|
|
14
|
+
from starlette.responses import JSONResponse, RedirectResponse, Response
|
|
15
|
+
from starlette.routing import Mount, Route
|
|
17
16
|
from starlette.staticfiles import StaticFiles
|
|
18
|
-
from starlette.templating import Jinja2Templates
|
|
19
17
|
|
|
20
|
-
from spinta import
|
|
18
|
+
from spinta import commands, components
|
|
21
19
|
from spinta.accesslog import create_accesslog
|
|
22
|
-
from spinta.api.validators import ClientAddData, ClientPatchData, ClientSecretPatchData
|
|
20
|
+
from spinta.api.validators import ClientAddData, ClientBackendsData, ClientPatchData, ClientSecretPatchData
|
|
23
21
|
from spinta.auth import (
|
|
24
22
|
AuthorizationServer,
|
|
23
|
+
BearerTokenValidator,
|
|
24
|
+
KeyType,
|
|
25
|
+
ResourceProtector,
|
|
26
|
+
Scopes,
|
|
27
|
+
StarletteOAuth2Data,
|
|
28
|
+
authenticate_token,
|
|
25
29
|
check_scope,
|
|
26
|
-
query_client,
|
|
27
|
-
get_clients_list,
|
|
28
30
|
client_exists,
|
|
29
31
|
create_client_file,
|
|
30
32
|
delete_client_file,
|
|
31
|
-
|
|
33
|
+
get_auth_request,
|
|
34
|
+
get_auth_token,
|
|
35
|
+
get_clients_list,
|
|
32
36
|
get_clients_path,
|
|
33
|
-
Scopes,
|
|
34
|
-
authenticate_token,
|
|
35
|
-
StarletteOAuth2Data,
|
|
36
|
-
KeyType,
|
|
37
|
-
load_key_from_file,
|
|
38
37
|
has_scope,
|
|
38
|
+
load_key_from_file,
|
|
39
|
+
query_client,
|
|
40
|
+
update_client_file,
|
|
39
41
|
)
|
|
40
|
-
from spinta.
|
|
41
|
-
from spinta.auth import ResourceProtector
|
|
42
|
-
from spinta.auth import get_auth_request
|
|
43
|
-
from spinta.auth import get_auth_token
|
|
44
|
-
from spinta.commands import prepare, get_version
|
|
42
|
+
from spinta.commands import get_version, prepare
|
|
45
43
|
from spinta.components import Context, UrlParams
|
|
46
|
-
from spinta.exceptions import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
from spinta.exceptions import (
|
|
45
|
+
BaseError,
|
|
46
|
+
ClientValidationError,
|
|
47
|
+
InsufficientPermission,
|
|
48
|
+
MultipleErrors,
|
|
49
|
+
NoAuthServer,
|
|
50
|
+
error_response,
|
|
51
|
+
)
|
|
52
|
+
from spinta.formats.html.helpers import get_templates
|
|
53
|
+
from spinta.middlewares import ContextMiddleware, PathNormalizationMiddleware, StrictTransportSecurityMiddleware
|
|
54
|
+
from spinta.urlparams import Version, get_response_type
|
|
52
55
|
|
|
53
56
|
log = logging.getLogger(__name__)
|
|
54
57
|
|
|
55
|
-
templates =
|
|
56
|
-
directory=str(resource_filename("spinta", "templates")),
|
|
57
|
-
)
|
|
58
|
+
templates = get_templates()
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
async def favicon(request: Request):
|
|
@@ -369,7 +370,7 @@ async def error(request, exc):
|
|
|
369
370
|
elif isinstance(exc, BaseError):
|
|
370
371
|
status_code = exc.status_code
|
|
371
372
|
errors = [error_response(exc)]
|
|
372
|
-
headers = exc.headers
|
|
373
|
+
headers = dict(exc.headers)
|
|
373
374
|
else:
|
|
374
375
|
if isinstance(exc, HTTPException):
|
|
375
376
|
status_code = exc.status_code
|
|
@@ -399,6 +400,11 @@ async def error(request, exc):
|
|
|
399
400
|
|
|
400
401
|
response = {"errors": errors}
|
|
401
402
|
|
|
403
|
+
# Error responses can reflect request input (e.g. the requested path) and
|
|
404
|
+
# must never be stored by shared caches, otherwise they can be used for
|
|
405
|
+
# web cache poisoning.
|
|
406
|
+
headers["Cache-Control"] = "no-store"
|
|
407
|
+
|
|
402
408
|
fmt = get_response_type(request.state.context, request)
|
|
403
409
|
if fmt == "json" or fmt is None:
|
|
404
410
|
return JSONResponse(
|
|
@@ -422,6 +428,7 @@ async def error(request, exc):
|
|
|
422
428
|
|
|
423
429
|
async def srid_check(request: Request):
|
|
424
430
|
from shapely.geometry import Point
|
|
431
|
+
|
|
425
432
|
from spinta.types.geometry.helpers import get_osm_link
|
|
426
433
|
|
|
427
434
|
srid = request.path_params["srid"]
|
|
@@ -460,7 +467,14 @@ def init(context: Context):
|
|
|
460
467
|
Route("/{path:path}", homepage, methods=["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE"]),
|
|
461
468
|
]
|
|
462
469
|
|
|
463
|
-
middleware = [
|
|
470
|
+
middleware = [
|
|
471
|
+
Middleware(
|
|
472
|
+
StrictTransportSecurityMiddleware,
|
|
473
|
+
value=config.http_strict_transport_security,
|
|
474
|
+
),
|
|
475
|
+
Middleware(PathNormalizationMiddleware),
|
|
476
|
+
Middleware(ContextMiddleware, context=context),
|
|
477
|
+
]
|
|
464
478
|
|
|
465
479
|
exception_handlers = {
|
|
466
480
|
Exception: error,
|
spinta/api/inspect.py
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import tempfile
|
|
3
|
+
from typing import Tuple
|
|
3
4
|
|
|
4
|
-
from starlette.requests import Request, FormData
|
|
5
5
|
from starlette.datastructures import UploadFile
|
|
6
|
-
|
|
7
|
-
from typing import Tuple
|
|
6
|
+
from starlette.requests import FormData, Request
|
|
8
7
|
|
|
9
8
|
from spinta import commands
|
|
10
|
-
from spinta.auth import
|
|
9
|
+
from spinta.auth import Scopes, check_scope
|
|
11
10
|
from spinta.components import Context, UrlParams
|
|
12
11
|
from spinta.datasets.inspect.helpers import create_manifest_from_inspect
|
|
13
12
|
from spinta.exceptions import (
|
|
14
|
-
UnexpectedFormKeys,
|
|
15
13
|
InvalidFormKeyCombination,
|
|
16
|
-
RequiredFormKeyWithCondition,
|
|
17
|
-
MissingFormKeys,
|
|
18
14
|
InvalidInputData,
|
|
15
|
+
MissingFormKeys,
|
|
16
|
+
RequiredFormKeyWithCondition,
|
|
17
|
+
UnexpectedFormKeys,
|
|
19
18
|
)
|
|
20
|
-
from spinta.manifests.components import
|
|
19
|
+
from spinta.manifests.components import Manifest, ManifestPath
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
def _validate_form_data(form: FormData):
|
spinta/api/schema.py
CHANGED
|
@@ -6,24 +6,24 @@ from starlette.requests import Request
|
|
|
6
6
|
from starlette.responses import JSONResponse
|
|
7
7
|
|
|
8
8
|
from spinta import commands
|
|
9
|
-
from spinta.auth import
|
|
9
|
+
from spinta.auth import Scopes, check_scope
|
|
10
10
|
from spinta.cli.helpers.migrate import MigrationConfig
|
|
11
11
|
from spinta.cli.helpers.store import prepare_manifest
|
|
12
|
-
from spinta.components import
|
|
12
|
+
from spinta.components import Config, Context, Model, Property, Store, UrlParams
|
|
13
13
|
from spinta.core.context import configure_context, create_context
|
|
14
14
|
from spinta.datasets.inspect.helpers import zipitems
|
|
15
15
|
from spinta.exceptions import (
|
|
16
|
-
NotSupportedManifestType,
|
|
17
|
-
InvalidSchemaUrlPath,
|
|
18
|
-
InvalidName,
|
|
19
|
-
UnknownContentType,
|
|
20
|
-
FileSizeTooLarge,
|
|
21
16
|
DatasetNameMissmatch,
|
|
22
17
|
DatasetSchemaRequiresIds,
|
|
23
|
-
|
|
18
|
+
FileSizeTooLarge,
|
|
19
|
+
InvalidName,
|
|
20
|
+
InvalidSchemaUrlPath,
|
|
24
21
|
ModifyOneDatasetSchema,
|
|
22
|
+
ModifySchemaRequiresFile,
|
|
23
|
+
NotSupportedManifestType,
|
|
24
|
+
UnknownContentType,
|
|
25
25
|
)
|
|
26
|
-
from spinta.manifests.components import
|
|
26
|
+
from spinta.manifests.components import Manifest, ManifestPath
|
|
27
27
|
from spinta.manifests.tabular.helpers import datasets_to_tabular
|
|
28
28
|
from spinta.utils.naming import is_valid_namespace_name
|
|
29
29
|
from spinta.utils.schema import NA
|
spinta/api/validators.py
CHANGED
spinta/asgi.py
CHANGED
spinta/auth.py
CHANGED
|
@@ -14,54 +14,48 @@ from collections import defaultdict
|
|
|
14
14
|
from functools import cached_property
|
|
15
15
|
from itertools import chain
|
|
16
16
|
from threading import Lock
|
|
17
|
-
from typing import Set,
|
|
18
|
-
from typing import Type
|
|
19
|
-
from typing import Union, List, Tuple
|
|
17
|
+
from typing import Any, List, Literal, Set, Tuple, Type, TypedDict, Union
|
|
20
18
|
|
|
21
19
|
import requests
|
|
22
20
|
import ruamel.yaml
|
|
23
|
-
from authlib.jose import JsonWebKey, RSAKey,
|
|
24
|
-
from authlib.jose import
|
|
25
|
-
from authlib.
|
|
26
|
-
from authlib.oauth2 import
|
|
27
|
-
from authlib.oauth2 import OAuth2Request
|
|
28
|
-
from authlib.oauth2 import rfc6749
|
|
29
|
-
from authlib.oauth2 import rfc6750
|
|
30
|
-
from authlib.oauth2.rfc6749 import grants, OAuth2Payload, list_to_scope
|
|
21
|
+
from authlib.jose import JsonWebKey, JWTClaims, RSAKey, jwt
|
|
22
|
+
from authlib.jose.errors import BadSignatureError, DecodeError, InvalidTokenError, JoseError
|
|
23
|
+
from authlib.oauth2 import OAuth2Error, OAuth2Request, rfc6749, rfc6750
|
|
24
|
+
from authlib.oauth2.rfc6749 import OAuth2Payload, grants, list_to_scope
|
|
31
25
|
from authlib.oauth2.rfc6749.errors import InvalidClientError
|
|
32
|
-
from authlib.oauth2.rfc6750.errors import InsufficientScopeError
|
|
33
26
|
from authlib.oauth2.rfc6749.util import scope_to_list
|
|
34
|
-
from
|
|
27
|
+
from authlib.oauth2.rfc6750.errors import InsufficientScopeError
|
|
28
|
+
from cachetools import LRUCache, cached
|
|
35
29
|
from cachetools.keys import hashkey
|
|
36
30
|
from cryptography.hazmat.backends import default_backend
|
|
37
31
|
from cryptography.hazmat.primitives.asymmetric import rsa
|
|
38
32
|
from multipledispatch import dispatch
|
|
39
33
|
from requests import RequestException
|
|
40
|
-
from starlette.datastructures import FormData,
|
|
34
|
+
from starlette.datastructures import FormData, Headers, QueryParams
|
|
41
35
|
from starlette.exceptions import HTTPException
|
|
42
36
|
from starlette.responses import JSONResponse
|
|
43
37
|
|
|
44
38
|
from spinta import commands
|
|
45
|
-
from spinta.components import Config
|
|
46
|
-
from spinta.components import Context, Namespace, Model, Property
|
|
47
|
-
from spinta.components import ScopeFormatterFunc
|
|
39
|
+
from spinta.components import Config, Context, Model, Namespace, Property, ScopeFormatterFunc
|
|
48
40
|
from spinta.core.enums import Access, Action
|
|
49
|
-
from spinta.exceptions import AuthorizedClientsOnly, NoScopesForNamespaces, InvalidExtraScopes
|
|
50
|
-
from spinta.exceptions import BasicAuthRequired
|
|
51
41
|
from spinta.exceptions import (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
ClientWithNameAlreadyExists,
|
|
42
|
+
AuthorizedClientsOnly,
|
|
43
|
+
BasicAuthRequired,
|
|
55
44
|
ClientAlreadyExists,
|
|
56
|
-
ClientsKeymapNotFound,
|
|
57
45
|
ClientsIdFolderNotFound,
|
|
46
|
+
ClientsKeymapNotFound,
|
|
47
|
+
ClientWithNameAlreadyExists,
|
|
48
|
+
InvalidClientFileFormat,
|
|
58
49
|
InvalidClientsKeymapStructure,
|
|
50
|
+
InvalidExtraScopes,
|
|
59
51
|
InvalidScopes,
|
|
60
|
-
|
|
52
|
+
InvalidToken,
|
|
61
53
|
ModelNotFound,
|
|
54
|
+
NoScopesForNamespaces,
|
|
55
|
+
NoTokenValidationKey,
|
|
62
56
|
)
|
|
63
57
|
from spinta.utils import passwords
|
|
64
|
-
from spinta.utils.config import get_clients_path,
|
|
58
|
+
from spinta.utils.config import get_clients_path, get_helpers_path, get_id_path, get_keymap_path
|
|
65
59
|
from spinta.utils.scopes import name_to_scope
|
|
66
60
|
from spinta.utils.types import is_str_uuid
|
|
67
61
|
|
spinta/backends/__init__.py
CHANGED
|
@@ -6,93 +6,80 @@ import decimal
|
|
|
6
6
|
import json
|
|
7
7
|
import pathlib
|
|
8
8
|
import uuid
|
|
9
|
-
from typing import Any
|
|
10
|
-
from typing import AsyncIterator
|
|
11
|
-
from typing import Dict
|
|
12
|
-
from typing import Iterable
|
|
13
|
-
from typing import List
|
|
14
|
-
from typing import Optional
|
|
9
|
+
from typing import Any, AsyncIterator, Dict, Iterable, List, Optional
|
|
15
10
|
|
|
16
|
-
from cbor2 import dumps as cbor_dumps
|
|
17
11
|
import dateutil
|
|
18
12
|
import shapely.geometry.base
|
|
19
|
-
from
|
|
13
|
+
from cbor2 import dumps as cbor_dumps
|
|
14
|
+
from geoalchemy2.elements import WKBElement, WKTElement
|
|
20
15
|
from geoalchemy2.shape import to_shape
|
|
21
16
|
from shapely import wkt
|
|
22
17
|
|
|
23
|
-
from spinta import commands
|
|
24
|
-
from spinta import
|
|
25
|
-
from spinta.backends.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
from spinta.commands import prepare
|
|
38
|
-
from spinta.components import Context
|
|
39
|
-
from spinta.components import DataItem
|
|
40
|
-
from spinta.components import Model
|
|
41
|
-
from spinta.components import Namespace
|
|
42
|
-
from spinta.components import Node
|
|
43
|
-
from spinta.components import Property
|
|
44
|
-
from spinta.components import UrlParams, page_in_data
|
|
18
|
+
from spinta import commands, exceptions
|
|
19
|
+
from spinta.backends.components import Backend, SelectTree
|
|
20
|
+
from spinta.backends.helpers import (
|
|
21
|
+
check_unknown_props,
|
|
22
|
+
flat_select_to_nested,
|
|
23
|
+
get_model_reserved_props,
|
|
24
|
+
get_select_prop_names,
|
|
25
|
+
get_select_tree,
|
|
26
|
+
is_accessible_by_equals_sign,
|
|
27
|
+
prepare_response,
|
|
28
|
+
select_keys,
|
|
29
|
+
select_model_props,
|
|
30
|
+
select_props,
|
|
31
|
+
)
|
|
32
|
+
from spinta.commands import gen_object_id, is_object_id, load_operator_value, prepare
|
|
33
|
+
from spinta.components import Context, DataItem, Model, Namespace, Node, Property, UrlParams, page_in_data
|
|
45
34
|
from spinta.core.enums import Action
|
|
46
35
|
from spinta.core.ufuncs import asttoexpr
|
|
47
36
|
from spinta.exceptions import (
|
|
48
37
|
ConflictingValue,
|
|
49
|
-
RequiredProperty,
|
|
50
|
-
LangNotDeclared,
|
|
51
|
-
TooManyLangsGiven,
|
|
52
|
-
UnableToDetermineRequiredLang,
|
|
53
38
|
CoordinatesOutOfRange,
|
|
39
|
+
DirectRefValueUnassignment,
|
|
54
40
|
InheritPropertyValueMissmatch,
|
|
55
|
-
SRIDNotSetForGeometry,
|
|
56
41
|
InvalidUuidValue,
|
|
57
|
-
|
|
42
|
+
LangNotDeclared,
|
|
43
|
+
NoItemRevision,
|
|
44
|
+
RequiredProperty,
|
|
45
|
+
SRIDNotSetForGeometry,
|
|
46
|
+
TooManyLangsGiven,
|
|
47
|
+
UnableToDetermineRequiredLang,
|
|
58
48
|
)
|
|
59
|
-
from spinta.exceptions import NoItemRevision
|
|
60
49
|
from spinta.formats.components import Format
|
|
61
50
|
from spinta.manifests.components import Manifest
|
|
62
51
|
from spinta.types.datatype import (
|
|
52
|
+
JSON,
|
|
53
|
+
UUID,
|
|
63
54
|
Array,
|
|
64
|
-
ExternalRef,
|
|
65
|
-
Inherit,
|
|
66
|
-
PageType,
|
|
67
|
-
BackRef,
|
|
68
55
|
ArrayBackRef,
|
|
69
|
-
|
|
56
|
+
BackRef,
|
|
57
|
+
Base32,
|
|
58
|
+
Binary,
|
|
70
59
|
Boolean,
|
|
60
|
+
DataType,
|
|
61
|
+
Date,
|
|
62
|
+
DateTime,
|
|
71
63
|
Denorm,
|
|
72
|
-
|
|
64
|
+
ExternalRef,
|
|
65
|
+
File,
|
|
66
|
+
Inherit,
|
|
67
|
+
Integer,
|
|
68
|
+
Number,
|
|
69
|
+
Object,
|
|
70
|
+
PageType,
|
|
71
|
+
PrimaryKey,
|
|
72
|
+
Ref,
|
|
73
73
|
String,
|
|
74
|
+
Time,
|
|
74
75
|
)
|
|
75
|
-
from spinta.types.datatype import Binary
|
|
76
|
-
from spinta.types.datatype import DataType
|
|
77
|
-
from spinta.types.datatype import Date
|
|
78
|
-
from spinta.types.datatype import DateTime
|
|
79
|
-
from spinta.types.datatype import File
|
|
80
|
-
from spinta.types.datatype import JSON
|
|
81
|
-
from spinta.types.datatype import Number
|
|
82
|
-
from spinta.types.datatype import Object
|
|
83
|
-
from spinta.types.datatype import PrimaryKey
|
|
84
|
-
from spinta.types.datatype import Ref
|
|
85
|
-
from spinta.types.datatype import String
|
|
86
|
-
from spinta.types.datatype import Time
|
|
87
|
-
from spinta.types.datatype import UUID
|
|
88
76
|
from spinta.types.geometry.components import Geometry
|
|
89
77
|
from spinta.types.geometry.helpers import get_crs_bounding_area
|
|
90
78
|
from spinta.types.text.components import Text
|
|
91
|
-
from spinta.utils.types import is_nan
|
|
92
79
|
from spinta.utils.config import asbool
|
|
93
80
|
from spinta.utils.encoding import encode_page_values
|
|
94
|
-
from spinta.utils.schema import NA
|
|
95
|
-
from spinta.utils.
|
|
81
|
+
from spinta.utils.schema import NA, NotAvailable
|
|
82
|
+
from spinta.utils.types import is_nan
|
|
96
83
|
|
|
97
84
|
|
|
98
85
|
@commands.prepare_for_write.register(Context, Model, Backend, dict)
|
spinta/backends/components.py
CHANGED
|
@@ -2,12 +2,9 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import contextlib
|
|
4
4
|
import dataclasses
|
|
5
|
-
from typing import Any, Type
|
|
6
|
-
from typing import Dict
|
|
7
|
-
from typing import Optional
|
|
8
|
-
from typing import Set
|
|
5
|
+
from typing import Any, Dict, Optional, Set, Type
|
|
9
6
|
|
|
10
|
-
from spinta.backends.constants import
|
|
7
|
+
from spinta.backends.constants import BackendFeatures, BackendOrigin, DistributionType
|
|
11
8
|
from spinta.core.ufuncs import Env
|
|
12
9
|
from spinta.ufuncs.resultbuilder.components import ResultBuilder
|
|
13
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from typing import AsyncIterator
|
|
2
2
|
|
|
3
3
|
from spinta import commands
|
|
4
|
-
from spinta.components import Context, Property, DataItem
|
|
5
4
|
from spinta.backends.fs.components import FileSystem
|
|
5
|
+
from spinta.components import Context, DataItem, Property
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@commands.create_changelog_entry.register(Context, Property, FileSystem)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import pathlib
|
|
2
2
|
|
|
3
3
|
from spinta import commands
|
|
4
|
+
from spinta.backends.fs.components import FileSystem
|
|
4
5
|
from spinta.components import Context
|
|
5
|
-
from spinta.types.datatype import File
|
|
6
6
|
from spinta.formats.components import Format
|
|
7
|
-
from spinta.
|
|
7
|
+
from spinta.types.datatype import File
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@commands.decode.register(Context, Format, FileSystem, File, dict)
|
|
@@ -3,7 +3,7 @@ from typing import Optional, Union
|
|
|
3
3
|
from spinta import commands
|
|
4
4
|
from spinta.components import Context
|
|
5
5
|
from spinta.types.datatype import File
|
|
6
|
-
from spinta.utils.schema import
|
|
6
|
+
from spinta.utils.schema import NA, NotAvailable
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@commands.build_data_patch_for_write.register(Context, File)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from spinta import commands
|
|
2
|
-
from spinta.components import Context, Attachment
|
|
3
|
-
from spinta.manifests.components import Manifest
|
|
4
2
|
from spinta.backends.components import Backend
|
|
5
|
-
from spinta.types.datatype import File
|
|
6
3
|
from spinta.backends.fs.components import FileSystem
|
|
4
|
+
from spinta.components import Attachment, Context
|
|
5
|
+
from spinta.manifests.components import Manifest
|
|
6
|
+
from spinta.types.datatype import File
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@commands.prepare.register(Context, FileSystem, Manifest)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import pathlib
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, Dict
|
|
3
3
|
|
|
4
4
|
from spinta import commands
|
|
5
|
-
from spinta.components import Context
|
|
6
5
|
from spinta.backends.fs.components import FileSystem
|
|
6
|
+
from spinta.components import Context
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@commands.load.register(Context, FileSystem, dict)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from spinta import commands
|
|
2
|
+
from spinta.backends.fs.components import FileSystem
|
|
2
3
|
from spinta.components import Context
|
|
3
4
|
from spinta.manifests.components import Manifest
|
|
4
|
-
from spinta.backends.fs.components import FileSystem
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
@commands.migrate.register(Context, Manifest, FileSystem)
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
from typing import overload
|
|
3
1
|
from pathlib import Path
|
|
2
|
+
from typing import Optional, overload
|
|
4
3
|
|
|
5
|
-
from spinta.typing import ObjectData
|
|
6
|
-
from spinta.typing import FileObjectData
|
|
7
4
|
from spinta import commands
|
|
8
|
-
from spinta.components import Context
|
|
9
|
-
from spinta.components import Property
|
|
10
5
|
from spinta.backends.fs.components import FileSystem
|
|
11
|
-
from spinta.
|
|
6
|
+
from spinta.components import Context, Property
|
|
12
7
|
from spinta.exceptions import ItemDoesNotExist
|
|
8
|
+
from spinta.types.datatype import DataType, File
|
|
9
|
+
from spinta.typing import FileObjectData, ObjectData
|
|
13
10
|
|
|
14
11
|
|
|
15
12
|
@overload
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
|
-
|
|
3
2
|
from pathlib import Path
|
|
3
|
+
|
|
4
4
|
from spinta import commands
|
|
5
|
-
from spinta.components import Context, Property, DataItem
|
|
6
|
-
from spinta.core.enums import Action
|
|
7
5
|
from spinta.backends.components import Backend
|
|
8
|
-
from spinta.types.datatype import DataType, File
|
|
9
6
|
from spinta.backends.fs.components import FileSystem
|
|
10
|
-
from spinta.
|
|
7
|
+
from spinta.components import Context, DataItem, Property
|
|
8
|
+
from spinta.core.enums import Action
|
|
9
|
+
from spinta.exceptions import ConflictingValue, FileNotFound, UnacceptableFileName
|
|
10
|
+
from spinta.types.datatype import DataType, File
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@commands.simple_data_check.register(Context, DataItem, File, Property, FileSystem, dict)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from spinta import commands
|
|
2
|
+
from spinta.backends.fs.components import FileSystem
|
|
2
3
|
from spinta.commands import getall
|
|
3
4
|
from spinta.components import Context
|
|
4
|
-
from spinta.backends.fs.components import FileSystem
|
|
5
5
|
from spinta.types.datatype import File
|
|
6
6
|
from spinta.utils.data import take
|
|
7
7
|
|