diff --git a/apptainer/app.def b/apptainer/app.def index d0117b84cba9..8185d34dd623 100644 --- a/apptainer/app.def +++ b/apptainer/app.def @@ -36,6 +36,8 @@ BootStrap: {{ APPTAINER_BOOTSTRAP }} From: {{ APPTAINER_FROM }} +# MOOSE-NCRC key +Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB %setup # Load jinja vars diff --git a/apptainer/files/mpi/.singularity.d/env/99-user-overrides.sh b/apptainer/files/mpi/.singularity.d/env/89-user-overrides.sh similarity index 100% rename from apptainer/files/mpi/.singularity.d/env/99-user-overrides.sh rename to apptainer/files/mpi/.singularity.d/env/89-user-overrides.sh diff --git a/apptainer/libmesh.def b/apptainer/libmesh.def index 92ac4f7455ec..7f9e8b678e6f 100644 --- a/apptainer/libmesh.def +++ b/apptainer/libmesh.def @@ -27,6 +27,8 @@ BootStrap: {{ APPTAINER_BOOTSTRAP }} From: {{ APPTAINER_FROM }} +# MOOSE-NCRC key +Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB %environment # From moose-libmesh diff --git a/apptainer/moose-dev.def b/apptainer/moose-dev.def index 97d70c1e4aca..0df39422fad5 100644 --- a/apptainer/moose-dev.def +++ b/apptainer/moose-dev.def @@ -23,9 +23,6 @@ {#- Location to install miniforge3 -#} {%- set MOOSE_MINIFORGE = '/opt/miniforge3' -%} -{#- Name of the environment to create in conda -#} -{%- set MOOSE_CONDA_ENV_NAME = 'moose' -%} - {#- The installation location for wasp -#} {%- set WASP_DIR = '/opt/wasp' -%} {#- The installation location for gperftools -#} @@ -43,10 +40,12 @@ BootStrap: {{ APPTAINER_BOOTSTRAP }} From: {{ APPTAINER_FROM }} +# MOOSE-NCRC key +Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB %environment export PATH={{ MOOSE_MINIFORGE }}/bin:/opt/code-server/bin:$PATH - source activate {{ MOOSE_MINIFORGE }}/envs/{{ MOOSE_CONDA_ENV_NAME }} + source activate {{ MOOSE_MINIFORGE }} export WASP_DIR={{ WASP_DIR }} export PATH=${WASP_DIR}/bin:$PATH @@ -153,10 +152,7 @@ From: {{ APPTAINER_FROM }} # Create list of Conda Packages to install MAMBA_PACKAGES="moose-tools=${MOOSE_TOOLS_VERSION}" # Install packages - mamba create -yq -n ${MOOSE_CONDA_ENV_NAME} python=${PYTHON_VERSION} ${MAMBA_PACKAGES} - - # Activate the new environment - source activate ${MOOSE_MINIFORGE}/envs/${MOOSE_CONDA_ENV_NAME} + conda install -yq python=${PYTHON_VERSION} ${MAMBA_PACKAGES} # Needed for coverage pip3 --no-cache install lcov-cobertura diff --git a/apptainer/mpi.def b/apptainer/mpi.def index 705e2f8f4e40..1695bf3d16fc 100644 --- a/apptainer/mpi.def +++ b/apptainer/mpi.def @@ -27,14 +27,14 @@ {#- The files directory for this definition -#} {%- set FILES_DIR = MOOSE_DIR + '/apptainer/files/mpi' -%} +Bootstrap: oras {%- if ALTERNATE_FROM == "gcc_min" or ALTERNATE_FROM == "clang" or ALTERNATE_FROM == "clang_min" %} -Bootstrap: docker -From: rockylinux:8.9.20231119 +From: mooseharbor.hpc.inl.gov/base/rocky-x86_64:8.10-0 {%- else %} -BootStrap: oras -From: mooseharbor.hpc.inl.gov/moose-hpcbase/rocky-x86_64:8.9-0 +From: mooseharbor.hpc.inl.gov/moose-hpcbase/rocky-x86_64:8.10-0 {%- endif %} - +# Logan Harbour +Fingerprints: 841AF5A51549CAFFFB474F65207184EA34A4BD48 %environment # Fix locale warnings export LC_ALL=C @@ -102,13 +102,10 @@ EOF {%- endif %} # Additional installs - dnf install -y vim tmux emacs wget rsync hostname python3-pyyaml python3-devel python39 \ - make cmake bzip2 diffutils bison flex perl-IO-Compress perl-JSON perl-JSON-PP \ - libtirpc libtirpc-devel zlib-devel patch patchutils epel-release file \ - libpng libpng-devel unzip jq valgrind cppunit doxygen fftw-devel gsl-devel \ - libtool autoconf automake cppunit-devel tar git - # After epel-release - dnf install -y glpk-devel patchelf lcov + dnf install -y tmux emacs make cmake diffutils bison flex perl-IO-Compress perl-JSON \ + perl-JSON-PP libtirpc libtirpc-devel zlib-devel patch patchutils libpng \ + libpng-devel valgrind cppunit doxygen fftw-devel gsl-devel libtool autoconf \ + automake cppunit-devel glpk-devel patchelf lcov {%- if ALTERNATE_FROM == "clang" %} # Installing system Clang, and its GCC GNU dependencies @@ -131,18 +128,6 @@ EOF source /opt/rh/gcc-toolset-${CLANG_GCC_VERSION}/enable {%- endif %} - # Make python default to python3.9 - alternatives --set python /usr/bin/python3.9 - alternatives --set python3 /usr/bin/python3.9 - - # We need git lfs - mkdir ${ROOT_BUILD_DIR}/gitlfs - cd ${ROOT_BUILD_DIR}/gitlfs - curl -L -O https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz - tar -xf git-lfs-linux-amd64-v3.2.0.tar.gz - cd git-lfs-3.2.0 - ./install.sh - {%- if ALTERNATE_FROM == "clang_min" %} # Build minimum Clang {{ MIN_CLANG_VERSION }} from source cd ${ROOT_BUILD_DIR} @@ -229,4 +214,4 @@ EOF %files {{ MOOSE_DIR }}/apptainer/set_prompt.bash {{ SET_PROMPT_SCRIPT }} {{ FILES_DIR }}/.singularity.d/env/01-fix-exec.sh /.singularity.d/env/01-fix-exec.sh - {{ FILES_DIR }}/.singularity.d/env/99-user-overrides.sh /.singularity.d/env/99-user-overrides.sh + {{ FILES_DIR }}/.singularity.d/env/89-user-overrides.sh /.singularity.d/env/89-user-overrides.sh diff --git a/apptainer/petsc.def b/apptainer/petsc.def index 0510761f7cfc..42d396deab55 100644 --- a/apptainer/petsc.def +++ b/apptainer/petsc.def @@ -22,6 +22,8 @@ BootStrap: {{ APPTAINER_BOOTSTRAP }} From: {{ APPTAINER_FROM }} +# MOOSE-NCRC key +Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB %environment # Set the MPI environment diff --git a/apptainer/remove_channels.def b/apptainer/remove_channels.def index f110db3b2cdc..f78a2506f3b2 100644 --- a/apptainer/remove_channels.def +++ b/apptainer/remove_channels.def @@ -5,6 +5,8 @@ BootStrap: {{ APPTAINER_BOOTSTRAP }} From: {{ APPTAINER_FROM }} +# MOOSE-NCRC key +Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB %post readarray -t channels <<< "$(conda config --show channels)" diff --git a/conda/libmesh-vtk/conda_build_config.yaml b/conda/libmesh-vtk/conda_build_config.yaml index 2a693a1a3bd8..a043b6f5a3a8 100644 --- a/conda/libmesh-vtk/conda_build_config.yaml +++ b/conda/libmesh-vtk/conda_build_config.yaml @@ -3,7 +3,7 @@ mpi: - openmpi moose_mpi: - - moose-mpi 2024.11.13 + - moose-mpi 2024.12.23 #### Darwin SDK SYSROOT CONDA_BUILD_SYSROOT: # [osx] diff --git a/conda/libmesh-vtk/meta.yaml b/conda/libmesh-vtk/meta.yaml index 2ebbe1fea49d..61c98cef7b20 100644 --- a/conda/libmesh-vtk/meta.yaml +++ b/conda/libmesh-vtk/meta.yaml @@ -3,7 +3,7 @@ # libmesh/* # # As well as any directions pertaining to modifying those files. -{% set build = 4 %} +{% set build = 5 %} {% set vtk_version = "9.3.0" %} {% set vtk_friendly_version = "9.3" %} {% set sha256 = "fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9" %} diff --git a/conda/libmesh/conda_build_config.yaml b/conda/libmesh/conda_build_config.yaml index d5f6d3c43257..6c075d594eee 100644 --- a/conda/libmesh/conda_build_config.yaml +++ b/conda/libmesh/conda_build_config.yaml @@ -3,12 +3,12 @@ mpi: - openmpi moose_petsc: - - moose-petsc 3.22.1.193.g72c1e49ee3d mpich_0 - - moose-petsc 3.22.1.193.g72c1e49ee3d openmpi_0 + - moose-petsc 3.22.1.193.g72c1e49ee3d mpich_1 + - moose-petsc 3.22.1.193.g72c1e49ee3d openmpi_1 moose_libmesh_vtk: - - moose-libmesh-vtk 9.3.0 mpich_4 - - moose-libmesh-vtk 9.3.0 openmpi_4 + - moose-libmesh-vtk 9.3.0 mpich_5 + - moose-libmesh-vtk 9.3.0 openmpi_5 zip_keys: - mpi diff --git a/conda/libmesh/meta.yaml b/conda/libmesh/meta.yaml index 04cd6e68d8e4..76993a90c679 100644 --- a/conda/libmesh/meta.yaml +++ b/conda/libmesh/meta.yaml @@ -4,7 +4,7 @@ # # As well as any directions pertaining to modifying those files. # ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml -{% set build = 0 %} +{% set build = 1 %} {% set version = "2024.12.02" %} package: diff --git a/conda/moose-dev/conda_build_config.yaml b/conda/moose-dev/conda_build_config.yaml index 0b6e85cf5f5e..92acd1e928c5 100644 --- a/conda/moose-dev/conda_build_config.yaml +++ b/conda/moose-dev/conda_build_config.yaml @@ -3,17 +3,17 @@ mpi: - openmpi moose_libmesh: - - moose-libmesh 2024.12.02 mpich_0 - - moose-libmesh 2024.12.02 openmpi_0 + - moose-libmesh 2024.12.02 mpich_1 + - moose-libmesh 2024.12.02 openmpi_1 moose_wasp: - - moose-wasp 2024.11.13 + - moose-wasp 2024.12.23 moose_tools: - - moose-tools 2024.11.13 + - moose-tools 2024.12.23 moose_peacock: - - moose-peacock 2024.11.13 + - moose-peacock 2024.12.23 zip_keys: - mpi diff --git a/conda/moose-dev/meta.yaml b/conda/moose-dev/meta.yaml index 922c78343150..ecce79efdba0 100644 --- a/conda/moose-dev/meta.yaml +++ b/conda/moose-dev/meta.yaml @@ -2,7 +2,7 @@ # REMEMBER TO UPDATE the .yaml files for the following packages: # moose/conda_build_config.yaml # As well as any directions pertaining to modifying those files. -{% set version = "2024.12.02" %} +{% set version = "2024.12.23" %} package: name: moose-dev diff --git a/conda/moose/conda_build_config.yaml b/conda/moose/conda_build_config.yaml index ca93413032fc..30f84e9dc2f2 100644 --- a/conda/moose/conda_build_config.yaml +++ b/conda/moose/conda_build_config.yaml @@ -3,7 +3,7 @@ mpi: - openmpi moose_dev: - - moose-dev 2024.12.02 + - moose-dev 2024.12.23 #### Darwin SDK SYSROOT CONDA_BUILD_SYSROOT: # [osx] diff --git a/conda/mpi/meta.yaml b/conda/mpi/meta.yaml index 8d339d5ec3cf..89897eb0aa0e 100644 --- a/conda/mpi/meta.yaml +++ b/conda/mpi/meta.yaml @@ -6,7 +6,7 @@ # # As well as any directions pertaining to modifying those files. # ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml -{% set version = "2024.11.13" %} +{% set version = "2024.12.23" %} # HDF5 Version {% set hdf5_version = "1.14.2" %} diff --git a/conda/peacock/conda_build_config.yaml b/conda/peacock/conda_build_config.yaml index f40ab82af4cc..92932bcaf386 100644 --- a/conda/peacock/conda_build_config.yaml +++ b/conda/peacock/conda_build_config.yaml @@ -3,4 +3,4 @@ mpi: - openmpi moose_mpi: - - moose-mpi 2024.11.13 + - moose-mpi 2024.12.23 diff --git a/conda/peacock/meta.yaml b/conda/peacock/meta.yaml index 7e28600a9d30..3265fc8d1f97 100644 --- a/conda/peacock/meta.yaml +++ b/conda/peacock/meta.yaml @@ -3,7 +3,7 @@ # moose-dev/* # # As well as any directions pertaining to modifying those files. -{% set version = "2024.11.13" %} +{% set version = "2024.12.23" %} package: name: moose-peacock @@ -25,6 +25,7 @@ requirements: - pandas - pyqt - matplotlib !=3.9.0 + - libgl # [linux] - vtk run_constrained: # Python max constraints diff --git a/conda/petsc/conda_build_config.yaml b/conda/petsc/conda_build_config.yaml index 2a693a1a3bd8..a043b6f5a3a8 100644 --- a/conda/petsc/conda_build_config.yaml +++ b/conda/petsc/conda_build_config.yaml @@ -3,7 +3,7 @@ mpi: - openmpi moose_mpi: - - moose-mpi 2024.11.13 + - moose-mpi 2024.12.23 #### Darwin SDK SYSROOT CONDA_BUILD_SYSROOT: # [osx] diff --git a/conda/petsc/meta.yaml b/conda/petsc/meta.yaml index b00124037047..670ac58d09c1 100644 --- a/conda/petsc/meta.yaml +++ b/conda/petsc/meta.yaml @@ -7,7 +7,7 @@ # # As well as any directions pertaining to modifying those files. # ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml -{% set build = 0 %} +{% set build = 1 %} {% set version = "3.22.1.193.g72c1e49ee3d" %} package: diff --git a/conda/pprof/meta.yaml b/conda/pprof/meta.yaml index b342dce22a1c..e6926bc9dc0e 100644 --- a/conda/pprof/meta.yaml +++ b/conda/pprof/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "2024.11.13" %} +{% set version = "2024.12.23" %} {% set build = 0 %} {% set strbuild = "build_" + build|string %} diff --git a/conda/seacas/meta.yaml b/conda/seacas/meta.yaml index 216749a1e9c5..74e7db516c93 100644 --- a/conda/seacas/meta.yaml +++ b/conda/seacas/meta.yaml @@ -1,5 +1,5 @@ # MAKE SURE THAT seacas_version and seacas_git_rev match if performing a version update! -{% set build = "1" %} +{% set build = "2" %} {% set seacas_version = "2024.08.15" %} {% set seacas_git_rev = "v2024-08-15" %} {% set strbuild = "build_" + build|string %} @@ -26,7 +26,7 @@ requirements: - {{ moose_gfortran }} - {{ moose_ccompiler }} - {{ moose_cxxcompiler }} - - xorg-libx11 + - xorg-libx11 1.8.9 - cmake - make - automake diff --git a/conda/tools/meta.yaml b/conda/tools/meta.yaml index 70135d7ee898..ab0937454e6e 100644 --- a/conda/tools/meta.yaml +++ b/conda/tools/meta.yaml @@ -3,7 +3,7 @@ # moose-dev/* # # As well as any directions pertaining to modifying those files. -{% set version = "2024.11.13" %} +{% set version = "2024.12.23" %} package: name: moose-tools @@ -45,6 +45,7 @@ requirements: - packaging - pandas - paramiko + - psutil - psycopg2 - pyarrow - pybtex diff --git a/conda/wasp/build_pyhit.sh b/conda/wasp/build_pyhit.sh index 3fa2cf867eca..771bb551690c 100755 --- a/conda/wasp/build_pyhit.sh +++ b/conda/wasp/build_pyhit.sh @@ -5,6 +5,7 @@ do_build(){ rm -rf "${SP_DIR:?}/pyhit/" cp -R pyhit "${SP_DIR:?}/" cd "${SRC_DIR:?}/src" + make clean make bindings install hit.so "${SP_DIR:?}/pyhit/" || return 1 cat > "${SP_DIR:?}/pyhit-${PKG_VERSION:?}.egg-info" <str: + """ provide hints as to version and build information for all conda stack libraries """ + red = '\033[91m' + yellow = '\033[93m' + green = '\033[92m' + bright = '\033[1m' + reset = '\033[0m' + empty = {'version' : 'not yet tracked', 'build': 'n/a'} + head = self.version_meta('HEAD') + base = self.version_meta(args.verify[0]) + formatted_output = '' + warn_moose = '' + name_fill = 10 + version_fill = 13 + for package in head: + name_fill = max(name_fill, len(head[package]['conda'].get('name', ''))) + version_fill = max(version_fill, len(base[package]['conda'].get('version', ''))) + + for package in head: + # we do not care about app + if package == 'app': + continue + + # libraries without a meta.yaml (pyhit for example, which is now wasp) + if not head[package].get('conda', False): + continue + + # create shorter dictionaries with only the things we need + _hc = head[package]['conda'] + _hc['hash'] = head[package]['hash'] + _bc = base[package]['conda'] + + # new libraries being added or tracked in this PR + if not _bc: + _bc = dict(empty) + _bc['hash'] = base[package]['hash'] + + # string formatting shenanigans + n_fill = f'{"".rjust((name_fill - len(_hc["name"])) + 2," ")}' + v_fill = f'{"".rjust((version_fill - len(_hc["version"])) + 2," ")}' + if _bc['build'] == 'n/a': + v_fill = f'{"".rjust((version_fill - len(_bc["version"]))," ")}' + + # HASH MATCH, nothing to do + if _hc['hash'] == _bc['hash']: + print(f'{_hc["name"]}:{n_fill}no changes') + continue + + # version/build has not changed, yet some influential file suggests it should + conda_base=f'conda{os.path.sep}{package}{os.path.sep}' + if (_hc['version'], _hc['build']) == (_bc['version'], _bc['build']): + formatted_output+=(f'{_hc["name"]}:{n_fill}{red}' + f'{_hc["version"]}{reset} build: ' + f'{red}{_hc["build"]}{reset}\n') + + # a combo issue of having versioner begin tracking an existing library while + # also mucking with its influentials files, but forgetting to update the + # version/build. + elif not (self.git_is_diff(commit=args.verify[0], + file=f'{conda_base}meta.yaml') or + self.git_is_diff(commit=args.verify[0], + file=f'{conda_base}conda_build_config.yaml')): + formatted_output+=(f'{_hc["name"]}:{n_fill}{red}' + f'{_hc["version"]}{reset} build: ' + f'{red}{_hc["build"]}{reset} ' + f'{v_fill}{v_fill} {red}update required{reset}\n') + + # things seem correct, highlight the changed bits in green to aid the user. + else: + print(f'{_hc["name"]}:{n_fill}' + f'{bright}{_bc["version"]}{reset} build: ' + f'{bright}{_bc["build"]}{reset}{v_fill}to ' + f'{green if _hc["version"] != _bc["version"] else bright}' + f'{_hc["version"]}{reset} build: ' + f'{green if _hc["build"] != _bc["build"] else bright}{_hc["build"]}{reset}') + + # Anything depending on `moose-dev` should go here. Like `moose`. + if package == 'moose-dev': + warn_moose = (f'moose: ({yellow}templated{reset}. Please verify ' + 'conda/moose/conda_build_conda.yaml has been updated)') + + if formatted_output: + formatted_output+=f'{warn_moose}\n{red}FAIL{reset}' + print(formatted_output) + sys.exit(1) + elif warn_moose: + print(warn_moose) + return f'{green}\nOK{reset}' + def output_summary(self, args): + """ generate summary report that can be used to generate versioner_hash blocks """ head = self.version_meta(args.commit, full_hash=True)["app"]["hash"] formatted_output = f'{head}: #PR\n' for library in TRACKING_LIBRARIES: if library == 'app': continue meta = self.version_meta(args.commit).get(library, {}) - hash = meta['hash'] - formatted_output+=f' {library}: {hash}\n' + meta_hash = meta['hash'] + formatted_output+=f' {library}: {meta_hash}\n' return formatted_output def output_cli(self, args): """ performs command line actions """ args = self.parse_args(args, self.entities) self.check_args(args) - if args.summary: - return self.output_summary(args) + if args.summary or args.verify: + if self.git_is_diff(): + print('\033[91mWarning\033[0m: you have changes not yet committed. Information' + ' displayed may be inaccurate\n') + if args.summary: + return self.output_summary(args) + if args.verify: + return self.verify_recipes(args) meta = self.version_meta(args.commit).get(args.library, {}) if not meta: @@ -150,6 +245,9 @@ def parse_args(argv, entities): help='Output in YAML format (itemized information)') parser.add_argument('-s','--summary',action='store_true', default=False, help='Output summary as should be entered in versioner_hashes.yaml') + parser.add_argument('-v', '--verify', nargs=1, metavar='base_ref hash', default=None, + help='Output version/build number hints against supplied base reference' + ' hash') return parser.parse_args(argv) @staticmethod @@ -159,10 +257,32 @@ def check_args(args): print('Cannot use --json and --yaml together') sys.exit(1) + if args.verify and args.verify == 'HEAD': + print('You cannot verify against HEAD. You must choose a hash' + ' (preferably something like upstream/master)') + sys.exit(1) + if not Versioner.is_git_object(args.commit): print(f'{args.commit} is not a commit in {MOOSE_DIR}') sys.exit(1) + @staticmethod + def git_is_diff(repo_dir=MOOSE_DIR, commit=None, file=None) ->bool: + """ returns bool on diff changes present in MOOSE_DIR """ + command = ['git', 'diff'] + if commit is not None: + command.append(commit) + if file is not None: + command.append(file) + try: + diff = subprocess.run(command, stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, check=True, cwd=repo_dir) + except Exception as ex: + raise ex + if len(diff.stdout): + return True + return False + @staticmethod def is_git_object(commit_like, repo_dir=MOOSE_DIR): """ checks whether or not the object is a valid git object (hash, etc) """ @@ -248,45 +368,23 @@ def do_sortlist(self, commit): return True return False - def influential_dict(self, packages_yaml, parent=None, library=None, recursive_meta=None): - """ build and return influential dictionary """ - # key descriptors to be treated as control identifiers - key_descriptors = ['dependencies', 'influential'] - # key name for infuential file list value - dep_key = 'influential' - if recursive_meta is None: - recursive_meta = {} - for descriptor, values in packages_yaml.items(): - # 'values' is a dictionary with more items to discover (recurse into) - if isinstance(values, dict): - # 'descriptor' is actually a library we wish to track - if descriptor not in key_descriptors: - recursive_meta[descriptor] = {} - # recursive inspection of descriptors_yaml[library], preserve history (grow) - self.influential_dict(packages_yaml[descriptor], - parent=library, - library=descriptor, - recursive_meta=recursive_meta) - # no more dictionaries to recurse into - elif descriptor in key_descriptors: - # recursive descriptor dictionary (apptainer meta) - if parent is not None: - _lib_dict = recursive_meta[parent] - else: - _lib_dict = recursive_meta[library] - # we are inside a library with dependency(s) - if descriptor == 'dependencies': - for dep in packages_yaml[descriptor]: - if dep in recursive_meta.keys(): - _lib_dict[dep_key] = recursive_meta[library].get(dep_key, []) - _lib_dict[descriptor] = recursive_meta[library].get(descriptor, []) - _lib_dict[dep_key].extend(recursive_meta[dep][dep_key]) - _lib_dict[descriptor].append(dep) - # anything else (influential files at time of writing) - else: - _lib_dict[descriptor] = recursive_meta[library].get(descriptor, []) - _lib_dict[descriptor].extend(packages_yaml[descriptor]) - return recursive_meta + @staticmethod + def influential_dict(packages_yaml, library=None, build_dict=None) ->dict: + _d = defaultdict(dict) if build_dict == None else build_dict + if library is not None and not len(_d[library]['influential']): + _d[library]['influential'].extend(packages_yaml[library].get('influential', [])) + _d[library]['dependencies'].extend(packages_yaml[library].get('dependencies', [])) + for dep_package in packages_yaml[library].get('dependencies', []): + if dep_package not in _d: + _d.update({ dep_package : {'influential' : [], 'dependencies' : []} }) + _tmp = Versioner.influential_dict(packages_yaml, dep_package, _d) + _d[library]['influential'].extend(_tmp[dep_package]['influential']) + if library == None: + for package in packages_yaml: + _d.update({ package : {'influential' : [], 'dependencies' : [] } }) + _d.update(Versioner.influential_dict(packages_yaml, package, _d)) + return _d + return _d @staticmethod def augment_dictionaries(base_meta, library): @@ -354,9 +452,9 @@ def version_meta(self, commit='HEAD', full_hash=False): file_hash = git_hash_cache[influential_file] package_meta['hash_table'][influential_file] = file_hash package_meta['hash_list'].append(file_hash) - # If this is the package/meta.yaml file, render the jinja template + # If this is the */meta.yaml file, render the jinja template if influential_file.find(f'{package}{os.path.sep}meta.yaml') != -1: - package_meta['conda'] = self.conda_meta(package, influential_file, commit) + package_meta['conda'] = self.conda_meta(influential_file, commit) package_hash = app_hash if is_app else self.get_hash(package_meta['hash_list']) package_meta['hash'] = package_hash @@ -400,7 +498,7 @@ def conda_meta_jinja(contents): return name, version, build_string, build_number, meta @staticmethod - def conda_meta(package, influential, commit): + def conda_meta(influential, commit): """ produces the conda meta entry """ # Read the conda-build jinja2 styled template contents = Versioner.git_file(influential, commit) diff --git a/scripts/versioner.yaml b/scripts/versioner.yaml index 5b94e48712c1..13cc3a1c8a41 100644 --- a/scripts/versioner.yaml +++ b/scripts/versioner.yaml @@ -34,6 +34,7 @@ packages: libmesh: dependencies: - petsc + - libmesh-vtk apptainer: from: petsc influential: @@ -44,9 +45,6 @@ packages: - conda/libmesh/build.sh - scripts/configure_libmesh.sh - scripts/update_and_rebuild_libmesh.sh - - conda/libmesh-vtk/meta.yaml - - conda/libmesh-vtk/conda_build_config.yaml - - conda/libmesh-vtk/build.sh wasp: influential: - scripts/update_and_rebuild_wasp.sh @@ -65,16 +63,14 @@ packages: dependencies: - libmesh - wasp + - peacock + - tools apptainer: from: libmesh influential: - apptainer/moose-dev.def - apptainer/remove_channels.def - apptainer/files/moose-dev - - conda/peacock/meta.yaml - - conda/peacock/conda_build_config.yaml - - conda/tools/meta.yaml - - conda/tools/conda_build_config.yaml - conda/moose-dev/meta.yaml - conda/moose-dev/conda_build_config.yaml - scripts/setup_libtorch.sh @@ -82,21 +78,27 @@ packages: dependencies: - mpi influential: - - conda/libmesh-vtk + - conda/libmesh-vtk/build.sh + - conda/libmesh-vtk/meta.yaml + - conda/libmesh-vtk/conda_build_config.yaml peacock: dependencies: - mpi influential: - - conda/peacock + - conda/peacock/meta.yaml + - conda/peacock/conda_build_config.yaml pprof: influential: - - conda/pprof + - conda/pprof/build.sh + - conda/pprof/meta.yaml + - conda/pprof/conda_build_config.yaml pyhit: dependencies: - wasp seacas: influential: - - conda/seacas + - conda/seacas/meta.yaml + - conda/seacas/conda_build_config.yaml app: dependencies: - moose-dev