Skip to content

Commit 58478f1

Browse files
authored
Merge pull request #11 from UCD-BDLab/beta-release-cleanup
Beta Release Clean Up
2 parents d68c1f1 + e30716b commit 58478f1

203 files changed

Lines changed: 8212 additions & 22413 deletions

File tree

Some content is hidden

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

.DS_Store

12 KB
Binary file not shown.

.gitattributes

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-deploy-docs:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
check-latest: true
24+
25+
- name: Install Dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
pip install -r requirements-dev.txt
30+
pip install torch
31+
pip install torch_geometric
32+
shell: bash
33+
34+
- name: Verify Documentation Directory
35+
run: test -d docs/source/ || { echo "Docs source directory missing"; exit 1; }
36+
37+
- name: Build Documentation
38+
run: |
39+
mkdir -p docs/build/html
40+
sphinx-build -b html docs/source/ docs/build/html/
41+
shell: bash
42+
43+
- name: Deploy to GitHub Pages
44+
uses: peaceiris/actions-gh-pages@v3
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./docs/build/html

.github/workflows/pre-commit.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Pre-Commit Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Cache pip dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
27+
restore-keys: ${{ runner.os }}-pip-
28+
29+
- name: Install Pre-Commit and Dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install pre-commit
33+
34+
- name: Run Pre-Commit Checks
35+
run: pre-commit run --all-files --show-diff-on-failure

.github/workflows/python-app.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: BioNeuralNet CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
python-version: ["3.10", "3.11"]
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
check-latest: true
27+
28+
- name: Cache pip dependencies
29+
uses: actions/cache@v3
30+
with:
31+
path: ~/.cache/pip
32+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
33+
restore-keys: ${{ runner.os }}-pip-
34+
35+
- name: Install Python dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install -r requirements.txt
39+
pip install -r requirements-dev.txt
40+
pip install torch
41+
pip install torch_geometric
42+
shell: bash
43+
44+
- name: Install R
45+
uses: r-lib/actions/setup-r@v2
46+
with:
47+
r-version: "latest"
48+
49+
- name: Install R packages
50+
run: |
51+
Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cran.r-project.org')"
52+
Rscript -e "install.packages(c('dplyr', 'jsonlite'), repos='https://cran.r-project.org')"
53+
Rscript -e "BiocManager::install(c('impute', 'preprocessCore', 'GO.db', 'AnnotationDbi'), update=FALSE, ask=FALSE)"
54+
Rscript -e "install.packages('SmCCNet', repos='https://cran.r-project.org')"
55+
Rscript -e "install.packages('WGCNA', repos='https://cran.r-project.org')"
56+
shell: bash
57+
58+
- name: Run tests with pytest
59+
run: |
60+
find . -name ".coverage*" -delete
61+
pytest --cov=bioneuralnet --cov-report=xml tests/
62+
63+
- name: Upload coverage to Codecov
64+
uses: codecov/codecov-action@v3
65+
with:
66+
token: ${{ secrets.CODECOV_TOKEN }}
67+
files: ./coverage.xml
68+
flags: unittests
69+
name: codecov-umbrella

.gitignore

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,69 @@
1+
# Python
2+
*.pyc
13
__pycache__/
2-
.venv/
4+
*.pyo
5+
*.pyd
6+
env/
7+
venv/
8+
ENV/
9+
env.bak/
10+
venv.bak/
11+
.pytest_cache
12+
release.md
13+
bioneuralnet.egg-info
14+
/dist/
15+
/build/
16+
/docker_files/
17+
.mypy_cache
18+
19+
# Block sensitive file types globally
20+
*.csv
21+
*.RData
22+
23+
24+
# Sphinx documentation build
25+
docs/build/
26+
27+
# Virtual environment
28+
venv/
29+
ENV/
30+
env/
31+
env.bak/
32+
venv.bak/
33+
.venv/
34+
bioneuralnet-env/
35+
36+
# IDE and editor directories
37+
.vscode/
38+
.idea/
39+
*.sublime-project
40+
*.sublime-workspace
41+
42+
# Logs
43+
*.log
44+
45+
# OS generated files
46+
.DS_Store
47+
Thumbs.db
48+
49+
# Coverage reports
50+
htmlcov/
51+
.coverage
52+
.coverage.*
53+
.cache
54+
nosetests.xml
55+
coverage.xml
56+
*.cover
57+
*.py,cover
58+
.hypothesis/
59+
60+
# Test reports
61+
test_report/
62+
63+
# Other
64+
*.bak
65+
*.tmp
66+
test_output/
67+
dpmon_output_*
68+
lib/
69+
.DS_Store

.pre-commit-config.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/psf/black
11+
rev: 24.10.0
12+
hooks:
13+
- id: black
14+
name: Format Python code with Black
15+
language_version: python3
16+
17+
- repo: https://github.com/pre-commit/mirrors-mypy
18+
rev: v1.14.1
19+
hooks:
20+
- id: mypy
21+
name: Static type checking with MyPy
22+
args: [--ignore-missing-imports]
23+
24+
- repo: local
25+
hooks:
26+
- id: remove-pyc-and-pycache
27+
name: Remove .pyc files and __pycache__ directories
28+
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 {} +"
29+
language: system
30+
stages: [pre-commit]
31+
32+
- id: clean-coverage-files
33+
name: Remove stale .coverage files
34+
entry: bash -c "find . -name '.coverage*' -delete"
35+
language: system
36+
stages: [pre-commit]
37+
38+
- id: check-forbidden-files
39+
name: Prevent adding forbidden file types
40+
entry: bash -c "if git diff --cached --name-only | grep -E '\\.csv$|\\.RData$'; then echo 'Forbidden file types detected!'; exit 1; fi"
41+
language: system
42+
types: [file]
43+
44+
- id: run-tests
45+
name: Run Tests with Pytest
46+
entry: pytest --cov=bioneuralnet --cov-report=term-missing
47+
language: system
48+
types: [python]

0 commit comments

Comments
 (0)