Skip to content

Commit 7a792a5

Browse files
authored
Fix PyRosettaCluster environment reproduction unit tests and add PyRosettaCluster documentation (#4)
The aim of this PR is to: 1. Fix PyRosettaCluster environment reproduction unit tests using Conda, Mamba, uv, and Pixi 2. Add unit tests for Python 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14 3. Add PyRosettaCluster documentation 4. Reorganize the repository structure to support future development
1 parent f1f2ca5 commit 7a792a5

21 files changed

+1820
-239
lines changed

.github/workflows/pyrosetta.yml

Lines changed: 0 additions & 177 deletions
This file was deleted.
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: PyRosettaCluster Tests
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
tags: ['*']
7+
pull_request:
8+
branches: ['*']
9+
schedule:
10+
# Run Every Monday 4 AM UTC
11+
- cron: '0 4 * * 1'
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
18+
# ============================================================
19+
# PIXI JOB
20+
# ============================================================
21+
pixi:
22+
name: Pixi
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install Pixi
37+
run: |
38+
curl -fsSL https://pixi.sh/install.sh | bash
39+
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
40+
41+
- name: Verify Pixi
42+
run: |
43+
export PATH="$HOME/.pixi/bin:$PATH"
44+
pixi --version
45+
46+
- name: Add repo root to PYTHONPATH
47+
run: echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}" >> $GITHUB_ENV
48+
49+
- name: Run tests (pixi)
50+
shell: bash
51+
run: |
52+
export PATH="$HOME/.pixi/bin:$PATH"
53+
which python
54+
python --version
55+
python -u -m unittest actions.pyrosettacluster.test_env_reproducibility.TestEnvironmentReproducibility.test_recreate_environment_pixi -v
56+
57+
58+
# ============================================================
59+
# UV JOB
60+
# ============================================================
61+
uv:
62+
name: Uv
63+
runs-on: ubuntu-latest
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
68+
steps:
69+
- uses: actions/checkout@v4
70+
71+
- name: Set up Python
72+
uses: actions/setup-python@v4
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Install uv
77+
run: |
78+
curl -LsSf https://astral.sh/uv/install.sh | sh
79+
echo "$HOME/.local/bin" >> $GITHUB_PATH
80+
uv --version
81+
82+
- name: Add repo root to PYTHONPATH
83+
run: echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}" >> $GITHUB_ENV
84+
85+
- name: Run tests (uv)
86+
shell: bash
87+
run: |
88+
which python
89+
python --version
90+
python -u -m unittest actions.pyrosettacluster.test_env_reproducibility.TestEnvironmentReproducibility.test_recreate_environment_uv -v
91+
92+
93+
# ============================================================
94+
# CONDA JOB
95+
# ============================================================
96+
conda:
97+
name: Conda
98+
runs-on: ubuntu-latest
99+
strategy:
100+
fail-fast: false
101+
matrix:
102+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
103+
steps:
104+
- uses: actions/checkout@v4
105+
106+
- name: Set up Conda
107+
uses: conda-incubator/setup-miniconda@v3
108+
with:
109+
python-version: ${{ matrix.python-version }}
110+
auto-update-conda: true
111+
activate-environment: conda-job
112+
use-mamba: false
113+
channel-priority: strict
114+
115+
- name: Add repo root to PYTHONPATH
116+
run: echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}" >> $GITHUB_ENV
117+
118+
- name: Run tests (conda)
119+
shell: bash
120+
run: |
121+
which python
122+
python --version
123+
python -u -m unittest actions.pyrosettacluster.test_env_reproducibility.TestEnvironmentReproducibility.test_recreate_environment_conda -v
124+
125+
126+
# ============================================================
127+
# MAMBA JOB
128+
# ============================================================
129+
mamba:
130+
name: Mamba
131+
runs-on: ubuntu-latest
132+
strategy:
133+
fail-fast: false
134+
matrix:
135+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
136+
steps:
137+
- uses: actions/checkout@v4
138+
139+
- name: Set up Conda
140+
uses: conda-incubator/setup-miniconda@v3
141+
with:
142+
auto-update-conda: true
143+
activate-environment: ''
144+
channel-priority: strict
145+
146+
- name: Install Mamba
147+
shell: bash -l {0}
148+
run: |
149+
conda install -y -n base -c conda-forge mamba
150+
151+
- name: Set Mamba cache
152+
shell: bash -l {0}
153+
run: |
154+
mkdir -p $HOME/.conda/pkgs
155+
export CONDA_PKGS_DIRS="$HOME/.conda/pkgs"
156+
echo "CONDA_PKGS_DIRS=$CONDA_PKGS_DIRS"
157+
158+
- name: Check Mamba
159+
shell: bash -l {0}
160+
run: |
161+
export PATH="/usr/share/miniconda/bin:$PATH"
162+
export CONDA_PKGS_DIRS="$HOME/.conda/pkgs"
163+
echo "PATH=$PATH"
164+
which mamba
165+
mamba --version
166+
167+
- name: Add repo root to PYTHONPATH
168+
run: |
169+
export PATH="/usr/share/miniconda/bin:$PATH"
170+
export CONDA_PKGS_DIRS="$HOME/.conda/pkgs"
171+
echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}" >> $GITHUB_ENV
172+
173+
- name: Run tests (mamba)
174+
shell: bash -l {0}
175+
run: |
176+
export PATH="/usr/share/miniconda/bin:$PATH"
177+
export CONDA_PKGS_DIRS="$HOME/.conda/pkgs"
178+
which python
179+
python --version
180+
python -u -m unittest actions.pyrosettacluster.test_env_reproducibility.TestEnvironmentReproducibility.test_recreate_environment_mamba -v

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ✨ PyRosetta Extras: a repository for PyRosetta scripts, tools, unit testing, and documentation
1+
# ✨ PyRosetta Extras: a repository for extra PyRosetta scripts, tools, unit testing, and documentation
22
> [!IMPORTANT]
33
> Scripts in this GitHub repository may require download and installation of [PyRosetta software](https://www.pyrosetta.org/downloads) to run properly.
44
> Downloads of PyRosetta software are provided to academic and non-commercial users under the [PyRosetta Software Non-Commercial License Agreement](https://github.com/RosettaCommons/rosetta/blob/main/LICENSE.PyRosetta.md).

actions/__init__.py

Whitespace-only changes.

actions/pyrosettacluster/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)