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

Derive files that were not derived for schema version 11.2.0 #2300

Closed
eecavanna opened this issue Dec 7, 2024 · 0 comments · Fixed by #2301
Closed

Derive files that were not derived for schema version 11.2.0 #2300

eecavanna opened this issue Dec 7, 2024 · 0 comments · Fixed by #2301
Assignees
Labels
bug Something isn't working infrastructure not content This issue is about generating output, keeping the repo organized etc. X SMALL Less than 8 hours, less than 1 day

Comments

@eecavanna
Copy link
Collaborator

eecavanna commented Dec 7, 2024

When I "released" the schema (version 11.2.0) yesterday, I forgot that there are some manual steps involved in creating a release. Instead, I went straight to creating a new GitHub Release. (See issue #1960 about eliminating the manual steps from this process.)

As a result, when I tried to update the submission schema to use nmdc-schema version 11.2.0, I ran into an error involving the nmdc_materialized_patterns.yaml file that the submission schema build code fetches from this repo (as opposed to from a PyPI package).

🪗 Show/hide failing submission schema make target and associated stack trace
poetry run gen-project   \
        --exclude graphql \
        --exclude jsonld \
        --exclude jsonldcontext \
        --exclude markdown \
        --exclude prefixmap \
        --exclude proto \
        --exclude shacl \
        --exclude shex \
        --exclude excel \
        --include jsonschema \
        --exclude owl \
        --include python \
        --include sqlddl \
        --generator-arguments '{jsonschema: {not_closed: false}, sqlddl: {output: local/submission_schema.sql}}' \
        -d project src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml && mv project/*.py src/nmdc_submission_schema/datamodel
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/bin/gen-project", line 8, in <module>
    sys.exit(cli())
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/generators/projectgen.py", line 259, in cli
    gen.generate(yamlfile, project_config)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/generators/projectgen.py", line 140, in generate
    gen = gen_cls(local_path, **all_gen_args)
  File "<string>", line 29, in __init__
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/generators/pythongen.py", line 77, in __post_init__
    super().__post_init__()
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/utils/generator.py", line 206, in __post_init__
    self._initialize_using_schemaloader(schema)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/utils/generator.py", line 253, in _initialize_using_schemaloader
    loader.resolve()
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/utils/schemaloader.py", line 238, in resolve
    self.raise_value_error(f"slot: {slot.name} - unrecognized range ({slot.range})", slot.range)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/utils/schemaloader.py", line 941, in raise_value_error
    SchemaLoader.raise_value_errors(error, loc_str)
  File "/root/.cache/pypoetry/virtualenvs/nmdc-submission-schema-aBGqxekb-py3.9/lib/python3.9/site-packages/linkml/utils/schemaloader.py", line 949, in raise_value_errors
    raise ValueError(f'{TypedNode.yaml_loc(loc_str, suffix="")} {error}')
ValueError: File "nmdc_submission_schema.yaml", line 56977, col 16 slot: ontologyRelation__subject - unrecognized range (OntologyClass)
make: *** [Makefile:105: gen-project] Error 1

The process documented in the release instructions in infra-admin (private) says to run $ make squeaky-clean all test. I did not do that (i.e. did not look at those instructions) when releasing nmdc-schema version 11.2.0.

The task here is to follow those instructions and make a new release. I'll do this today/now. CC: @turbomam

@eecavanna eecavanna added bug Something isn't working X SMALL Less than 8 hours, less than 1 day infrastructure not content This issue is about generating output, keeping the repo organized etc. labels Dec 7, 2024
@eecavanna eecavanna self-assigned this Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infrastructure not content This issue is about generating output, keeping the repo organized etc. X SMALL Less than 8 hours, less than 1 day
Projects
No open projects
1 participant