Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
c2a858e
Test and configure unit test
nakib103 Apr 22, 2025
c6a9489
Test unit tests
nakib103 Apr 22, 2025
5d8da56
Change work directory
nakib103 Apr 22, 2025
d3f45be
Update test directory reflecting workdirectory change
nakib103 Apr 22, 2025
32b5018
Add nextflow in the setup
nakib103 Apr 22, 2025
a29b06b
Initial configs
nakib103 Aug 27, 2025
f48098c
Add actions to subdir
nakib103 Aug 27, 2025
04321f0
Sub dir does not work
nakib103 Aug 27, 2025
b7bf78a
Intermediate changes 1
nakib103 Sep 27, 2025
6c7ad86
Upto vep_config modules
nakib103 Oct 9, 2025
057d9ca
Until create vep config
nakib103 Oct 11, 2025
cf609b6
Squashed commit after large file change
nakib103 Jan 20, 2026
e55edfe
Update github action and use github profile to setup specific params
nakib103 Jan 20, 2026
2b0a567
Fix java/nextflow version and checkout actions
nakib103 Jan 20, 2026
1d5004a
Remove repo_dir params from test configs
nakib103 Jan 20, 2026
7abbc3d
Set repo_dir inside project dir
nakib103 Jan 20, 2026
da9d232
updated github yml
nakib103 Jan 20, 2026
5c14cfc
Test repo checkout dir
nakib103 Jan 20, 2026
29b02c4
Fix ut
nakib103 Jan 20, 2026
4d8688a
Update requirements.txt and add to github action
nakib103 Jan 26, 2026
9086e4c
Set default workdir
nakib103 Jan 26, 2026
d1986bd
Fix syntax
nakib103 Jan 26, 2026
8be958b
Build python project before installing
nakib103 Jan 26, 2026
9bc8a5a
Fix syntax
nakib103 Jan 26, 2026
0d030f0
Fix path
nakib103 Jan 26, 2026
f45bff7
Fix path
nakib103 Jan 26, 2026
a64bc2c
Install using pip ensembl-variation-utils
nakib103 Jan 26, 2026
e9d0aba
Default work dir does not work on checkout
nakib103 Jan 26, 2026
9965a9e
Setup database
nakib103 Jan 26, 2026
f3774b8
use mysql services
nakib103 Jan 26, 2026
c432d55
fix path
nakib103 Jan 26, 2026
7ec1058
db name
nakib103 Jan 26, 2026
9d64ed3
add env var
nakib103 Jan 26, 2026
7018111
use relative path
nakib103 Jan 26, 2026
8aef136
Fix db user name
nakib103 Jan 26, 2026
8cec593
Fix db user pass
nakib103 Jan 26, 2026
962ca50
Setup perl dependency
nakib103 Jan 26, 2026
a338473
Use dynamic env variable
nakib103 Jan 26, 2026
53fc962
Fix bash var
nakib103 Jan 26, 2026
ed17851
fix module path
nakib103 Jan 26, 2026
dc987d8
fix module path
nakib103 Jan 26, 2026
edd0bd0
fix module path
nakib103 Jan 26, 2026
eb8a287
Need ensembl repo
nakib103 Jan 26, 2026
a3d2e37
Do not use root pass
nakib103 Jan 26, 2026
25031bf
Do not use root pass
nakib103 Jan 26, 2026
70b283f
Fix FTP env var
nakib103 Jan 26, 2026
4b8b675
Setup htslib
nakib103 Jan 26, 2026
1655d30
Setup htslib
nakib103 Jan 26, 2026
17d2f6e
Setup htslib
nakib103 Jan 26, 2026
242746c
Setup bio db hts
nakib103 Jan 26, 2026
979e1ae
Setup bio db hts
nakib103 Jan 26, 2026
c9fab09
Setup bio db hts
nakib103 Jan 26, 2026
50981c0
Setup bio db hts
nakib103 Jan 26, 2026
0f7e8ed
Setup bio db hts
nakib103 Jan 26, 2026
a1e3a9c
Setup bio db hts
nakib103 Jan 26, 2026
aed6f1f
Setup bio db hts
nakib103 Jan 26, 2026
808daa1
Setup bio db hts
nakib103 Jan 26, 2026
fd8bc5d
Setup bio db hts
nakib103 Jan 26, 2026
5b9b588
Setup bio db hts
nakib103 Jan 26, 2026
ee03041
Input config fix
nakib103 Jan 26, 2026
6069ee3
Input config fix
nakib103 Jan 26, 2026
e5c7072
Input config fix
nakib103 Jan 26, 2026
0108bfe
Update requirements.txt
nakib103 Jan 27, 2026
05c7c1c
Update requirements.txt
nakib103 Jan 27, 2026
b8946d4
Update requirements.txt
nakib103 Jan 27, 2026
a568ee2
Update requirements.txt
nakib103 Jan 27, 2026
deb99e7
Update requirements.txt
nakib103 Jan 27, 2026
f85263b
Update requirements.txt
nakib103 Jan 27, 2026
95821ac
Update requirements.txt
nakib103 Jan 27, 2026
d3839f3
Setup bcftools
nakib103 Jan 27, 2026
2be0a66
Setup bcftools
nakib103 Jan 27, 2026
6047717
Setup bcftools
nakib103 Jan 27, 2026
ef78ff5
Setup vep
nakib103 Jan 27, 2026
3701c8e
Setup vep
nakib103 Jan 27, 2026
40f6328
Setup vep
nakib103 Jan 27, 2026
f030652
Setup vep
nakib103 Jan 27, 2026
71f3c0a
Setup vep
nakib103 Jan 27, 2026
a82313a
Setup vep
nakib103 Jan 27, 2026
1de010f
Workflow success
nakib103 Jan 27, 2026
ac65cd0
Module test
nakib103 Jan 27, 2026
12fb129
Module test
nakib103 Jan 27, 2026
5f98b4d
Module test
nakib103 Jan 27, 2026
54fd3bd
Module test
nakib103 Jan 27, 2026
37071ae
Module test
nakib103 Jan 27, 2026
31f046b
Module test
nakib103 Jan 27, 2026
c012fe4
Remove unwanted files
nakib103 Jan 29, 2026
7f53c05
Module test
nakib103 Jan 29, 2026
3154e38
Module test
nakib103 Feb 2, 2026
8e40545
Module test
nakib103 Feb 2, 2026
23cb5ed
Module test
nakib103 Feb 2, 2026
4990191
Module test
nakib103 Feb 2, 2026
e5d6501
Module test
nakib103 Feb 2, 2026
1122058
Module test
nakib103 Feb 2, 2026
bae3fdc
Module test
nakib103 Feb 2, 2026
df0e644
Module test
nakib103 Feb 2, 2026
e499fad
Module test
nakib103 Feb 2, 2026
2c679b0
Module test
nakib103 Feb 2, 2026
a86d4ce
Merge pull request #1 from nakib103/unit_test_debug
nakib103 Feb 2, 2026
37c1eb6
Remove extra files and update .gitignore
nakib103 Mar 2, 2026
7dba120
Rebase assets folder
nakib103 Mar 2, 2026
b5d49dc
Rebase bin folder
nakib103 Mar 2, 2026
94faa28
Rebase vcf_to_bed
nakib103 Mar 2, 2026
a5795be
Rebase modules except track related ones
nakib103 Mar 2, 2026
64e1c47
Update for file_meta and relevant module changes
nakib103 Mar 3, 2026
27a51da
Function test failing on CI
nakib103 Mar 3, 2026
cf69ff9
Post test coverage
nakib103 Mar 3, 2026
7e73485
Remove coverage
nakib103 Mar 3, 2026
70bfa92
Merge pull request #2 from nakib103/unit_test_debug
nakib103 Mar 3, 2026
240b352
fix confilict
nakib103 Mar 3, 2026
bfac147
fix conflict 2
nakib103 Mar 3, 2026
2748218
Update pytest for ensembl-variation-utils
nakib103 Mar 3, 2026
42154e3
Removing unneeded bits
nakib103 Mar 3, 2026
df95e36
Pytest updates
nakib103 Mar 4, 2026
0daf28a
Fix unit test
nakib103 Mar 4, 2026
3c8acea
Remove some hardcode path
nakib103 Mar 4, 2026
f482ad6
No need installing requirement.txt
nakib103 Mar 4, 2026
3e255d1
No need installing requirement.txt
nakib103 Mar 4, 2026
a012c9a
Add corect python dir for test
nakib103 Mar 4, 2026
4a02824
recent changes
nakib103 Mar 16, 2026
1d1b8b5
Fix CI UT
nakib103 Mar 16, 2026
be26ce5
CI test 2
nakib103 Mar 16, 2026
11a226d
CI test 3
nakib103 Mar 16, 2026
5518615
CI test 3
nakib103 Mar 16, 2026
adde15b
CI test 4
nakib103 Mar 16, 2026
91203f4
CI test 5
nakib103 Mar 16, 2026
0efdfff
CI test 6
nakib103 Mar 16, 2026
2d69e66
File with data
nakib103 Mar 16, 2026
681174c
CI test 6
nakib103 Mar 16, 2026
a345628
CI test 7
nakib103 Mar 16, 2026
e1de81a
CI test 8
nakib103 Mar 16, 2026
8e5aa57
CI test 9
nakib103 Mar 16, 2026
7719954
CI test 10
nakib103 Mar 16, 2026
621f0ed
CI test 11
nakib103 Mar 16, 2026
b33e501
CI test 12
nakib103 Mar 16, 2026
52d3424
CI test 12
nakib103 Mar 16, 2026
6f5ef57
CI test 13
nakib103 Mar 16, 2026
1d24e3e
CI test 14
nakib103 Mar 16, 2026
558b1aa
CI test 15
nakib103 Mar 16, 2026
cd81c00
CI test 15
nakib103 Mar 16, 2026
7a7b3d7
CI test 16
nakib103 Mar 16, 2026
2862ede
CI test 17
nakib103 Mar 16, 2026
74b74c7
CI test 17
nakib103 Mar 16, 2026
7a9b99c
CI test 18
nakib103 Mar 16, 2026
ed5526b
CI test 20
nakib103 Mar 16, 2026
2664d31
CI test 21
nakib103 Mar 16, 2026
75418ab
Merge pull request #3 from nakib103/unit_test_debug
nakib103 Mar 16, 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
120 changes: 120 additions & 0 deletions .github/scripts/nftest_coverage_comment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#!/usr/bin/env bash

# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

FILE=$1
if [[ ! -s "$FILE" ]]; then
echo "Coverage file $FILE is empty. Exiting."
exit 1
fi
COVERAGE_THRESHOLD=${COVERAGE_THRESHOLD:-90}
MARKER="<!-- nf-test-coverage-report -->"

: "${GITHUB_TOKEN:?Missing GITHUB_TOKEN}"
: "${GITHUB_REPOSITORY:?Missing GITHUB_REPOSITORY}"
: "${GITHUB_EVENT_PATH:?Missing GITHUB_EVENT_PATH}"

# Get PR number
PR_NUMBER=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH")

if [[ -z "$PR_NUMBER" || "$PR_NUMBER" == "null" ]]; then
echo "Not running on a pull request. Exiting."
exit 0
fi

# ---- Parse nf-test coverage totals ----
COVERAGE_LINE=$(grep -E '(COVERAGE:|Status:)' "$FILE" | tail -1 || true)
if [[ -z "$COVERAGE_LINE" ]]; then
echo "ERROR: Could not find coverage line in $FILE"
cat "$FILE"
exit 1
fi

if echo "$COVERAGE_LINE" | grep -q 'COVERAGE:'; then
TOTAL_COVERAGE=$(echo "$COVERAGE_LINE" | grep -oE '[0-9]+(\.[0-9]+)?%' | tr -d '%' || true)
HIT_FILES=$(echo "$COVERAGE_LINE" | grep -oE '[0-9]+ of' | grep -oE '[0-9]+' || true)
TOTAL_FILES=$(echo "$COVERAGE_LINE" | grep -oE 'of [0-9]+' | grep -oE '[0-9]+' || true)
else
# New format: "Status: 26 of 64 modules and workflows are covered ... (40.62%)"
TOTAL_COVERAGE=$(echo "$COVERAGE_LINE" | grep -oE '\([0-9]+(\.[0-9]+)?%\)' | tr -d '()%' || true)
HIT_FILES=$(echo "$COVERAGE_LINE" | grep -oE '[0-9]+ of' | grep -oE '[0-9]+' || true)
TOTAL_FILES=$(echo "$COVERAGE_LINE" | grep -oE 'of [0-9]+' | grep -oE '[0-9]+' || true)
fi

