From ee00633a6f882115a3133c8faad7896fcecd0448 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 09:18:53 -0400 Subject: [PATCH 01/18] conda environment added to build the package with latest versions of conda build tools --- .github/workflows/unittest.yml | 24 ++++++++++++++++------ conda-recipe/bld.bat | 1 - conda-recipe/build.sh | 3 --- conda-recipe/meta.yaml | 37 ---------------------------------- conda-recipe/run-build.sh | 1 - conda_environment.yml | 14 +++++++++++++ environment.yml | 2 +- pyproject.toml | 4 ++-- 8 files changed, 35 insertions(+), 51 deletions(-) delete mode 100644 conda-recipe/bld.bat delete mode 100644 conda-recipe/build.sh delete mode 100644 conda-recipe/meta.yaml delete mode 100755 conda-recipe/run-build.sh create mode 100644 conda_environment.yml diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index afef764..37f143a 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -37,7 +37,7 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true - conda-build: + python-build: runs-on: ubuntu-latest defaults: run: @@ -54,13 +54,26 @@ jobs: - conda-forge - mcvine - mantid - - name: install multiphonon - run: | - python -m pip install -e . - - name: building python wheel + - name: Build python wheel shell: bash -l {0} run: | python -m build --wheel --no-isolation + check-wheel-contents dist/multiphonon-*.whl + conda-build: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: conda_environment.yml + cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/environment.yml') }} + cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }} + condarc: | + channels: + - conda-forge - name: build conda package shell: bash -l {0} run: | @@ -68,7 +81,6 @@ jobs: cd conda.recipe echo "versioningit $(versioningit ../)" # build the package - CHANNELS="--channel mcvine --channel mantid --channel conda-forge" VERSION=$(versioningit ../) conda mambabuild --output-folder . . conda verify noarch/multiphonon*.tar.bz2 - name: upload conda package to anaconda diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat deleted file mode 100644 index cbf296f..0000000 --- a/conda-recipe/bld.bat +++ /dev/null @@ -1 +0,0 @@ -echo Windows build is not supported diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh deleted file mode 100644 index 50c8cfb..0000000 --- a/conda-recipe/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -python setup.py install --prefix=$PREFIX diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100644 index 50cddb7..0000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -package: - name: multiphonon - version: "0.1.6" - -source: - git_rev: v0.1.6 - git_url: https://github.com/neutrons/multiphonon.git - -requirements: - build: - - python - - numpy - - scipy - - run: - - python - - numpy - - histogram - - scipy - - matplotlib - - pytest - - pyyaml - - mantid -# - ipywe - -build: - noarch: python - script_env: - -test: - imports: - - multiphonon - -about: - home: - license: - license_file: diff --git a/conda-recipe/run-build.sh b/conda-recipe/run-build.sh deleted file mode 100755 index b73042a..0000000 --- a/conda-recipe/run-build.sh +++ /dev/null @@ -1 +0,0 @@ -conda build --python 3.9 --numpy 1.20 . diff --git a/conda_environment.yml b/conda_environment.yml new file mode 100644 index 0000000..6e6999b --- /dev/null +++ b/conda_environment.yml @@ -0,0 +1,14 @@ +name: multiphonon_conda +channels: + - conda-forge +dependencies: + - anaconda-client + - boa + - check-wheel-contents + - conda-build + - conda-verify + - libmamba + - libarchive + - python-build + - versioningit + - setuptools diff --git a/environment.yml b/environment.yml index 65fa5ff..0912473 100644 --- a/environment.yml +++ b/environment.yml @@ -5,7 +5,7 @@ channels: - mantid dependencies: - anaconda-client - - boa + #- boa >= 0.10.0 - check-wheel-contents - conda-build - conda-verify diff --git a/pyproject.toml b/pyproject.toml index dc46107..c8b83a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ requires = [ "wheel", "toml", "versioningit", - "numpy == 1.20.3", - "scipy == 1.9.0" + "numpy >= 1.20.3", + "scipy >= 1.9.0" ] build-backend = "setuptools.build_meta" From 2d3576a8d7ae17a9f6432b36a39f780587cf5da5 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 09:40:04 -0400 Subject: [PATCH 02/18] conda environment creations as a substep --- .github/workflows/unittest.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 37f143a..4d19648 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,26 +54,16 @@ jobs: - conda-forge - mcvine - mantid + - name: Build python wheel + shell: bash -l {0} + run: | + conda env create -f conda_environment.yml + conda activate multiphonon_conda - name: Build python wheel shell: bash -l {0} run: | python -m build --wheel --no-isolation check-wheel-contents dist/multiphonon-*.whl - conda-build: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v4 - - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: conda_environment.yml - cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/environment.yml') }} - cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }} - condarc: | - channels: - - conda-forge - name: build conda package shell: bash -l {0} run: | From fbcff32557d71a417d7d37d4c392c00aa594a723 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 09:45:57 -0400 Subject: [PATCH 03/18] conda environment activate as a substep --- .github/workflows/unittest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 4d19648..31b93bd 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,10 +54,13 @@ jobs: - conda-forge - mcvine - mantid - - name: Build python wheel + - name: Create conda environment shell: bash -l {0} run: | conda env create -f conda_environment.yml + - name: Activate conda environment + shell: bash -l {0} + run: | conda activate multiphonon_conda - name: Build python wheel shell: bash -l {0} From 109b3b1844a35e6f5873c3828f7c167ce01b6b81 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 11:11:50 -0400 Subject: [PATCH 04/18] python wheel is passed to the next job --- .github/workflows/unittest.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 31b93bd..0666d9b 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -54,19 +54,35 @@ jobs: - conda-forge - mcvine - mantid - - name: Create conda environment - shell: bash -l {0} - run: | - conda env create -f conda_environment.yml - - name: Activate conda environment - shell: bash -l {0} - run: | - conda activate multiphonon_conda - name: Build python wheel shell: bash -l {0} run: | python -m build --wheel --no-isolation check-wheel-contents dist/multiphonon-*.whl + - name: Upload python wheel + uses: actions/upload-artifact@v4 + with: + name: multiphonon_wheel + path: dist/multiphonon-*.whl + conda-build: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: cobda_environment.yml + cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/cobda_environment.yml') }} + cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/cobda_environment.yml') }} + condarc: | + channels: + - conda-forge + - name: Download python wheel from python-build + uses: actions/download-artifact@v4 + with: + name: multiphonon_wheel - name: build conda package shell: bash -l {0} run: | From 999e07f59233914e1cfc9b9c6d943780dc7a9723 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 11:16:04 -0400 Subject: [PATCH 05/18] typo --- .github/workflows/unittest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 0666d9b..7227b92 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -73,9 +73,9 @@ jobs: - uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: - environment-file: cobda_environment.yml - cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/cobda_environment.yml') }} - cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/cobda_environment.yml') }} + environment-file: conda_environment.yml + cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/conda_environment.yml') }} + cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/conda_environment.yml') }} condarc: | channels: - conda-forge From ddd96967080831d8a38296c30de96d5ab185de53 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 11:39:49 -0400 Subject: [PATCH 06/18] job dependency --- .github/workflows/unittest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 7227b92..f36422a 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -65,6 +65,7 @@ jobs: name: multiphonon_wheel path: dist/multiphonon-*.whl conda-build: + needs: python-build runs-on: ubuntu-latest defaults: run: From 4638005d4c167c589a351b43ccb3fcba2d30d9f8 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 12:06:05 -0400 Subject: [PATCH 07/18] download python wheel in dist --- .github/workflows/unittest.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index f36422a..782e578 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -80,10 +80,20 @@ jobs: condarc: | channels: - conda-forge + - name: Mkdir dist + shell: bash -l {0} + run: | + # set up environment + mkdir dist + cd dist/ - name: Download python wheel from python-build uses: actions/download-artifact@v4 with: name: multiphonon_wheel + - shell: bash -l {0} + run: | + # set up environment + ls -la - name: build conda package shell: bash -l {0} run: | From 41e401e605dbb3821317a8921e0f2134bb635dfd Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 12:16:30 -0400 Subject: [PATCH 08/18] artifact folder added --- .github/workflows/unittest.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 782e578..4118b6d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -80,24 +80,24 @@ jobs: condarc: | channels: - conda-forge - - name: Mkdir dist - shell: bash -l {0} - run: | - # set up environment - mkdir dist - cd dist/ + # - name: Mkdir dist + # shell: bash -l {0} + # run: | + # # set up environment + # mkdir dist - name: Download python wheel from python-build uses: actions/download-artifact@v4 with: name: multiphonon_wheel + path: dist - shell: bash -l {0} run: | - # set up environment + # show files ls -la - name: build conda package shell: bash -l {0} run: | - # set up environment + # enter conda cd conda.recipe echo "versioningit $(versioningit ../)" # build the package From 20ff843021fd206c7b4019dec7c7e4af84c7954d Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 12:25:11 -0400 Subject: [PATCH 09/18] conda.recipe added --- .gitignore | 2 - conda.recipe/bld.bat | 1 + conda.recipe/channeldata.json | 1 + conda.recipe/index.html | 90 +++++++++++++++++++++++++++++++++++ conda.recipe/meta.yaml | 54 +++++++++++++++++++++ conda.recipe/reomove_build.sh | 3 ++ conda.recipe/run-build.sh | 1 + 7 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 conda.recipe/bld.bat create mode 100644 conda.recipe/channeldata.json create mode 100644 conda.recipe/index.html create mode 100644 conda.recipe/meta.yaml create mode 100644 conda.recipe/reomove_build.sh create mode 100755 conda.recipe/run-build.sh diff --git a/.gitignore b/.gitignore index 9195ee7..15bef93 100644 --- a/.gitignore +++ b/.gitignore @@ -26,9 +26,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST -conda.recipe/ src/multiphonon/_version.py -!conda.recipe/meta.yaml # PyInstaller # Usually these files are written by a python script from a template diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat new file mode 100644 index 0000000..cbf296f --- /dev/null +++ b/conda.recipe/bld.bat @@ -0,0 +1 @@ +echo Windows build is not supported diff --git a/conda.recipe/channeldata.json b/conda.recipe/channeldata.json new file mode 100644 index 0000000..dcecbd7 --- /dev/null +++ b/conda.recipe/channeldata.json @@ -0,0 +1 @@ +{"channeldata_version":1,"packages":{"multiphonon":{"activate.d":false,"binary_prefix":false,"deactivate.d":false,"home":"https://github.com/neutrons/multiphonon","license":"BSD","post_link":false,"pre_link":false,"pre_unlink":false,"run_exports":{},"source_git_url":"https://github.com/neutrons/multiphonon.git","subdirs":["noarch"],"summary":"Multiphonon scattering and multiple scattering correction for powder data","text_prefix":false,"timestamp":1720790016,"version":"0.2.0.dev11+d202407121312"}},"subdirs":["linux-64","noarch"]} diff --git a/conda.recipe/index.html b/conda.recipe/index.html new file mode 100644 index 0000000..80bc118 --- /dev/null +++ b/conda.recipe/index.html @@ -0,0 +1,90 @@ + + + conda.recipe + + + +

