Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

622 generate nested properties when generating dsa from xsd #645

Conversation

karina-klinkeviciute
Copy link
Contributor

No description provided.

@karina-klinkeviciute karina-klinkeviciute linked an issue Jun 7, 2024 that may be closed by this pull request
@karina-klinkeviciute karina-klinkeviciute marked this pull request as draft June 17, 2024 12:24
@karina-klinkeviciute karina-klinkeviciute linked an issue Jun 18, 2024 that may be closed by this pull request
@sirex
Copy link
Collaborator

sirex commented Aug 2, 2024

Gaunu tokias klaidas:

Traceback (most recent call last):
  File "spinta/cli/manifest.py", line 62, in copy
    copy_manifest(
  File "spinta/cli/manifest.py", line 133, in copy_manifest
    write_tabular_manifest(context, output, rows)
  File "spinta/manifests/tabular/helpers.py", line 2598, in write_tabular_manifest
    write_xlsx(pathlib.Path(path), rows, cols)
  File "spinta/manifests/tabular/helpers.py", line 2699, in write_xlsx
    for i, row in enumerate(rows, 1):
  File "spinta/manifests/tabular/helpers.py", line 2594, in <genexpr>
    rows = ({c: row[c] for c in cols} for row in rows)
  File "spinta/cli/manifest.py", line 176, in _read_and_return_rows
    store = load_manifest(
  File "spinta/cli/helpers/store.py", line 120, in load_manifest
    commands.load(
  File "multipledispatch/dispatcher.py", line 279, in __call__
    return func(*args, **kwargs)
  File "spinta/manifests/yaml/commands/load.py", line 110, in load
    commands.load(
  File "multipledispatch/dispatcher.py", line 279, in __call__
    return func(*args, **kwargs)
  File "spinta/manifests/xsd/commands/load.py", line 44, in load
    load_manifest_nodes(context, into, schemas, source=manifest)
  File "spinta/manifests/helpers.py", line 133, in load_manifest_nodes
    for eid, schema in schemas:
  File "spinta/manifests/xsd/helpers.py", line 1187, in read_schema
    xsd.start()
  File "spinta/manifests/xsd/helpers.py", line 990, in start
    self._parse_root_node()
  File "spinta/manifests/xsd/helpers.py", line 978, in _parse_root_node
    self._create_model(node, is_root_model=True)
  File "spinta/manifests/xsd/helpers.py", line 941, in _create_model
    properties_from_references = self._properties_from_type_references(
  File "spinta/manifests/xsd/helpers.py", line 590, in _properties_from_type_references
    referenced_model_names = self._create_model(
  File "spinta/manifests/xsd/helpers.py", line 863, in _create_model
    return self._split_choice(
  File "spinta/manifests/xsd/helpers.py", line 808, in _split_choice
    returned_model_names = self._create_model(
  File "spinta/manifests/xsd/helpers.py", line 941, in _create_model
    properties_from_references = self._properties_from_type_references(
  File "spinta/manifests/xsd/helpers.py", line 605, in _properties_from_type_references
    referenced_model_names = self._create_model(
  File "spinta/manifests/xsd/helpers.py", line 941, in _create_model
    properties_from_references = self._properties_from_type_references(
  File "spinta/manifests/xsd/helpers.py", line 590, in _properties_from_type_references
    referenced_model_names = self._create_model(
  File "spinta/manifests/xsd/helpers.py", line 941, in _create_model
    properties_from_references = self._properties_from_type_references(
  File "spinta/manifests/xsd/helpers.py", line 605, in _properties_from_type_references
    referenced_model_names = self._create_model(
  File "spinta/manifests/xsd/helpers.py", line 863, in _create_model
    return self._split_choice(
  File "spinta/manifests/xsd/helpers.py", line 793, in _split_choice
    returned_model_names, new_root_properties = self._create_model(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

karina-klinkeviciute and others added 26 commits August 12, 2024 11:57
…rom parent model when trimming proxy models
…hen-generating-dsa-from-xsd' into 622-generate-nested-properties-when-generating-dsa-from-xsd
@karina-klinkeviciute karina-klinkeviciute marked this pull request as ready for review August 23, 2024 13:46
@karina-klinkeviciute karina-klinkeviciute merged commit 86d7021 into master Aug 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested backrefs and arrays Generate nested properties when generating DSA from XSD
3 participants