Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.ipynb linguist-detectable=false
*.ipynb linguist-detectable=false
57 changes: 26 additions & 31 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ on:

jobs:
pre-commit:
runs-on: macos-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Upgrade pre-commit
run: pip install --upgrade pre-commit

- name: Verify pre-commit installation
run: pre-commit --version
python-version: ${{ matrix.python-version }}
check-latest: true

- name: Cache pip dependencies
uses: actions/cache@v3
Expand All @@ -43,24 +43,19 @@ jobs:
pip install torch_geometric
shell: bash

- name: Install system dependencies
run: |
brew update
brew upgrade

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "latest"

- name: Install R packages
run: |
Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cran.r-project.org')"
Rscript -e "install.packages(c('dplyr', 'jsonlite'), repos='https://cran.r-project.org')"
Rscript -e "BiocManager::install(c('impute', 'preprocessCore', 'GO.db', 'AnnotationDbi'), update=FALSE, ask=FALSE)"
Rscript -e "install.packages('SmCCNet', repos='https://cran.r-project.org')"
Rscript -e "install.packages('WGCNA', repos='https://cran.r-project.org')"
shell: bash

# - name: Run Pre-Commit Checks
# run: pre-commit run --all-files --show-diff-on-failure
# - name: Install R
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: "latest"

# - name: Install R packages
# run: |
# Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cran.r-project.org')"
# Rscript -e "install.packages(c('dplyr', 'jsonlite'), repos='https://cran.r-project.org')"
# Rscript -e "BiocManager::install(c('impute', 'preprocessCore', 'GO.db', 'AnnotationDbi'), update=FALSE, ask=FALSE)"
# Rscript -e "install.packages('SmCCNet', repos='https://cran.r-project.org')"
# Rscript -e "install.packages('WGCNA', repos='https://cran.r-project.org')"
# shell: bash

- name: Run Pre-Commit Checks
run: pre-commit run --all-files --show-diff-on-failure
48 changes: 24 additions & 24 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -41,29 +41,29 @@ jobs:
pip install torch_geometric
shell: bash

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "latest"
# - name: Install R
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: "latest"

- name: Install R packages
run: |
Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cran.r-project.org')"
Rscript -e "install.packages(c('dplyr', 'jsonlite'), repos='https://cran.r-project.org')"
Rscript -e "BiocManager::install(c('impute', 'preprocessCore', 'GO.db', 'AnnotationDbi'), update=FALSE, ask=FALSE)"
Rscript -e "install.packages('SmCCNet', repos='https://cran.r-project.org')"
Rscript -e "install.packages('WGCNA', repos='https://cran.r-project.org')"
shell: bash
# - name: Install R packages
# run: |
# Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cran.r-project.org')"
# Rscript -e "install.packages(c('dplyr', 'jsonlite'), repos='https://cran.r-project.org')"
# Rscript -e "BiocManager::install(c('impute', 'preprocessCore', 'GO.db', 'AnnotationDbi'), update=FALSE, ask=FALSE)"
# Rscript -e "install.packages('SmCCNet', repos='https://cran.r-project.org')"
# Rscript -e "install.packages('WGCNA', repos='https://cran.r-project.org')"
# shell: bash

- name: Run tests with pytest
run: |
find . -name ".coverage*" -delete
pytest --cov=bioneuralnet --cov-report=xml tests/
# - name: Run tests with pytest
# run: |
# find . -name ".coverage*" -delete
# pytest --cov=bioneuralnet --cov-report=xml tests/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage.xml
# flags: unittests
# name: codecov-umbrella
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ bioneuralnet.egg-info
.mypy_cache
Quick Start.ipynb
TCGA-BRCA_Datatest.ipynb

DevNotes.md
TCGA-BRCA_Datatest_copy.ipynb
split
# Other example data and tests not needed in the repo.

Output**
Expand Down
62 changes: 62 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
exclude: ^docs/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=92160']

# - repo: https://github.com/psf/black
# rev: 24.10.0
# hooks:
# - id: black
# name: Format Python code with Black
# language_version: python3

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
name: Static type checking with MyPy
args: [--ignore-missing-imports]

- repo: local
hooks:
- id: remove-pyc-and-pycache
name: Remove .pyc files and __pycache__ directories
entry: bash -c "find . \( -path './.venv' -o -path './docs' -o -path './node_modules' \) -prune -o -type f -name '*.pyc' -exec rm -f {} + -o -type d -name '__pycache__' -exec rm -rf {} +"
language: system
stages: [pre-commit]

- id: clean-coverage-files
name: Remove stale .coverage files
entry: bash -c "find . -name '.coverage*' -delete"
language: system
stages: [pre-commit]

- id: check-forbidden-files
name: Prevent adding forbidden file types except in allowed directory
entry: |
bash -c '
FILES="$(git diff --cached --name-only)"
if echo "$FILES" | grep -E "\.RData$"; then
echo "Forbidden file types detected (RData)!"
exit 1
fi
if echo "$FILES" | grep -E "\.csv$" | grep -vE "^bioneuralnet/datasets/(example1|brca|monet)/"; then
echo "Forbidden CSV files detected (outside allowed folders)!"
exit 1
fi
'
language: system
stages: [pre-commit]

# - id: run-tests
# name: Run Tests with Pytest
# entry: pytest --ignore=docs/source/examples --cov=bioneuralnet --cov-report=term-missing || true
# language: system
# types: [python]
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [0.2.0b2] - 2025-02-16
Expand Down Expand Up @@ -69,4 +69,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
## [1.0.1] to [1.0.7] - 2025-04-24

- **BUG**: A bug related to rdata files missing
- **New realease**: A new release will include documentation for the other updates. (1.1.0)
- **New realease**: A new release will include documentation for the other updates. (1.1.0)
Loading