Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.11.0 RC1 #132

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d9d91dc
(feat) added auto handling of traditional pin and testing
jspaezp Sep 6, 2024
31dff36
(fix) added handling of default direction
jspaezp Sep 6, 2024
5940500
(fix) changed intermediate files pin->tsv and fixed tests accordingly
jspaezp Sep 7, 2024
a64c1f2
(chore) formatting on docs and removed T20 from them
jspaezp Sep 7, 2024
1ff50c5
(chore) upgraded to upstream actions
jspaezp Sep 7, 2024
1809edd
(chore) removed unused dependency in docs
jspaezp Sep 7, 2024
3214c24
(chore) reformatted tests
jspaezp Sep 7, 2024
c79f6bd
Feature/confidence streaming (#127)
gessulat Dec 4, 2024
6db5964
Small changes for FlashLFQ writer (#131)
unholyparrot Dec 4, 2024
a17fa4c
wip: formatting and rebasing fixes
jspaezp Dec 5, 2024
8c779fa
chore: merge main
jspaezp Dec 5, 2024
d6ef287
chore: ruff format
jspaezp Dec 5, 2024
1d7475f
wip,chore: re-adding flashlfq support
jspaezp Dec 5, 2024
0074f88
ci,fix: fixed confidence out and ci migration
jspaezp Dec 5, 2024
08d73af
format: eof newline
jspaezp Dec 5, 2024
a7401c3
wip,fix: progress to re-add flashlfq output
jspaezp Dec 5, 2024
35cb9d8
chore: uv lock and formatting
jspaezp Dec 5, 2024
ce53dee
chore: added pr template
jspaezp Dec 5, 2024
d6f58ac
wip: make brew generic again
jspaezp Dec 6, 2024
73a0e14
wip,fix: added deleter to on psm dataset
jspaezp Dec 6, 2024
f7e8dbd
feat: re-added flashlfq support
jspaezp Dec 7, 2024
6045ade
chore: linting + formatting
jspaezp Dec 7, 2024
b02567a
fix: fixtures and progess in definition of cols
jspaezp Dec 8, 2024
b06b01e
test, fix: annotated/commented new fixtures
jspaezp Dec 8, 2024
26c4c78
lint: formatting
jspaezp Dec 8, 2024
874e2f6
ci: removed fail on codecov fail
jspaezp Dec 8, 2024
2e0a5bd
ci: test speedup replacing RF with dtree
jspaezp Dec 8, 2024
9841733
ci: attempt to fix test docker build
jspaezp Dec 8, 2024
6749f84
refactor: change stats to dataclass
jspaezp Dec 13, 2024
1a95140
refactor: extracted output writer factory
jspaezp Dec 14, 2024
0466b71
refactor: extracted level manager in confidence
jspaezp Dec 14, 2024
692a9f2
refactor: extracted level writer group
jspaezp Dec 14, 2024
d4d3e8c
refactor: extracted more writer builder work to class
jspaezp Dec 15, 2024
789f0b5
feat: score propagation and unscored confidence
jspaezp Dec 16, 2024
59e649d
feat(confidence): add data reading api
jspaezp Dec 16, 2024
2e43ce2
feat,experiment: Experimental qvalue-fdr estimation
jspaezp Dec 16, 2024
be91528
chore,docs: updated basic docs to curr api and updated typing
jspaezp Dec 17, 2024
680fc5b
chore: updated basic n joint model docs code (md in progress)
jspaezp Dec 17, 2024
4ece548
chore: updated notebook
jspaezp Dec 17, 2024
409d98d
chore,confidence: update docstrings
jspaezp Dec 19, 2024
100ec58
chore,qvalue: removed commented out code
jspaezp Dec 19, 2024
c246df7
Merge pull request #2 from jspaezp/chore/fix_confidence_api
jspaezp Dec 19, 2024
1e7d68c
chore: fixed line length lints in docstrings
jspaezp Dec 19, 2024
a10cb31
fix,sqlite: fixed path for sqlite writer
jspaezp Dec 20, 2024
a8df8e4
feat, wip: compound key on spectrum
jspaezp Dec 20, 2024
614971f
refactor,wip: centralized column group logic
jspaezp Dec 21, 2024
1ec39df
refactor,dataset: broke module into files and changed tdc implementat…
jspaezp Jan 2, 2025
44bf2e2
fix: fixed string to bool target col conversion and added notes on tests
jspaezp Jan 2, 2025
10b9f02
ci: enabled lint and test on all PRs
jspaezp Jan 7, 2025
8b5a736
chore: updated triqler and np versions
jspaezp Jan 7, 2025
799661f
feat,doc: fixed empty cols in proteins and better column descriptions…
jspaezp Jan 28, 2025
012ca0e
test: added content testing to cli testing + csv -> tsv
jspaezp Jan 29, 2025
eca38a6
fix: flashlfq and misc fixes
jspaezp Jan 30, 2025
27d553a
ci: added extra xml to test makefile
jspaezp Jan 30, 2025
1dadad3
Merge pull request #3 from jspaezp/feat/re_add_compound_index_spec
jspaezp Jan 30, 2025
3407d9a
chore: unify naming schemas
jspaezp Feb 6, 2025
1d10907
chore: self-review cleanup
jspaezp Feb 6, 2025
ac0aef7
fix,chore: updated makefile and fixed iterator
jspaezp Feb 6, 2025
d4b4e42
chore: self-review cleanup
jspaezp Feb 6, 2025
121666f
Merge pull request #4 from jspaezp/chore/consolidate_names
jspaezp Feb 7, 2025
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
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### Purpose

(FILL ME IN) This section describes why this PR is here. Usually it would include a reference to issues.

### Declarations

Check these if you believe they are true

- [ ] The codebase is in a better state after this PR
- [ ] Has linting/formatting been run? (`make lint`, `make format`, `make check`)
- [ ] Was it tested locally? (`make test`)
- [ ] Has the changelog been updated?
- [ ] Have the docs been updated?
- [ ] The level of testing this PR includes is appropriate.
- [ ] No features have been dropped (or note which ones and why).

### Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, Optional) Any additional notes to reviewers or testers.

### FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

#### Notes

(FILL ME IN, Optional) Additional context to this PR.
84 changes: 41 additions & 43 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,44 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build

- name: Build and publish
run: |
python -m build --wheel .

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to the GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Push the Docker image to the GHCR
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Test-build the Docker image
run: make build-docker

- name: Login to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Push the Docker image to the GHCR
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
24 changes: 11 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ name: Lint

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Set up Python
run: uv python install

- name: Lint/Check format with Ruff
run: |
ruff check . --output-format=github
run: make lint-ci

- name: Check formatting with Ruff
run: make format-ci
36 changes: 20 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build --sdist --wheel .
twine upload dist/*
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make build-sdist
make build-wheel
twine upload dist/*
51 changes: 28 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,33 @@ jobs:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false,]
experimental: [false]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras --dev

- name: Run unit and system tests
run: |
uv run pytest -v --cov=mokapot tests/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run unit and system tests
run: make test

- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

- name: Set up Docker Buildx
if: runner.os == 'Linux'
uses: docker/setup-buildx-action@v3
- name: Check Build
if: runner.os == 'Linux'
run: make build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ venv.bak/
tests/integration_tests/run*
/temp/
/.run/

targets.peptides.csv
targets.psms.csv
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
image: python:3.10.5

variables:
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
PIP_CACHE_DIR: ${CI_PROJECT_DIR}/.cache/pip

stages:
- publish
- test

cache:
key: "${CI_COMMIT_REF_SLUG}"
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache/pip
- .venv
Expand All @@ -35,7 +35,7 @@ publish:
extends: .with_twine
stage: publish
rules:
- if: '$CI_COMMIT_TAG != null'
- if: $CI_COMMIT_TAG != null
script:
- python -m build --sdist --wheel .
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
Expand Down
35 changes: 22 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
exclude: ^data/
- id: trailing-whitespace
exclude: ^data/
- id: detect-private-key
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --indent, '2']
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --offset, '2', '--preserve-quotes']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
- id: ruff-format
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,3 @@ version 2.0, available at

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html

42 changes: 34 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
FROM mambaorg/micromamba:latest
MAINTAINER William E Fondrie <fondriew@gmail.com>
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml
COPY --chown=$MAMBA_USER:$MAMBA_USER dist/*.whl /tmp/
# This dockerfile is pretty much stolen from the uv example
# https://raw.githubusercontent.com/astral-sh/uv-docker-example/refs/heads/main/Dockerfile
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim

# Install the project into `/app`
WORKDIR /app

RUN micromamba install -y -n base -f /tmp/environment.yml && \
micromamba clean --all --yes
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN WHEEL=$(ls /tmp/*.whl) && pip install ${WHEEL}
# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy
ENV VIRTUAL_ENV=/opt/venv \
PATH="/opt/venv/bin:$PATH"

# Install the project's dependencies using the lockfile and settings
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev

# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
ADD . /app
# RUN --mount=type=cache,target=/root/.cache/uv \
# uv sync --frozen --no-dev

RUN uv venv
COPY dist/*.whl /tmp/
RUN --mount=type=cache,target=/root/.cache/uv \
WHEEL=$(ls /tmp/*.whl) && uv pip install ${WHEEL}

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

# Reset the entrypoint, don't invoke `uv`
ENTRYPOINT []
Loading
Loading