Skip to content

Commit cba3d8e

Browse files
authored
Merge pull request #293 from CCPBioSim/292-bug-conda-release
Add Conda packaging and automated Anaconda release workflow
2 parents 8feeecc + 30d93c5 commit cba3d8e

4 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/release.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,30 +163,36 @@ jobs:
163163
sed -i "s/^{% set version = \".*\" %}$/{% set version = \"${{ github.event.inputs.version }}\" %}/" conda-recipe/meta.yaml
164164
grep '{% set version' conda-recipe/meta.yaml
165165
166-
- name: Setup Conda
166+
- name: Setup Conda (conda-forge only)
167167
uses: conda-incubator/setup-miniconda@v3
168168
with:
169169
miniforge-variant: Miniforge3
170170
python-version: "3.12"
171-
auto-activate-base: false
171+
auto-activate: false
172+
conda-remove-defaults: true
173+
channels: conda-forge
174+
channel-priority: strict
172175

173176
- name: Install build tools
174177
shell: bash -l {0}
175178
run: |
176179
conda install -y conda-build anaconda-client
177-
conda config --add channels conda-forge
178-
conda config --set channel_priority strict
179180
conda config --set anaconda_upload no
180181
181182
- name: Build package
182183
shell: bash -l {0}
184+
env:
185+
PIP_NO_INDEX: "0"
183186
run: |
187+
PKG_PATH=$(conda build conda-recipe --output)
188+
echo "PKG_PATH=$PKG_PATH" >> "$GITHUB_ENV"
184189
conda build conda-recipe
190+
test -f "$PKG_PATH"
191+
echo "Built: $PKG_PATH"
185192
186193
- name: Upload to Anaconda
187194
shell: bash -l {0}
188195
env:
189196
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
190197
run: |
191-
PKG_PATH=$(conda build conda-recipe --output)
192198
anaconda -t "$ANACONDA_API_TOKEN" upload "$PKG_PATH" --user CCPBioSim --force

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CodeEntropy
88
| **Documentation** | [![Weekly Docs](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-docs.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-docs.yaml) [![Docs - Status](https://app.readthedocs.org/projects/codeentropy/badge/?version=latest)](https://codeentropy.readthedocs.io/en/latest/?badge=latest) |
99
| **Citation** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17570721.svg)](https://doi.org/10.5281/zenodo.17570721) |
1010
| **PyPI** | ![PyPI - Status](https://img.shields.io/pypi/status/codeentropy?logo=pypi&logoColor=white) ![PyPI - Version](https://img.shields.io/pypi/v/codeentropy?logo=pypi&logoColor=white) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/CodeEntropy) ![PyPI - Total Downloads](https://img.shields.io/pepy/dt/codeentropy?logo=pypi&logoColor=white&color=blue) ![PyPI - Monthly Downloads](https://img.shields.io/pypi/dm/CodeEntropy?logo=pypi&logoColor=white&color=blue) |
11+
| **Anaconda** | [![Anaconda.org](https://anaconda.org/CCPBioSim/codeentropy/badges/version.svg)](https://anaconda.org/CCPBioSim/codeentropy/) [![Last Updated](https://anaconda.org/CCPBioSim/codeentropy/badges/latest_release_date.svg)](https://anaconda.org/CCPBioSim/codeentropy) [![Platforms](https://anaconda.org/CCPBioSim/codeentropy/badges/platforms.svg)](https://anaconda.org/CCPBioSim/codeentropy) [![License](https://anaconda.org/CCPBioSim/codeentropy/badges/license.svg)](https://anaconda.org/CCPBioSim/codeentropy) [![Downloads](https://anaconda.org/CCPBioSim/codeentropy/badges/downloads.svg)](https://anaconda.org/CCPBioSim/codeentropy)|
1112
| **Quality** | [![Coverage Status](https://coveralls.io/repos/github/CCPBioSim/CodeEntropy/badge.svg?branch=main)](https://coveralls.io/github/CCPBioSim/CodeEntropy?branch=main) |
1213

1314
CodeEntropy is a Python package for computing the configurational entropy of macromolecular systems using forces sampled from molecular dynamics (MD) simulations. It implements the multiscale cell correlation method to provide accurate and efficient entropy estimates, supporting a wide range of applications in molecular simulation and statistical mechanics.

conda-recipe/meta.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set name = "CodeEntropy" %}
1+
{% set name = "codeentropy" %}
22
{% set version = "0.0.0" %}
33

44
package:
@@ -10,7 +10,9 @@ source:
1010

1111
build:
1212
noarch: python
13-
script: python -m pip install . -vv --no-deps
13+
script: |
14+
python -m pip install . -vv --no-deps
15+
PIP_NO_INDEX=0 python -m pip install -vv --index-url https://pypi.org/simple waterEntropy
1416
entry_points:
1517
- CodeEntropy=CodeEntropy.cli:main
1618

@@ -20,19 +22,21 @@ requirements:
2022
- pip
2123
- flit-core >=3.4,<4
2224
run:
23-
- python >=3.11
25+
- python >=3.12
2426
- numpy >=2.3,<3.0
2527
- mdanalysis >=2.10,<3.0
2628
- pandas >=3.0,<3.1
2729
- psutil >=7.1,<8.0
2830
- pyyaml >=6.0,<7.0
29-
- python-json-logger >=4.0,<5.0
31+
- python-json-logger >=2.0,<3.0
3032
- rich >=14.2,<15.0
31-
- art >=6.5,<7.0
33+
- python-art >=6.5,<7.0
3234
- networkx >=3.6,<3.7
3335
- matplotlib >=3.10,<3.11
34-
- waterentropy >=2,<2.1
3536
- requests >=2.32,<3.0
37+
- dask >=2026.1.2,<2026.2.0
38+
- distributed >=2026.1.2,<2026.2.0
39+
- dask-jobqueue >=0.9,<0.10
3640

3741
test:
3842
imports:

docs/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Install CodeEntropy:
5151

5252
.. code-block:: bash
5353
54-
conda install -c conda-forge -c CCPBioSim CodeEntropy
54+
conda install -c conda-forge -c CCPBioSim codeentropy
5555
5656
5757
Input Files

0 commit comments

Comments
 (0)