Ncrystal

Latest version: v3.9.7

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

3.8.2

* Add importlib_metadata as python build dependency for Python < 3.8.
* CMake code no longer strictly disallows mixing of NCRYSTAL_NAMESPACE and
NCRYSTAL_GEANT4 options.

3.8.1

* Fix rare FPE in lcbragg code (github issue 171).
* Remove a few faulty noexcept modifiers in (found by cppcheck).
* Fix NCMatCfg::textData which technically returned a reference to a
temporary (although this is not believed to have actually caused any
issues, since the "temporary" came from a longer-lived shared_ptr). This
was also found with cppcheck.

3.8.0

* Completely obsolete the ncrystal_inspectfile command in favour of the
nctool command. Trying to invoke ncrystal_inspectfile now results in an
error message with a reminder to use nctool instead.
* The default value of the CMake cfg option -DNCRYSTAL_ENABLE_SETUPSH is
changed from "ON" to "OFF". Additionally, if setting
-DNCRYSTAL_ENABLE_SETUPSH=ON, the oly files installed are now named
<PREFIX>/ncrystal_setup.sh and <PREFIX>/ncrystal_unsetup.sh, whereas in
the past they were named <PREFIX>/setup.sh and <PREFIX>/unsetup.sh. Note
that in releases v3.7.0 and v3.7.1 both versions of the files were
available. Consequently, users who were manually compiling NCrystal and relying on
e.g. <PREFIX>/setup.sh files files will now need
to explicitly set -DNCRYSTAL_ENABLE_SETUPSH=ON and instead use the
<PREFIX>/ncrystal_setup.sh file. (github issue 126).
* NCrystal components and instrument examples for McStas (mcstas.org) are
no longer shipped with NCrystal, since all NCrystal components and
instrument examples are now shipped with McStas itself.
* Add a new NCRYSTAL_NAMESPACE option, which can be used when there is a
need to be able to use NCrystal header files and libraries from multiple
NCrystal installations into the same environment. Eventually, it is the
plan to enable such namespace protection in NCrystal conda-forge and PyPI
packages, to prevent hard-to-catch errors in case a user ends up having
both packages installed in the same environment (which can happen when
people mix "conda install .." and "pip install .."). CMake-based
downstream projects should not be affected by this, but if you are
maintaining downstream custom builds which hardcode linker flags like
"-L/path/to/ncrystal/lib -lNCrystal" you are encouraged to based your
flags instead on $(ncrystal-config --show libpath). That way you will be
future-proof and ready to also work with NCrystal installations where a
namespace has been enabled. See the README file for more details.
* As a result of the namespace support, all function names in the C-api are
now actually macros.
* Adding VERSION and SOVERSION to libNCrystal.so/dylib. For now, the
VERSION number is simply the full NCrystal release version number, while
the SOVERSION is the major release number (i.e. "3" for release
3.8.0). This feature can be disabled with -DNCRYSTAL_ENABLE_SOVERSION=OFF.
* CMake find_package(NCrystal ...) calls no longer sets NCrystal_DIR to the
installation prefix, since that could disrupt the usage of multiple
find_package calls. The prefix directory previously available as the
CMake variable NCrystal_DIR is thus instead made available under the name
NCrystal_PREFIX.
* Update Avogadro's constant to NIST/CODATA2018 value, changing it from
6.022140857e23/mol to 6.02214076e23/mol (a change of ~0.016ppm).
* The CMake code now also adds $CONDA_PREFIX/lib to rpath when appropriate.
* Explicitly forbid and $ chars in cfg-strings (github issue 153).
* Fix misleading values in ncrystal-config in some rare cases.
* Fix for a few (incorrect) compiler warnings.
* Fix for cmake test in python3 -mNCrystal.test cmake.
* Warnings emitted from python layer now has right stacklevel.
* Fix tests for Python 3.12 (a few tests depended on the now
deprecated distutils modules, cf. PEP-632).

3.7.1

