From caef5dc571c13049ed6b4952850ccdd7a6512c4f Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 24 Jul 2024 13:30:24 +0200 Subject: [PATCH] Update readme --- .github/workflows/main.yml | 2 +- README.md | 174 ++++++++++++++++++++++++++++++------- 2 files changed, 145 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ade498a..fc095c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: shell: bash run: scripts/print_build_variables.sh # bash -x scripts/print_build_variables.sh for printing commands - - name: Create scripts, CFML and pyCFML directories + - name: Create CFML and pyCFML directories shell: bash run: | scripts/create_cfml_repo_dir.sh diff --git a/README.md b/README.md index 3688e86..08b983d 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,184 @@ -[![](http://github-actions.40ants.com/AndrewSazonov/TEST_PyCrysFML/matrix.svg)](https://github.com/AndrewSazonov/TEST_PyCrysFML/actions) +This is a repository for creating a python library **pycrysfml** based on the new automatically generated Python API for the crystallographic library CrysFML2008 (Fortran 2008) from https://code.ill.fr/scientific-software/CrysFML2008. -This is a repository for testing the build process of both the fortran crystallographic library [CrysFML2008](https://code.ill.fr/rodriguez-carvajal/CrysFML2008) and its python interface [PyCrysFML08](https://code.ill.fr/scientific-software/PyCrysFML08). - -### Build matrix +### Build and test jobs | Platform / Compiler | gfortran | ifx | ifort | nagfor | | ------------------------- | -------- | ----------- | ------------- | ---------- | -| Windows 10 | ✅ | ✅ | ✅ | | -| Ubuntu 22.04 | ✅ | ✅ | ✅ | | -| macOS 12 (Intel) | ✅ | Unsupported | ✅ | | -| macOS 14 (Apple Silicone) | ✅ | Unsupported | Unsupported | ✅ Local | +| Windows 10 | ✅ | ❌1 | ✅ | ⚙️ Testing | +| Ubuntu 22.04 | ✅ | ✅ | ✅ | ⚙️ Testing | +| macOS 12 (Intel) | ✅ | Unsupported | ❌2 | ⚙️ Testing | +| macOS 14 (Apple Silicone) | ✅ | Unsupported | Unsupported | ⚙️ Testing | + +* ❌1 Failed at the _:::::: Running unit tests from 'tests/functional_tests/pyCFML'_ step (tests job): + +``` +tests\functional_tests\pyCFML\cfml_utilities\powder_pattern_from_json\test__powder_pattern_from_json.py . [ 33%] +Windows fatal exception: access violation + +Current thread 0x0000068c (most recent call first): -### Main steps +... -* Download the [CrysFML2008](https://code.ill.fr/rodriguez-carvajal/CrysFML2008) project (`nagfor` branch) -* Build the CrysFML2008 static library -* Build and run CrysFML2008 functional test programs -* Download the [PyCrysFML08](https://code.ill.fr/scientific-software/PyCrysFML08) project (`master` branch) -* Build selected PyCrysFML08 modules -* Create the PyCrysFML08 python package and install PyCrysFML08 from it -* Run the PyCrysFML08 unit tests -* Run `powder_mod` from PyCrysFML08 to generate the powder diffraction pattern +scripts/run_pycfml_functional_tests_no_benchmarks.sh: line 2: 1359 Segmentation fault +``` +* ❌2 Failed at the _:::::: Building fortran shared obj or dynamic lib 'crysfml08lib.so'_ step (build job): -More details are in the [CI script](.github/workflows/main.yml). +``` +Undefined symbols for architecture x86_64: + "_cfml_kvec_symmetry_mp_inlat_", referenced from: + _cfml_kvec_symmetry_mp_latsym_ in libCrysFML08.a(ksym_auxsub.o) + "_cfml_kvec_symmetry_mp_ltr_", referenced from: + _cfml_kvec_symmetry_mp_latsym_ in libCrysFML08.a(ksym_auxsub.o) + "_cfml_kvec_symmetry_mp_nlat_", referenced from: + _cfml_kvec_symmetry_mp_latsym_ in libCrysFML08.a(ksym_auxsub.o) +ld: symbol(s) not found for architecture x86_64 +``` -### To run locally +### Local build -* Create and activate a python environment (_optional_) +* Create and activate a python environment (_optional_) + + ***macOS and Linux*** ``` - $ python3.11 -m venv .venv - $ source .venv/bin/activate + python3.11 -m venv .venv + source .venv/bin/activate + ``` + + ***Windows*** + + ``` + python3.11 -m venv .venv + .venv\Scripts\activate ``` * Upgrade the package installer for Python (_optional_) ``` - $ python -m pip install --upgrade pip + pip install --upgrade pip ``` -* Install Python dependences, including extras +* Install Python dependences, including extras (ci and test) ``` - $ python -m pip install '.[ci,test]' + pip install '.[ci,test]' ``` * Print possible options for creating job scripts (_optional_) ``` - $ python scripts.py --help + python scripts.py --help ``` * Create job scripts with default options ``` - $ python scripts.py + python scripts.py ``` * Print some build-specific variables (_optional_) ``` - $ scripts/print_build_variables.sh + scripts/print_build_variables.sh + ``` + +* Create CFML and pyCFML directories + + ``` + scripts/create_cfml_repo_dir.sh + scripts/create_cfml_build_dir.sh + scripts/create_cfml_dist_dir.sh + scripts/create_pycfml_src_dir.sh + scripts/create_pycfml_build_dir.sh + scripts/create_pycfml_dist_dir.sh + ``` + +* Download CFML repository + + ``` + scripts/download_cfml_repo.sh + ``` + +* Build CFML modules + + ``` + scripts/rename_global_deps_file.sh + scripts/build_cfml_modules_obj.sh + scripts/delete_renamed_global_deps_file.sh + ``` + +* Build CFML static library + + ``` + scripts/build_cfml_static_lib.sh + ``` + +* Make CFML distribution + + ``` + scripts/move_built_to_cfml_dist.sh + ``` + +* Build und run CFML functional test programs + + ``` + scripts/build_cfml_test_programs.sh + scripts/copy_cfml_test_programs_to_tests_dir.sh + scripts/run_cfml_functional_tests_no_benchmarks.sh + ``` + +* Create pyCFML source code + + ``` + scripts/create_pycfml_src.sh + ``` + +* Build pyCFML modules + + ``` + scripts/build_pycfml_modules_obj.sh + ``` + +* Build pyCFML shared obj / dynamic library + + ``` + scripts/build_pycfml_lib_obj.sh + scripts/build_pycfml_shared_obj_or_dynamic_lib.sh + ``` + +* Make pyCFML distribution + + ``` + scripts/copy_built_to_pycfml_dist.sh + scripts/change_runpath_for_built_pycfml.sh + scripts/copy_extra_libs_to_pycfml_dist.sh + scripts/copy_py_api_files_to_pycfml_dist.sh + scripts/copy_init_file_to_pycfml_dist.sh + scripts/copy_cfml_databases_to_pycfml_dist.sh + ``` + +* Create Python package wheel of pyCFML + + ``` + scripts/validate_pyproject_toml.sh + scripts/create_pycfml_python_wheel.sh + scripts/rename_pycfml_python_wheel.sh + ``` + +* Install pyCFML from Python package wheel (with dev extras) + + ``` + scripts/install_pycfml_from_wheel.sh + ``` + +* Run pyCFML unit tests + + ``` + scripts/run_pycfml_unit_tests.sh ``` -* Run all scripts in sequence +* Run pyCFML functional tests ``` - $ scripts/main_script.sh + scripts/run_pycfml_functional_tests_no_benchmarks.sh ```