conda.recipe

+

RSS Feed   channeldata.json

+linux-64   noarch    + + + + + + + + + + + + + + + +
PackageLatest VersionDocDevLicenselinux-64noarch Summary
multiphonon0.2.0.dev11+d2BSDX Multiphonon scattering and multiple scattering correction for powder data
+
Updated: 2024-07-12 13:13:38 +0000 - Files: 1
+ + diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 0000000..da55e04 --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,54 @@ +# load information from pyproject.toml +{% set pyproject = load_file_data('pyproject.toml') %} +{% set project = pyproject.get('project', {}) %} +{% set license = project.get('license').get('text') %} +{% set description = project.get('description') %} +{% set project_url = pyproject.get('project', {}).get('urls') %} +{% set url = project_url.get('homepage') %} +# this will get the version set by environment variable +{% set version = environ.get('VERSION') %} +{% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} + +package: + name: multiphonon + version: {{version}} + +channels: + - conda-forge + +source: + path: .. + +build: + noarch: python + number: {{ git_describe_number }} + string: py{{py}} + script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv + +requirements: + host: + - python + - versioningit + + build: + - setuptools + - versioningit + + run: + - numpy + - histogram + - scipy + - matplotlib + - mantid + + test: + imports: + - multiphonon + + +about: + home: {{ url }} + license: {{ license }} + license_family: GPL + license_file: ../LICENSE + summary: {{ description }} diff --git a/conda.recipe/reomove_build.sh b/conda.recipe/reomove_build.sh new file mode 100644 index 0000000..50c8cfb --- /dev/null +++ b/conda.recipe/reomove_build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +python setup.py install --prefix=$PREFIX diff --git a/conda.recipe/run-build.sh b/conda.recipe/run-build.sh new file mode 100755 index 0000000..b73042a --- /dev/null +++ b/conda.recipe/run-build.sh @@ -0,0 +1 @@ +conda build --python 3.9 --numpy 1.20 . From f2875ca4927a128b3dec85988167f72c30a91e98 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 13:13:29 -0400 Subject: [PATCH 10/18] dependencies --- conda_environment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda_environment.yml b/conda_environment.yml index 6e6999b..898e0ab 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -1,6 +1,8 @@ name: multiphonon_conda channels: - conda-forge + - mcvine + - mantid dependencies: - anaconda-client - boa From efd8c4ee34d2539bd94e9ed0073ed46656c552a5 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 13:29:39 -0400 Subject: [PATCH 11/18] conda environment with additional packages --- .github/workflows/unittest.yml | 2 ++ conda_environment.yml | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 4118b6d..9acc1b6 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -80,6 +80,8 @@ jobs: condarc: | channels: - conda-forge + - mantid + - mcvine # - name: Mkdir dist # shell: bash -l {0} # run: | diff --git a/conda_environment.yml b/conda_environment.yml index 898e0ab..62090f3 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -1,16 +1,35 @@ -name: multiphonon_conda +name: multiphonon_pip channels: - conda-forge - - mcvine - mantid + - mcvine dependencies: - anaconda-client - boa - check-wheel-contents - conda-build - conda-verify + - coverage + - mantid >= 6.4 + - matplotlib - libmamba - libarchive + - pre-commit + - python >=3.8 + - pytest + - pytest-cov - python-build + - sphinx + - sphinx-rtd-theme + - numpydoc - versioningit - setuptools + - coveralls + - ipywidgets # used in one test + - pyre + - pip + - pip: + - histograms + - numpy + - scipy + - ipywe == 0.1.3a1 From 4e7827ba93a72ac9cd428edd93eee925d29e44a5 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 13:56:36 -0400 Subject: [PATCH 12/18] unnecessary files removed --- conda.recipe/channeldata.json | 1 - conda.recipe/index.html | 90 ----------------------------------- conda.recipe/reomove_build.sh | 3 -- conda_environment.yml | 1 + 4 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 conda.recipe/channeldata.json delete mode 100644 conda.recipe/index.html delete mode 100644 conda.recipe/reomove_build.sh diff --git a/conda.recipe/channeldata.json b/conda.recipe/channeldata.json deleted file mode 100644 index dcecbd7..0000000 --- a/conda.recipe/channeldata.json +++ /dev/null @@ -1 +0,0 @@ -{"channeldata_version":1,"packages":{"multiphonon":{"activate.d":false,"binary_prefix":false,"deactivate.d":false,"home":"https://github.com/neutrons/multiphonon","license":"BSD","post_link":false,"pre_link":false,"pre_unlink":false,"run_exports":{},"source_git_url":"https://github.com/neutrons/multiphonon.git","subdirs":["noarch"],"summary":"Multiphonon scattering and multiple scattering correction for powder data","text_prefix":false,"timestamp":1720790016,"version":"0.2.0.dev11+d202407121312"}},"subdirs":["linux-64","noarch"]} diff --git a/conda.recipe/index.html b/conda.recipe/index.html deleted file mode 100644 index 80bc118..0000000 --- a/conda.recipe/index.html +++ /dev/null @@ -1,90 +0,0 @@ - - - conda.recipe - - - -

