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

Biocatalysis Demo Vocabulary for pipeline testing #2

Closed
wants to merge 3 commits into from

Conversation

markdoerr
Copy link
Contributor

Biocatalysis Vocabulary v1.1

@markdoerr
Copy link
Contributor Author

Hi @dalito,
there is an issue in the pipeline:

`Run voc4cat --version

voc4cat 0.7.8
INFO |Executing cmd: voc4cat check --config _main_branch/idranges.toml --logfile outbox/voc4cat.log --ci-pre inbox-excel-vocabs/ _main_branch/vocabularies
DEBUG |Processing common options.
DEBUG |Config loaded from: _main_branch/idranges.toml
ERROR |Unexpected error.
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/voc4cat/cli.py", line 450, in run_cli_app
main_cli(raw_args)
File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/voc4cat/cli.py", line 441, in main_cli
process_common_options(args, raw_args)
File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/voc4cat/cli.py", line 47, in process_common_options
config.load_config(config_file=Path(args.config))
File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/voc4cat/config.py", line 144, in load_config
new_conf["IDRANGES"] = IDrangeConfig(**conf)
^^^^^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 2 validation errors for IDrangeConfig
vocabs -> biocatalysis_demo -> id_range -> 0 -> orcid
init() takes exactly 1 positional argument (2 given) (type=type_error)
vocabs -> biocatalysis_demo -> id_range -> 0 -> ror_id
init() takes exactly 1 positional argument (2 given) (type=type_error)
Error: Process completed with exit code 3.`

@dalito
Copy link
Member

dalito commented Dec 13, 2023

I somewhat expected some failures. I don't have time to look now. The main difference between here and the voc4cat repo is that voc4cat is constrained to one vocab per repo whereas here you can have multiple vocab in the same repo. This has not been tested much.

@dalito
Copy link
Member

dalito commented Dec 13, 2023

The reason for the failure is that the ORCID and ROR in the config idrange.toml are invalid (from #1). For ORCID a checksum is calculated and your fantasy ORCID had an incorrect checksum. The error in the pipeline points to it somewhat

pydantic.error_wrappers.ValidationError: 2 validation errors for IDrangeConfig
vocabs -> biocatalysis_demo -> id_range -> 0 -> orcid
  __init__() takes exactly 1 positional argument (2 given) (type=type_error)
vocabs -> biocatalysis_demo -> id_range -> 0 -> ror_id
  __init__() takes exactly 1 positional argument (2 given) (type=type_error)

It would be nice if the custom validators for ORCID & ROR would give more meaningful error messages. However, I don't plan to add features to current pydantic 1 code. For pydantic 2 the custom validation has to be rewritten (nfdi4cat/voc4cat-tool#142).

The easiest fix is to replace ORCID and ROR with an empty string (or with valid values). I did this in #3.

@dalito
Copy link
Member

dalito commented Dec 13, 2023

@markdoerr - Rerunning the job gave another error. This one is for you. :)

@markdoerr
Copy link
Contributor Author

Thanks, @dalito,
I will have a look (but unfortunately the whole day is filled today), so it might take until tomorrow :(

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.

2 participants