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 modified .DS_Store
Binary file not shown.
87 changes: 39 additions & 48 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,39 @@
import os
import sys
import pkg_resources

# -- Path setup --------------------------------------------------------------

sys.path.insert(0, os.path.abspath('../../'))

# -- Project information -----------------------------------------------------

project = 'BioNeuralNet'
author = 'Vicente Ramos'
release = pkg_resources.get_distribution("bioneuralnet").version

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
]

napoleon_google_docstring = True
napoleon_numpy_docstring = False
templates_path = ['_templates']

exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

# -- Autosummary configuration -----------------------------------------------

autosummary_generate = True

# -- Intersphinx configuration ------------------------------------------------

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'pandas': ('https://pandas.pydata.org/docs/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'torch': ('https://pytorch.org/docs/stable/', None),
'scikit-learn': ('https://scikit-learn.org/stable/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'networkx': ('https://networkx.org/documentation/stable/', None),
}
name: Build Documentation for Read the Docs

on:
push:
branches:
- main
pull_request:
branches:
- main

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

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

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

- name: Install Documentation Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install sphinx sphinx_rtd_theme

- name: Build Documentation
run: |
sphinx-build -b html source/ build/html/

- name: Validate Documentation Build
run: |
echo "Documentation build completed successfully. Files are located in build/html/"
ls -R build/html/
43 changes: 27 additions & 16 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,47 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, 3.10]
os: [ubuntu-latest]
python-version: ['3.8']

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

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

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
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: Install dependencies
- name: Install R and its dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Install CPU-specific dependencies
pip install -r requirements-cpu.txt
chmod +x scripts/setup-R.sh
./scripts/setup-R.sh

- name: Lint with flake8
- name: Run setup-env.sh (Non-Interactive)
env:
INSTALL_TYPE: 1 #use cpu
INSTALL_DEV: y #install dev dependencies
run: |
flake8 bioneuralnet tests docs
chmod +x scripts/setup-env.sh
./scripts/setup-env.sh

- name: Format with black
- name: Verify R installation and WGCNA
shell: bash
run: |
black --check bioneuralnet tests docs
R --version
Rscript -e "library(WGCNA); cat('WGCNA loaded successfully')"

- name: Run tests with pytest
run: |
Expand All @@ -49,4 +60,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
name: codecov-umbrella
13 changes: 11 additions & 2 deletions .pre-commit-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,27 @@ repos:
rev: 23.3.0
hooks:
- id: black
name: Format Python code with Black
language_version: python3

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: Lint Python code with Flake8
additional_dependencies: [flake8>=6.0.0]

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

- repo: local
hooks:
- id: run-tests
name: Run Tests
entry: pytest
name: Run Tests with Pytest
entry: pytest --cov=bioneuralnet --cov-report=term-missing
language: system
types: [python]
27 changes: 13 additions & 14 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
include README.md
include LICENSE

# Include all .yml files in the utils directory
recursive-include bioneuralnet/utils *.yml
# Include assets and images
recursive-include assets *.png *.jpg *.svg

# Include shell scripts in the scripts directory
recursive-include bioneuralnet/scripts *.sh
# Include documentation source files
recursive-include docs *

# Include all requirements files
include requirements.txt
include requirements-cpu.txt
include requirements-cuda.txt
include requirements-dev.txt
# Include example scripts
recursive-include examples *.py

# Include documentation source files
recursive-include docs/source *.rst
recursive-include docs *.md
# Include scripts installation files
recursive-include scripts *

# Exclude __pycache__ and compiled Python files
global-exclude __pycache__ *.pyc *.pyo *.pyd

# Include examples
recursive-include examples *
# Exclude editor backup and temporary files
global-exclude *~ *.bak *.swp

Loading
Loading