conda.recipe

-

RSS Feed   channeldata.json

-linux-64   noarch    - - - - - - - - - - - - - - - -
PackageLatest VersionDocDevLicenselinux-64noarch Summary
multiphonon0.2.0.dev11+d2BSDX Multiphonon scattering and multiple scattering correction for powder data
-
Updated: 2024-07-12 13:13:38 +0000 - Files: 1
- - diff --git a/conda.recipe/reomove_build.sh b/conda.recipe/reomove_build.sh deleted file mode 100644 index 50c8cfb..0000000 --- a/conda.recipe/reomove_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -python setup.py install --prefix=$PREFIX diff --git a/conda_environment.yml b/conda_environment.yml index 62090f3..ef1d040 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -27,6 +27,7 @@ dependencies: - coveralls - ipywidgets # used in one test - pyre + - histogram - pip - pip: - histograms From f78f08e5f27bc4564169abe59f5cf07df4edbb01 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 15:34:51 -0400 Subject: [PATCH 13/18] pyre version --- conda_environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_environment.yml b/conda_environment.yml index ef1d040..cfa2988 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -26,7 +26,7 @@ dependencies: - setuptools - coveralls - ipywidgets # used in one test - - pyre + - pyre == 0.8.3 - histogram - pip - pip: From d4e0a5ccc2515dfb26ccb4e79150c0d52d2da498 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 16:49:44 -0400 Subject: [PATCH 14/18] unused at the moment packages are placed in comments --- conda_environment.yml | 3 +-- environment.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/conda_environment.yml b/conda_environment.yml index cfa2988..e7cdc60 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -30,7 +30,6 @@ dependencies: - histogram - pip - pip: - - histograms - - numpy + - numpy #<2.0.0 - scipy - ipywe == 0.1.3a1 diff --git a/environment.yml b/environment.yml index 0912473..413a68f 100644 --- a/environment.yml +++ b/environment.yml @@ -4,11 +4,11 @@ channels: - mcvine - mantid dependencies: - - anaconda-client - #- boa >= 0.10.0 - - check-wheel-contents - - conda-build - - conda-verify + #- anaconda-client + #- boa + #- check-wheel-contents + #- conda-build + #- conda-verify - coverage - histogram == 0.3.9 - numpy == 1.20.3 @@ -17,8 +17,8 @@ dependencies: - pyre == 0.8.3 - mantid == 6.4 - matplotlib - - libmamba - - libarchive + #- libmamba + #- libarchive - pre-commit - pytest - pytest-cov From 402f2f06739b2ee0eaf43c45f63d02e4074fb8f1 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 12 Jul 2024 16:54:53 -0400 Subject: [PATCH 15/18] check whhels added back --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 413a68f..df7db29 100644 --- a/environment.yml +++ b/environment.yml @@ -6,7 +6,7 @@ channels: dependencies: #- anaconda-client #- boa - #- check-wheel-contents + - check-wheel-contents #- conda-build #- conda-verify - coverage From ffeeed0973991289f341d52c9c27761622d1d465 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Wed, 17 Jul 2024 13:14:47 -0400 Subject: [PATCH 16/18] unused build files removed, environment an pyproject updated --- .github/workflows/unittest.yml | 7 +------ conda.recipe/bld.bat | 1 - conda.recipe/run-build.sh | 1 - environment.yml | 4 ++-- pyproject.toml | 4 ++-- 5 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 conda.recipe/bld.bat delete mode 100755 conda.recipe/run-build.sh diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 9acc1b6..49b42d3 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -59,7 +59,7 @@ jobs: run: | python -m build --wheel --no-isolation check-wheel-contents dist/multiphonon-*.whl - - name: Upload python wheel + - name: Upload python wheel in the repo # the artifact is saved for building the conda package uses: actions/upload-artifact@v4 with: name: multiphonon_wheel @@ -82,11 +82,6 @@ jobs: - conda-forge - mantid - mcvine - # - name: Mkdir dist - # shell: bash -l {0} - # run: | - # # set up environment - # mkdir dist - name: Download python wheel from python-build uses: actions/download-artifact@v4 with: diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat deleted file mode 100644 index cbf296f..0000000 --- a/conda.recipe/bld.bat +++ /dev/null @@ -1 +0,0 @@ -echo Windows build is not supported diff --git a/conda.recipe/run-build.sh b/conda.recipe/run-build.sh deleted file mode 100755 index b73042a..0000000 --- a/conda.recipe/run-build.sh +++ /dev/null @@ -1 +0,0 @@ -conda build --python 3.9 --numpy 1.20 . diff --git a/environment.yml b/environment.yml index df7db29..7185394 100644 --- a/environment.yml +++ b/environment.yml @@ -11,8 +11,8 @@ dependencies: #- conda-verify - coverage - histogram == 0.3.9 - - numpy == 1.20.3 - - scipy == 1.9.0 + - numpy >= 1.20.3,< 2.0 + - scipy >= 1.9.0,< 1.14.0 - python >=3.8 - pyre == 0.8.3 - mantid == 6.4 diff --git a/pyproject.toml b/pyproject.toml index c8b83a3..0e0ce36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ requires = [ "wheel", "toml", "versioningit", - "numpy >= 1.20.3", - "scipy >= 1.9.0" + "numpy >= 1.20.3, <2.0", + "scipy >= 1.9.0, < 1.14.0" ] build-backend = "setuptools.build_meta" From 437f1b1708934220384e788313a12e841bb4255a Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Wed, 17 Jul 2024 13:17:32 -0400 Subject: [PATCH 17/18] wrkflow renamed --- .github/workflows/{unittest.yml => workflow.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{unittest.yml => workflow.yml} (100%) diff --git a/.github/workflows/unittest.yml b/.github/workflows/workflow.yml similarity index 100% rename from .github/workflows/unittest.yml rename to .github/workflows/workflow.yml From 8a1346aa77b16e7635e07bc55d232ecb04626986 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Wed, 17 Jul 2024 16:55:01 -0400 Subject: [PATCH 18/18] notes for the conda packages --- README.md | 27 +++++++++++++++++++++++++++ conda_environment.yml | 4 +++- environment.yml | 2 ++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cedfd1f..0d67a6d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,33 @@ This code converts a S(Q,E) INS spectrum to DOS. * Intermediate results are saved for further investigation * Handle inputs in nxs and nxspe files for sample and empty can measurements (requires Mantid) +## Development Installation and Testing + +Create and activate conda environment for shiver development + +```bash +conda env create +# or +mamba env create + +conda activate multiphonon +``` +The environment.yml is used for building the code in editable mode and creating the python wheel + +Install multiphonon (in editable mode) + +```bash +python -m pip install -e . + +``` + +```bash +pytest + +``` + +The conda_environment.yml is only used to build the multiphonon as a conda package. + ## Installation Installation is handled with conda. Please see [Installation instructions](https://sns-chops.github.io/multiphonon/installation.html) for details. diff --git a/conda_environment.yml b/conda_environment.yml index e7cdc60..2544c53 100644 --- a/conda_environment.yml +++ b/conda_environment.yml @@ -1,4 +1,6 @@ -name: multiphonon_pip +#Only for conda build with boa depedency +#Only use for building a conda package: conda mambabuild +name: multiphonon_conda_build_only channels: - conda-forge - mantid diff --git a/environment.yml b/environment.yml index 7185394..43802e5 100644 --- a/environment.yml +++ b/environment.yml @@ -1,3 +1,5 @@ +#default environment for installing python package +#Note: Use this name: multiphonon channels: - conda-forge