Skip to content

Commit

Permalink
Multiphonon dependency upgrade (#158)
Browse files Browse the repository at this point in the history
* conda build with neutrons histogram
* use environment and channel for building packages
* conda_environment yaml file removed
  • Loading branch information
mpatrou authored Oct 17, 2024
1 parent 36e97d0 commit fd555f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 84 deletions.
42 changes: 5 additions & 37 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }}
condarc: |
channels:
- conda-forge
- mcvine
- mantid
- mcvine
- conda-forge
- name: install multiphonon
run: |
python -m pip install -e .
Expand All @@ -51,47 +51,15 @@ jobs:
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }}
condarc: |
channels:
- conda-forge
- mcvine
- mantid
- mcvine
- conda-forge
- 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 in the repo # the artifact is saved for building the conda package
uses: actions/upload-artifact@v4
with:
name: multiphonon_wheel
path: dist/multiphonon-*.whl
conda-build:
needs: python-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('**/conda_environment.yml') }}
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/conda_environment.yml') }}
condarc: |
channels:
- conda-forge
- mantid
- mcvine
- name: Download python wheel from python-build
uses: actions/download-artifact@v4
with:
name: multiphonon_wheel
path: dist
- shell: bash -l {0}
run: |
# show files
ls -la
- name: build conda package
- name: Build conda package
shell: bash -l {0}
run: |
# enter conda
Expand Down
37 changes: 0 additions & 37 deletions conda_environment.yml

This file was deleted.

18 changes: 9 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ channels:
- mcvine
- conda-forge
dependencies:
#- anaconda-client
#- boa
- anaconda-client
- boa
- check-wheel-contents
#- conda-build
#- conda-verify
- conda-build
- conda-verify
- coverage
- histogram == 0.3.9
- numpy >= 1.20.3,< 2.0
- scipy >= 1.9.0,< 1.14.0
- python >=3.8
- python
- pyre == 0.8.3
- mantid == 6.4
- mantid
- matplotlib
#- libmamba
#- libarchive
- libmamba
- libarchive
- pre-commit
- pytest
- pytest-cov
Expand All @@ -35,3 +34,4 @@ dependencies:
- pip
- pip:
- ipywe == 0.1.3a1
- git+https://github.com/neutrons/histogram-dev.git@next#egg=histogram-dev
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires-python = ">=3.8"
dependencies = [
"numpy >= 1.20.3, <2.0",
"scipy >= 1.9.0, < 1.14.0",
"mantid == 6.4",
"mantid",
]
license = { text = "BSD" }
keywords= ["neutron, inelastic neutron scattering, powder, phonon"]
Expand Down

0 comments on commit fd555f9

Please sign in to comment.