File tree Expand file tree Collapse file tree 8 files changed +10
-180
lines changed
Expand file tree Collapse file tree 8 files changed +10
-180
lines changed Original file line number Diff line number Diff line change 8282 - name : Build package
8383 run : |
8484 git reset --hard HEAD
85- rm -f src/pynxtools/nomad/nxs_metainfo_package_*.json
85+ rm -f src/pynxtools/nomad/schema_packages/ nxs_metainfo_package_*.json
8686 export PYNXTOOLS_BUILD_PACKAGE=1
8787 uv run --extra nomad scripts/generate_package.py
8888 uv build
@@ -117,7 +117,7 @@ jobs:
117117 EXPECTED=$(python -c "from pynxtools import get_nexus_version; print(f'nxs_metainfo_package_{get_nexus_version()}.json')")
118118
119119 # find the JSON file
120- FOUND_FILE=$(find "$SITE_PACKAGES/pynxtools/nomad" -name 'nxs_metainfo_package_*.json' -print -quit)
120+ FOUND_FILE=$(find "$SITE_PACKAGES/pynxtools/nomad/schema_packages " -name 'nxs_metainfo_package_*.json' -print -quit)
121121
122122 if [ -z "$FOUND_FILE" ]; then
123123 echo "ERROR: nxs_metainfo_package_*.json not found in installed package."
Original file line number Diff line number Diff line change @@ -206,6 +206,6 @@ cython_debug/
206206! src /pynxtools /units /constants_en.txt
207207! src /pynxtools /units /default_en.txt
208208build /
209- src /pynxtools /nomad /nxs_metainfo_ * .json
209+ src /pynxtools /nomad /schema_packages / nxs_metainfo_ * .json
210210nexusparser.egg-info /PKG-INFO
211211.python-version
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ include src/pynxtools/remote_definitions_url.txt
1313include src/pynxtools/definitions/NXDL_VERSION
1414include src/pynxtools/units/*.txt
1515graft src/pynxtools/nomad/example_uploads/iv_temp_example
16- include src/pynxtools/nomad/nxs_metainfo_package_*.json
16+ include src/pynxtools/nomad/schema_packages/ nxs_metainfo_package_*.json
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ project_dir=$(dirname "$(dirname "$(realpath "$0")")")
55cd " $project_dir " || exit 1
66
77# Get the full path of the file to keep
8- nxs_file=$( python3 -c " from pynxtools.nomad.utils import get_package_filepath; print(get_package_filepath())" )
8+ nxs_file=$( python3 -c " from pynxtools.nomad import get_package_filepath; print(get_package_filepath())" )
99
1010# Define the target directory
11- target_dir=" src/pynxtools/nomad"
11+ target_dir=" src/pynxtools/nomad/schema_packages "
1212
1313# Delete all matching files except nxs_file
1414for file in " $target_dir " /nxs_metainfo_package_* .json; do
Original file line number Diff line number Diff line change 22import os
33
44try :
5- from pynxtools .nomad . utils import get_package_filepath
5+ from pynxtools .nomad import get_package_filepath
66except ImportError as e :
77 raise ImportError (
88 "The 'pynxtools' package is required but not installed. "
1414
1515if not os .path .exists (nxs_filepath ):
1616 logger .info (f"Generating NeXus package at { nxs_filepath } ." )
17- import pynxtools .nomad .schema # noqa: F401
17+ import pynxtools .nomad .schema_packages . schema # noqa: F401
1818else :
1919 logger .info (f"NeXus package already existed at { nxs_filepath } ." )
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ def get_quantity_base_name(quantity_name):
134134 )
135135
136136
137- PACKAGE_DIR = Path (__file__ ).resolve ().parent
137+ PACKAGE_DIR = Path (__file__ ).resolve ().parent / "schema_packages"
138138CACHE_DIR = Path (config .fs .tmp ) / "pynxtools"
139139
140140
Original file line number Diff line number Diff line change @@ -1158,7 +1158,7 @@ def init_nexus_metainfo():
11581158 if nexus_metainfo_package is not None :
11591159 return
11601160 try :
1161- # load_nexus_schema()
1161+ load_nexus_schema ()
11621162 raise Exception ("test" )
11631163
11641164 except Exception :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments