Skip to content

Commit 5f36612

Browse files
authored
Merge pull request #1003 from COMBINE-lab/codex/develop-refactor
Refactor, index update
2 parents 9bd7cfd + 84e08bf commit 5f36612

File tree

1,048 files changed

+231736
-178110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,048 files changed

+231736
-178110
lines changed

.codex/REFRACTOR_BOOKMARK.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Refactor Checkpoint (2026-03-08)
2+
3+
Branch: `codex/develop-refactor`
4+
5+
## Completed in this checkpoint
6+
7+
- Continued module ownership cleanup under `src/{io,model,util,tests}`.
8+
- Kept `AlignmentIO` as the sole htslib boundary layer with more wrapper logic moved out of headers.
9+
- Continued FASTQ/FASTA modernization around FQFeeder:
10+
- switched call sites to `salmon_fqfeeder::ParserConfig`.
11+
- retained lightweight compatibility aliases in `FastxReader.hpp` required by `SAMWriter`/`SalmonMappingUtils`.
12+
- Simplified dependency resolution toward modern CMake package-first behavior.
13+
- Added dependency floor checks for:
14+
- `spdlog/fmt`
15+
- `parallel_hashmap`
16+
- `nlohmann/json`
17+
- `Eigen >= 3.4`
18+
19+
## Verified at checkpoint
20+
21+
- Configure: `cmake -S . -B build/codex-check`
22+
- Build: `cmake --build build/codex-check -j8 --target salmon unitTests`
23+
- Tests: `ctest --test-dir build/codex-check --output-on-failure -R "unit_tests|salmon_read_test_quasi|salmon_alevin_stub"`
24+
25+
## Resume From Here
26+
27+
1. Remove remaining Staden-era compatibility artifacts after confirming no remaining call paths.
28+
2. Keep shrinking heavy headers (`ReadExperiment.hpp`, `AlignmentLibrary.hpp`) by moving non-template logic into `.cpp`/`.inl`.
29+
3. Continue top-level include shim removal only where include-policy and unit/integration tests remain green.
30+
4. Quant hot-path optimization pass (read-based mode):
31+
- parser chunking + queue contention
32+
- mapping-stage allocations and temporary buffers
33+
- log/progress overhead in worker loops
34+
- merge/reduce behavior across mini-batches

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ about: Create a report to help us improve
44

55
---
66

7-
**Is the bug primarily related to salmon (bulk mode) or alevin (single-cell mode)?**
8-
97
**Describe the bug**
108
A clear and concise description of what the bug is.
119

.github/workflows/ci.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
precheck:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
run_ci: ${{ steps.decide.outputs.run_ci }}
17+
steps:
18+
- id: decide
19+
shell: bash
20+
run: |
21+
set -euo pipefail
22+
msg="$(jq -r '.head_commit.message // ""' "$GITHUB_EVENT_PATH")"
23+
ref="${GITHUB_REF#refs/heads/}"
24+
run_ci=false
25+
26+
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
27+
run_ci=true
28+
fi
29+
if [[ "$ref" == "main" ]]; then
30+
run_ci=true
31+
fi
32+
if [[ "$msg" == *"[run-ci]"* ]]; then
33+
run_ci=true
34+
fi
35+
36+
{
37+
echo "run_ci=$run_ci"
38+
} >> "$GITHUB_OUTPUT"
39+
40+
build-test:
41+
needs: precheck
42+
if: ${{ needs.precheck.outputs.run_ci == 'true' }}
43+
runs-on: ${{ matrix.os }}
44+
timeout-minutes: 120
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
include:
49+
- os: ubuntu-22.04
50+
target_id: linux-x86_64
51+
build_parallel: 2
52+
- os: ubuntu-24.04-arm
53+
target_id: linux-aarch64
54+
build_parallel: 2
55+
- os: macos-15-intel
56+
target_id: macos-x86_64
57+
build_parallel: 3
58+
- os: macos-14
59+
target_id: macos-arm64
60+
build_parallel: 3
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Install Linux Build Dependencies
65+
if: runner.os == 'Linux'
66+
run: |
67+
sudo apt-get update
68+
sudo apt-get install -y \
69+
build-essential \
70+
cmake \
71+
git \
72+
curl \
73+
libcurl4-openssl-dev \
74+
libbz2-dev \
75+
liblzma-dev
76+
77+
- name: Configure
78+
run: |
79+
cmake -S . -B build-ci \
80+
-DCMAKE_BUILD_TYPE=Release \
81+
-DSALMON_ENABLE_TESTS=ON \
82+
-DSALMON_USE_SYSTEM_DEPS=OFF \
83+
-DSALMON_FETCH_MISSING_DEPS=ON \
84+
-DSALMON_BOOST_USE_STATIC_LIBS=ON
85+
86+
- name: Build
87+
run: cmake --build build-ci --target salmon unitTests --parallel ${{ matrix.build_parallel }}
88+
89+
- name: Run Unit Tests
90+
run: ./build-ci/src/unitTests
91+
92+
- name: CLI Smoke
93+
run: ./build-ci/src/salmon -h
94+
95+
- name: Prepare Sample Data
96+
shell: bash
97+
run: |
98+
set -euo pipefail
99+
if [[ ! -d sample_data ]]; then
100+
tar -xzf sample_data.tgz
101+
fi
102+
103+
- name: Sample Data Smoke (Mapping)
104+
run: |
105+
./build-ci/src/salmon index \
106+
-t sample_data/transcripts.fasta \
107+
-i build-ci/sample_index
108+
./build-ci/src/salmon quant \
109+
-l A \
110+
-i build-ci/sample_index \
111+
-1 sample_data/reads_1.fastq \
112+
-2 sample_data/reads_2.fastq \
113+
-o build-ci/sample_quant_mapping
114+
115+
- name: Sample Data Smoke (Alignment)
116+
run: |
117+
./build-ci/src/salmon quant \
118+
-l A \
119+
-t sample_data/transcripts.fasta \
120+
-a sample_data/sample_alignments.bam \
121+
-o build-ci/sample_quant_alignment
122+
123+
- name: Package Binary Artifact
124+
shell: bash
125+
run: |
126+
set -euo pipefail
127+
pkg_dir="release/salmon-${{ matrix.target_id }}"
128+
mkdir -p "$pkg_dir/bin"
129+
cp build-ci/src/salmon "$pkg_dir/bin/"
130+
cp LICENSE "$pkg_dir/"
131+
cp README.md "$pkg_dir/"
132+
tar -C release -czf "salmon-${{ matrix.target_id }}.tar.gz" "salmon-${{ matrix.target_id }}"
133+
134+
- name: Upload Binary Artifact
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: salmon-${{ matrix.target_id }}
138+
path: salmon-${{ matrix.target_id }}.tar.gz
139+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI"]
6+
types: [completed]
7+
8+
permissions:
9+
contents: write
10+
actions: read
11+
12+
jobs:
13+
release:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Determine Release Tag From Commit Message
18+
id: tag
19+
shell: bash
20+
run: |
21+
set -euo pipefail
22+
msg="$(jq -r '.workflow_run.head_commit.message // ""' "$GITHUB_EVENT_PATH")"
23+
if [[ "$msg" =~ \[release[[:space:]]+v?([0-9]+\.[0-9]+\.[0-9]+)\] ]]; then
24+
echo "release_tag=v${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
25+
echo "should_release=true" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "No [release vX.Y.Z] token found; skipping release."
28+
echo "release_tag=" >> "$GITHUB_OUTPUT"
29+
echo "should_release=false" >> "$GITHUB_OUTPUT"
30+
fi
31+
32+
- name: Checkout Repository
33+
if: ${{ steps.tag.outputs.should_release == 'true' }}
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Download CI Artifacts
39+
if: ${{ steps.tag.outputs.should_release == 'true' }}
40+
uses: actions/download-artifact@v4
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
run-id: ${{ github.event.workflow_run.id }}
44+
path: release-assets
45+
merge-multiple: true
46+
47+
- name: Create and Push Tag
48+
if: ${{ steps.tag.outputs.should_release == 'true' }}
49+
env:
50+
RELEASE_TAG: ${{ steps.tag.outputs.release_tag }}
51+
RELEASE_SHA: ${{ github.event.workflow_run.head_sha }}
52+
run: |
53+
set -euo pipefail
54+
git fetch --tags
55+
if git rev-parse -q --verify "refs/tags/${RELEASE_TAG}" >/dev/null; then
56+
echo "Tag ${RELEASE_TAG} already exists"
57+
else
58+
git tag -a "${RELEASE_TAG}" "${RELEASE_SHA}" -m "Release ${RELEASE_TAG}"
59+
git push origin "${RELEASE_TAG}"
60+
fi
61+
62+
- name: Create GitHub Release
63+
if: ${{ steps.tag.outputs.should_release == 'true' }}
64+
uses: softprops/action-gh-release@v2
65+
with:
66+
tag_name: ${{ steps.tag.outputs.release_tag }}
67+
target_commitish: ${{ github.event.workflow_run.head_sha }}
68+
generate_release_notes: true
69+
files: release-assets/*.tar.gz

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Read the Docs configuration file for Salmon
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.12"
10+
11+
sphinx:
12+
configuration: doc/source/conf.py
13+
14+
python:
15+
install:
16+
- requirements: doc/requirements.txt

0 commit comments

Comments
 (0)