* Update documentation to reflect availability on PyPI.
* Set version-based policies in NCrystalConfig.cmake to make
find_package(NCrystal) work when CMake is new enough, but the downstream
CMake project nevertheless specifies a very old version in their
cmake_minimum_required statement (cf. github issue/discussion 137).
* Add NCrystal_LIBRARIES variables for downstream CMake-based projects with
legacy 2.x-style CMake code. If the GEANT4BINDINGS component is enabled,
also set G4NCrystal_LIBDIR, G4NCrystal_INCDIR, G4NCrystal_LIBNAME and
G4NCrystal_LIBRARIES variables, likewise intended for such legacy
projects. Note of course, that usage of such legacy CMake 2.x-style code
is discouraged.
* Include type_traits in NCDefs.hh, to potentially fix some compilation
errors seen in 137.
* Fix several minor bugs in NCrystal Python code which were discovered via
the ruff static code analysis tool.
* Change signature of all 0-argument functions in C-API in ncrystal.h from
f() to f(void), since the first form is apparently deprecated since 30
years and gives issues in clang 14
(cf. https://github.com/madler/zlib/issues/633 and
https://github.com/mctools/dgcode/issues/34).
* For NCrystal builds, change max version in cmake_minimum_required to
3.27.

3.7.0

* The main feature of this release is that NCrystal now can be optionally
built and installed using standard Python-centric toolchains. Work on
this feature was spearheaded by Milan Klausz, and is associated with
newly added setup.py and pyproject.toml files, using skbuild behind the
scenes. Additionally, Python modules and script were moved out of the
ncrystal_python directory and into directories named NCrystal and
scripts, respectively (solving github issue 127). Finally, existing
Python modules and the ncrystal-config script were modified to support
such builds and installation. As a result, it is now possible to do "pip
install <path-to-ncrystal-src>", and get a fully-fledged NCrystal
release. The only difference with respect to e.g. a conda installation
of NCrystal, is that downstream CMake-based projecs won't detect the
installation, unless the directory reported by "ncrystal-config --show
cmakedir" is manually added to the CMAKE_PREFIX_PATH.
* Work is ongoing by Milan Klausz to setup workflows at GitHUB to
automatically build binary wheels for PyPI, similar to how binary
packages are now built automatically at conda-forge. Once this is
completed, it will be possible to install prebuilt NCrystal packages via
"pip install ncrystal" (solving github issue 93).
* Note that setup.py maps NCrystal releases with minor number >= 80 to a
development version lke "3.6.dev80", with the intention of preventing
"pip install ncrystal" from automatically picking up release candidates.
* Rewrote the aligned allocator code used internally when implementing
convenience containers such as SmallVector. This was done in response to
fix compilation errors with gcc12 (github issue 125). This new version
avoid the previous incorrect reliance of a non-standard feature of
std::free, and overall the new version is more portable, as it relies on
nothing except std::malloc and std::free.
* Updated the SmallVector::clear method, in order to work around what
appears to be a false-positive compilation error by gcc12.
* For completeness, added more functions like ekin2k, constexpr_ekin2k,
k2ekin, and k2wl functions in the C++ and Python API's.
* Bugfixes (C++ API): NeutronEnergy::k() now actually returns the
wavenumber k, and not the squared of k, as it did previously. Also, the
free-standing ekin2wl(..) function is no longer constexpr (since
std::sqrt is not actually constexpr), but there is a new
constexpr_ekin2wl which is.
* Added new standard testing facilities, for checking an installation for
presence of commandline scripts (solving github issue 110) and that
downstream CMake/C++ projects can find and use NCrystal (after getting
CMAKE_PREFIX_PATH from ncrystal-config). To invoke all tests, run
"python3 -mNCrystal.test all". For other options, run "python3
-mNCrystal.test all".
* Add ncrystal_setup.sh/ncrystal_unsetup.sh files in addition to the
ambiguously named setup.sh/unsetup.sh files. (github issue 126).

3.6.82

* RC3 for release 3.7.0.

Page 2 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.