if [[ -z "$TOTAL_COVERAGE" || \
-z "$HIT_FILES" || \
-z "$TOTAL_FILES" || "$TOTAL_FILES" -eq 0 ]];
then
echo "Could not parse coverage percentage from: $COVERAGE_LINE"
exit 1
fi

COVERAGE_OK=$(awk -v cov="$TOTAL_COVERAGE" -v th="$COVERAGE_THRESHOLD" \
'BEGIN { print (cov >= th) ? "yes" : "no" }')

if [[ "$COVERAGE_OK" == "yes" ]]; then
STATUS_ICON="✅"
STATUS_TEXT="Coverage meets threshold"
else
STATUS_ICON="❌"
STATUS_TEXT="Coverage below ${COVERAGE_THRESHOLD}% threshold"
fi


# ---- Comment body ----
COMMENT_BODY=$(cat <<EOF
$MARKER
### 🧪 nf-test Coverage Report

**Total coverage:** **${TOTAL_COVERAGE}%**
**Lines:** $HIT_FILES / $TOTAL_FILES
**Status:** $STATUS_ICON $STATUS_TEXT
EOF
)

# ---- GitHub API ----
API_URL="https://api.github.com"
COMMENTS_URL="$API_URL/repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments"
AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN"

EXISTING_COMMENT_ID=$(curl -s \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$COMMENTS_URL" \
| jq -r ".[] | select(.body | contains(\"$MARKER\")) | .id")

if [[ -n "$EXISTING_COMMENT_ID" ]]; then
echo "Updating existing nf-test coverage comment"
curl -s -X PATCH \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$API_URL/repos/$GITHUB_REPOSITORY/issues/comments/$EXISTING_COMMENT_ID" \
-d "$(jq -nc --arg body "$COMMENT_BODY" '{body: $body}')"
else
echo "Creating nf-test coverage comment"
curl -s -X POST \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$COMMENTS_URL" \
-d "$(jq -nc --arg body "$COMMENT_BODY" '{body: $body}')"
fi

# ---- Fail CI if coverage too low ----
if [[ "$COVERAGE_OK" != "yes" ]]; then
echo "Coverage ${TOTAL_COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%"
exit 1
fi
127 changes: 127 additions & 0 deletions .github/scripts/py_coverage_comment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/usr/bin/env bash

# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

LCOV_FILE=$1
if [[ ! -s "$LCOV_FILE" ]]; then
echo "Coverage file $LCOV_FILE is empty. Exiting."
exit 1
fi
COVERAGE_THRESHOLD=${COVERAGE_THRESHOLD:-90}
MARKER="<!-- python-lcov-coverage-report -->"

: "${GITHUB_TOKEN:?Missing GITHUB_TOKEN}"
: "${GITHUB_REPOSITORY:?Missing GITHUB_REPOSITORY}"
: "${GITHUB_EVENT_PATH:?Missing GITHUB_EVENT_PATH}"

# Get PR number
PR_NUMBER=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH")

if [[ -z "$PR_NUMBER" || "$PR_NUMBER" == "null" ]]; then
echo "Not running on a pull request. Exiting."
exit 0
fi

# ---- Parse LCOV totals ----
TOTAL_LINES=$(grep -h '^LF:' "$LCOV_FILE" | awk -F: '{sum += $2} END {print sum}')
HIT_LINES=$(grep -h '^LH:' "$LCOV_FILE" | awk -F: '{sum += $2} END {print sum}')

if [[ -z "$TOTAL_LINES" || "$TOTAL_LINES" -eq 0 ]]; then
echo "Failed to parse LCOV file"
exit 1
fi

TOTAL_COVERAGE=$(awk -v hit="$HIT_LINES" -v total="$TOTAL_LINES" \
'BEGIN { printf "%.2f", (hit / total) * 100 }')

COVERAGE_OK=$(awk -v cov="$TOTAL_COVERAGE" -v th="$COVERAGE_THRESHOLD" \
'BEGIN { print (cov >= th) ? "yes" : "no" }')

if [[ "$COVERAGE_OK" == "yes" ]]; then
STATUS_ICON="✅"
STATUS_TEXT="Coverage meets threshold"
else
STATUS_ICON="❌"
STATUS_TEXT="Coverage below ${COVERAGE_THRESHOLD}% threshold"
fi

# ---- Per-file coverage table ----
TABLE=$(awk '
BEGIN {
print "| File | Coverage |"
print "|------|----------|"
}
$1 ~ /^SF:/ { file = substr($1,4); lf=0; lh=0 }
$1 ~ /^LF:/ { lf = substr($1,4) }
$1 ~ /^LH:/ { lh = substr($1,4) }
$1 ~ /^end_of_record/ {
if (lf > 0) {
printf "| %s | %.2f%% |\n", file, (lh / lf) * 100
}
}
' "$LCOV_FILE")

# ---- Comment body ----
COMMENT_BODY=$(cat <<EOF
$MARKER
### 🐍 Python Coverage Report (coverage.py / lcov)

**Total coverage:** **${TOTAL_COVERAGE}%**
**Lines:** $HIT_LINES / $TOTAL_LINES
**Status:** $STATUS_ICON $STATUS_TEXT

<details>
<summary>Per-file coverage</summary>

$TABLE

</details>
EOF
)

# ---- GitHub API ----
API_URL="https://api.github.com"
COMMENTS_URL="$API_URL/repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments"
AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN"

EXISTING_COMMENT_ID=$(curl -s \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$COMMENTS_URL" \
| jq -r ".[] | select(.body | contains(\"$MARKER\")) | .id")

if [[ -n "$EXISTING_COMMENT_ID" ]]; then
echo "Updating existing Python coverage comment"
curl -s -X PATCH \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$API_URL/repos/$GITHUB_REPOSITORY/issues/comments/$EXISTING_COMMENT_ID" \
-d "$(jq -nc --arg body "$COMMENT_BODY" '{body: $body}')"
else
echo "Creating Python coverage comment"
curl -s -X POST \
-H "$AUTH_HEADER" \
-H "Accept: application/vnd.github+json" \
"$COMMENTS_URL" \
-d "$(jq -nc --arg body "$COMMENT_BODY" '{body: $body}')"
fi

# ---- Fail CI if coverage too low ----
if [[ "$COVERAGE_OK" != "yes" ]]; then
echo "Coverage ${TOTAL_COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%"
exit 1
fi
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: build
on: workflow_dispatch

env:
PYTHON_SRC_DIR: src/python/ensembl
RUST_SRC_DIR: src/rust/ensembl
BIN_DIR: nextflow/vcf_prepper/bin

jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install/Update Dependencies
run: python3 -m pip install --upgrade build
- name: Build
run: python3 -m build ${{ env.PYTHON_SRC_DIR }}

rust:
runs-on: ubuntu-latest
strategy:
matrix:
BUILD_TARGET: [
bed_to_wig,
merge_bed
vcf_to_bed
]
steps:
- uses: actions/checkout@v4
- name: Build ${{ matrix.BUILD_TARGET }}
run: cargo build --manifest_file ${{ env.RUST_SRC_DIR }}/${{ matrix.BUILD_TARGET }}/Cargo.toml --artifact-dir ${{ BIN_DIR }}
47 changes: 47 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: linting
on: workflow_dispatch

# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff Check
run: ruff check --output-format=github .
- name: Run Ruff Format
run: ruff format

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features
- name: Run Rustfmt
run: cargo +nightly fmt
12 changes: 0 additions & 12 deletions .github/workflows/main.yml

This file was deleted.

Loading
Loading