Skip to content
Closed
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 modified .DS_Store
Binary file not shown.
47 changes: 18 additions & 29 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Documentation for Read the Docs
name: Build and Deploy Documentation

on:
push:
Expand All @@ -7,47 +7,36 @@ on:
branches: [ main ]

jobs:
build-docs:
build-deploy-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 0

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

- name: List repository contents
run: ls -la

- name: List docs directory contents
run: ls -la docs/

- name: Run setup-env.sh (Non-Interactive)
env:
INSTALL_TYPE: 1 # cpu only
INSTALL_DEV: y # dev dependencies
run: |
chmod +x scripts/setup-env.sh
./scripts/setup-env.sh

# Build and install the package
- name: Build and install package
- name: Install Dependencies and Set Up Environment
run: |
source .venv/bin/activate
pip install -e .
python -m pip install --upgrade pip
python fast-install.py --cuda --cuda-version 12.1 --dev
shell: bash

- name: Build Documentation
run: |
source .venv/bin/activate
source ./bioneuralnet-env/bin/activate
mkdir -p docs/build/html
sphinx-build -b html docs/source/ docs/build/html/

- name: Validate Documentation Build
run: |
echo "Documentation build completed successfully. Files are located in docs/build/html/"
ls -R docs/build/html/
shell: bash

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
64 changes: 39 additions & 25 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11']

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

Expand All @@ -25,41 +25,55 @@ jobs:
python-version: ${{ matrix.python-version }}
check-latest: true

- name: Install R
uses: r-lib/actions/setup-r@v2

- name: List scripts directory contents
run: ls -la scripts/
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/scripts/requirements-dev.txt', 'fast-install.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install R and its dependencies
- name: Install dependencies using fast-install.py (Unix)
if: matrix.os != 'windows-latest'
run: |
chmod +x scripts/setup-R.sh
./scripts/setup-R.sh
chmod +x fast-install.py
./fast-install.py --cuda --cuda-version 12.1 --dev
shell: bash

- name: Run setup-env.sh (Non-Interactive)
env:
INSTALL_TYPE: 1 #use cpu
INSTALL_DEV: y #install dev dependencies
- name: Install dependencies using fast-install.py (Windows)
if: matrix.os == 'windows-latest'
run: |
chmod +x scripts/setup-env.sh
./scripts/setup-env.sh

- name: Verify installed Python packages
python fast-install.py --cuda --cuda-version 12.1 --dev
shell: powershell

- name: Verify installed Python packages (Unix)
if: matrix.os != 'windows-latest'
run: |
source .venv/bin/activate
source ./bioneuralnet-env/bin/activate
pip list
shell: bash

- name: Verify installed Python packages (Windows)
if: matrix.os == 'windows-latest'
run: |
.\bioneuralnet-env\Scripts\Activate.ps1
pip list
shell: powershell

- name: Verify R installation and WGCNA
shell: bash
- name: Run tests with pytest (Unix)
if: matrix.os != 'windows-latest'
run: |
R --version
Rscript -e "library(WGCNA); cat('WGCNA loaded successfully')"
source ./bioneuralnet-env/bin/activate
pytest --cov=bioneuralnet --cov-report=xml tests/
shell: bash

- name: Run tests with pytest
- name: Run tests with pytest (Windows)
if: matrix.os == 'windows-latest'
run: |
source .venv/bin/activate
.\bioneuralnet-env\Scripts\Activate.ps1
pytest --cov=bioneuralnet --cov-report=xml tests/
shell: powershell

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.10"

python:
install:
- method: pip
path: .
- requirements: requirements.txt
- requirements: scripts/requirements-dev.txt
- path: .
command: python fast-install.py --dev

sphinx:
configuration: docs/source/conf.py
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ENV/
env.bak/
venv.bak/
.pytest_cache
release.md
bioneuralnet.egg-info

# Sphinx documentation build
docs/build/
Expand All @@ -20,6 +22,7 @@ env/
env.bak/
venv.bak/
.venv/
bioneuralnet-env/

# IDE and editor directories
.vscode/
Expand Down Expand Up @@ -51,3 +54,7 @@ test_report/
# Other
*.bak
*.tmp
test_output/
dpmon_output_*
lib/
.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Big Data Management and Mining Laboratory
Copyright (c) [2024] [Big Data Management and Mining Laboratory]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading