Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
42e27ea
Add pre-commit hooks (Ruff + fixers) with CI enforcement
jahnzh Jul 7, 2026
efd7940
Apply Ruff format + hooks normalization across the repo
jahnzh Jul 7, 2026
29a3c72
Drop Python 3.8 and 3.9 support (minimum is now 3.10)
jahnzh Jul 7, 2026
53cbe1c
Merge pull request #17 from csi-greifflab/feature/pre-commit-hooks
jahnzh Jul 7, 2026
c31fbd0
Add GHCR Docker publishing to test and main release workflows.
jahnzh Jul 7, 2026
6325e62
Address review: remove git dep, exclude tests, add --user flag, defer…
Copilot Jul 7, 2026
a3dc8dd
Merge branch 'test' into feature/docker-ghcr-publish
jahnzh Jul 7, 2026
e84f3a0
Fix trailing whitespace in publish-main-branch-trusted.yml
Copilot Jul 7, 2026
5d132b8
Merge pull request #18 from csi-greifflab/feature/docker-ghcr-publish
jahnzh Jul 7, 2026
8e1ab5e
Add METL 1D embeddings via optional metl-pretrained extra.
jahnzh Jul 7, 2026
a096e4e
docs: document METL 1D optional backend in README.
jahnzh Jul 7, 2026
b8c8620
docs: refine METL README with install and library examples.
jahnzh Jul 7, 2026
76b9859
Merge branch 'test' into feat/metl-1d-embeddings
jahnzh Jul 7, 2026
f564919
Fix METL layer-hook mapping and default layer selection
jahnzh Jul 7, 2026
0b7b073
fix pre-commit lint formatting failures
Copilot Jul 7, 2026
262fa3a
fix: address PR review feedback for METL dispatch and CI gating
Copilot Jul 7, 2026
b5fbd59
Merge pull request #19 from csi-greifflab/feat/metl-1d-embeddings
jahnzh Jul 7, 2026
918e9bf
Initial plan
Copilot Jul 7, 2026
1f8091f
Merge remote-tracking branch 'origin/test' into copilot/fix-build-and…
Copilot Jul 7, 2026
39c6efc
Fix TestPyPI publish failure: remove git URL from metl optional depen…
Copilot Jul 7, 2026
0d4571b
Add permissions: contents read to test.yml workflow (CodeQL fix)
Copilot Jul 7, 2026
4cd517d
Merge pull request #20 from csi-greifflab/copilot/fix-build-and-publi…
jahnzh Jul 7, 2026
cf1e7fa
Release 1.5.0: bump version and cut changelog section.
jahnzh Jul 7, 2026
f5cfe39
Fix METL review findings for dispatch and reconstruction
Copilot Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.git
.github
.claude
.venv
.venv-*
venv
env
__pycache__
*.py[cod]
*.egg-info
dist
build
.pytest_cache
.mypy_cache
.coverage
htmlcov
*.pt
*.pth
data
ignore
ignore.py
test_library_out*
test_verify_*
readme_advanced_results
readme_example_results
src/tests/test_files/test_output
*.tsv
*.code-workspace
.vscode
.env
plan.md
ROADMAP.md
src/tests
2 changes: 1 addition & 1 deletion .github/QUICK_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
```
GitHub Repository → Settings → Environments → New environment
Name: testpypi
Protection rules:
Protection rules:
- Deployment branches: test
- Save protection rules
```
Expand Down
4 changes: 2 additions & 2 deletions .github/bioconda_submission_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ about:
license_file: LICENSE
summary: Pipeline for Easy Protein Embedding
description: |
PEPE (Pipeline for Easy Protein Embedding) is a tool for extracting
PEPE (Pipeline for Easy Protein Embedding) is a tool for extracting
embeddings and attention matrices from protein sequences using pre-trained models.
doc_url: https://github.com/csi-greifflab/pepe-cli#readme
dev_url: https://github.com/csi-greifflab/pepe-cli
Expand All @@ -71,7 +71,7 @@ extra:

## Step-by-Step Submission

1. **Fork Bioconda Recipes**:
1. **Fork Bioconda Recipes**:
- Go to [bioconda/bioconda-recipes](https://github.com/bioconda/bioconda-recipes) and fork it.
2. **Clone your fork**:
```bash
Expand Down
4 changes: 2 additions & 2 deletions .github/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ build:

requirements:
host:
- python >=3.8
- python >=3.10
- pip
- setuptools
- wheel
run:
- python >=3.8
- python >=3.10
- pytorch >=1.9.0
- transformers >=4.20.0
- sentencepiece
Expand Down
156 changes: 135 additions & 21 deletions .github/workflows/publish-main-branch-trusted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,49 @@ jobs:
id-token: write # Required for trusted publishing
contents: write # Required for creating releases
pull-requests: read

steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'

- name: Install build dependencies
run: |
python3 -m pip install --upgrade pip
pip install build

- name: Clean build artifacts
run: |
# Remove any cached files that might interfere with the build
find . -name "__pycache__" -type d -exec rm -rf {} + || true
find . -name "*.pyc" -type f -delete || true
rm -rf dist/ build/ *.egg-info/ src/*.egg-info/ || true

- name: Verify version for main branch
run: |
# Extract metadata directly from __init__.py (avoids importing package deps like torch)
CURRENT_VERSION=$(grep -m1 '__version__ = ' src/pepe/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
PACKAGE_NAME=$(grep -m1 '__package_name__ = ' src/pepe/__init__.py | sed 's/__package_name__ = "\(.*\)"/\1/')
MODULE_NAME=$(grep -m1 '__module_name__ = ' src/pepe/__init__.py | sed 's/__module_name__ = "\(.*\)"/\1/')

# Check if version contains -dev or -test (should not be in main branch)
if [[ "$CURRENT_VERSION" == *"-dev"* ]] || [[ "$CURRENT_VERSION" == *"-test"* ]]; then
echo "❌ Error: Version $CURRENT_VERSION contains development/test suffix"
echo "Main branch should have a clean version number (e.g., 1.0.0, 1.2.3)"
exit 1
fi

echo "✅ Version validation passed: $CURRENT_VERSION"
echo "Package name: $PACKAGE_NAME"
echo "Module name: $MODULE_NAME"
grep "__version__" src/pepe/__init__.py

- name: Build package
run: python3 -m build

- name: Verify build artifacts
run: |
echo "📦 Build artifacts created:"
Expand All @@ -68,13 +68,13 @@ jobs:
file "$file"
echo "SHA256: $(sha256sum "$file" | cut -d' ' -f1)"
done

- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
skip_existing: true

- name: Output installation command
run: |
PACKAGE_NAME=$(grep -m1 '__package_name__ = ' src/pepe/__init__.py | sed 's/__package_name__ = "\(.*\)"/\1/')
Expand All @@ -84,7 +84,7 @@ jobs:
echo "pip install \"$PACKAGE_NAME==$CURRENT_VERSION\""
echo "Or for the latest version:"
echo "pip install \"$PACKAGE_NAME\""

- name: Wait for package availability
run: |
echo "Waiting for package to be available on PyPI..."
Expand All @@ -106,10 +106,10 @@ jobs:
echo "Attempt $i failed, retrying in 30s..."
sleep 30
done

# Verify installation
pip list | grep -i pepe

# Test basic import
python3 -c "import $MODULE_NAME; print('Package imported successfully')"

Expand All @@ -132,34 +132,41 @@ jobs:

echo "🎉 Package verification completed successfully!"
echo "Package $PACKAGE_NAME version $CURRENT_VERSION is now available on PyPI!"


- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist-packages
path: dist/
retention-days: 1

- name: Get version for release
id: get_version
run: |
VERSION=$(grep -m1 '__version__ = ' src/pepe/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: Release v${{ steps.get_version.outputs.version }}
body: |
Release of pepe-cli version ${{ steps.get_version.outputs.version }}

## Installation

### From PyPI (Recommended)
```bash
pip install pepe-cli==${{ steps.get_version.outputs.version }}
```

### From GitHub Release
Download the wheel file and install:
```bash
pip install pepe_cli-${{ steps.get_version.outputs.version }}-py3-none-any.whl
```

files: |
dist/*.whl
dist/*.tar.gz
Expand All @@ -174,7 +181,7 @@ jobs:
needs: build-and-publish-main
steps:
- uses: actions/checkout@v5

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v4
with:
Expand Down Expand Up @@ -207,3 +214,110 @@ jobs:
fi
echo "Found package: $PACKAGE_PATH"
anaconda -t $ANACONDA_TOKEN upload --label main $PACKAGE_PATH

publish-docker:
runs-on: ubuntu-latest
needs: build-and-publish-main
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5

- name: Get version
id: version
run: |
VERSION=$(grep -m1 '__version__ = ' src/pepe/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "image=ghcr.io/csi-greifflab/pepe-cli" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/csi-greifflab/pepe-cli:${{ steps.version.outputs.version }}
ghcr.io/csi-greifflab/pepe-cli:latest
labels: |
org.opencontainers.image.source=${{ github.repository }}
org.opencontainers.image.version=${{ steps.version.outputs.version }}
org.opencontainers.image.title=pepe-cli

- name: Verify container CLI
run: |
docker pull ghcr.io/csi-greifflab/pepe-cli:${{ steps.version.outputs.version }}
docker run --rm ghcr.io/csi-greifflab/pepe-cli:${{ steps.version.outputs.version }} --help

- name: Output Docker pull command
run: |
echo "Docker image published to GHCR:"
echo "docker pull ghcr.io/csi-greifflab/pepe-cli:${{ steps.version.outputs.version }}"

create-release:
runs-on: ubuntu-latest
needs: [build-and-publish-main, publish-docker]
permissions:
contents: write
steps:
- uses: actions/checkout@v5

- name: Get version for release
id: get_version
run: |
VERSION=$(grep -m1 '__version__ = ' src/pepe/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: dist-packages
path: dist/

- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: Release v${{ steps.get_version.outputs.version }}
body: |
Release of pepe-cli version ${{ steps.get_version.outputs.version }}

## Installation

### From PyPI (Recommended)
```bash
pip install pepe-cli==${{ steps.get_version.outputs.version }}
```

### From GitHub Release
Download the wheel file and install:
```bash
pip install pepe_cli-${{ steps.get_version.outputs.version }}-py3-none-any.whl
```

### From GHCR (Docker)
```bash
docker pull ghcr.io/csi-greifflab/pepe-cli:${{ steps.get_version.outputs.version }}
docker run --rm -v "$PWD:/data" --user "$(id -u):$(id -g)" \
ghcr.io/csi-greifflab/pepe-cli:${{ steps.get_version.outputs.version }} \
--model_name esm2_t6_8M_UR50D --fasta_path /data/sequences.fasta --output_path /data/out --extract_embeddings mean_pooled
```

files: |
dist/*.whl
dist/*.tar.gz
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading