Materials-Consortia / definition-provider-template

Template repository for namespace definition providers
MIT License
0 stars 0 forks source link

Build failure when running `make` #1

Closed merkys closed 5 months ago

merkys commented 5 months ago

I am trying to build as explained in README.md and get the following failure:

$ make OPTIMADE_SCHEMAS_DIR=../schemas/output
mkdir -p "output/v0.1.0/properties/structures/"
tools/optimade-property-tools/bin/process_schemas --remove-null --resolve-path ../schemas/output --basedir "src/v0.1.0" --baseid "https://example.org/schemas/v0.1/"  --schema tools/optimade-property-tools/external/json-schema/core --schema tools/optimade-property-tools/external/json-schema/format-annotation --schema tools/optimade-property-tools/external/json-schema/schema --schema tools/optimade-property-tools/external/json-schema/meta-data --schema tools/optimade-property-tools/external/json-schema/validation --schema tools/optimade-property-tools/external/json-schema/content --schema tools/optimade-property-tools/external/json-schema/applicator --schema tools/optimade-property-tools/external/json-schema/unevaluated --output "output/v0.1.0/properties/structures/_exmpl_cell_volume.json" "src/v0.1.0/properties/structures/_exmpl_cell_volume.yaml"
Processing of input failed. Error details:
- File not found when dereferencing $$inherit: defs/v1.2/units/si/general/angstrom looked in: ['src/v0.1.0', '../schemas/output'] (/home/andrius/optimade/definition-provider-template/tools/optimade-property-tools/src/process_schemas/process_schemas.py line:1453 triggered at line: 1101).

Add command line argument -d for a full traceback or one or more -v for higher verbosity.
make: *** [GNUmakefile:60: output/v0.1.0/properties/structures/_exmpl_cell_volume.json] Error 1

Please note my personal setting for OPTIMADE_SCHEMAS_DIR, as I have cloned https://github.com/Materials-Consortia/schemas (master) at ../schemas. Directory ../schemas/output does not seem to be present there, nor can I find build instructions to make it. Most likely I am doing assuming something incorrectly here.

merkys commented 5 months ago

Solved: I should have used OPTIMADE_SCHEMAS_DIR=../schemas. I suppose README.md should be adjusted.

Edit: I suggest setting OPTIMADE_SCHEMAS_DIR=../schemas in the GNUmakefile. For me the natural way seems to clone repositories from Materials-Consortia under the same directory, thus ../OPTIMADE prefix is not needed.

rartino commented 5 months ago

Right, this is on me, commiting hardcoded paths that made sense in my environment without explaining the need to update them in the README.

I've landed in that the best solution probably is to have these definition-provider repo:s depend via a submodule on https://github.com/Materials-Consortia/schemas. That way they can use the latest OPTIMADE schemas without having to depend on the user keeping the main OPTIMADE repo somewhere with a fresh 'make schemas'.

That would mean OPTIMADE_SCHEMAS_DIR=dependecies/submodules/schemas.

merkys commented 5 months ago

I've landed in that the best solution probably is to have these definition-provider repo:s depend via a submodule on https://github.com/Materials-Consortia/schemas. That way they can use the latest OPTIMADE schemas without having to depend on the user keeping the main OPTIMADE repo somewhere with a fresh 'make schemas'.

Agree, this solution is much better.

rartino commented 5 months ago

Please pull latest version (and git submodule update --init --recursive), and check if this is fixed.

merkys commented 5 months ago

Please pull latest version (and git submodule update --init --recursive), and check if this is fixed.

Yes, I can confirm that 378f081ebd4c54b15d80b44f5b6fa3269c46e2b6 fixes the issue, thanks.