Skip to content

Commit

Permalink
Devel (#221)
Browse files Browse the repository at this point in the history
* use find_packages() in setup.py

* removing 3.6

* added conda config and CI

* add docs to expression inout

* update docs

* Update run_panda.py

* py36 EOL

* update sambar

* Fix lioness (#218): fixed panda and lioness behavior. Started refactoring the code by defining functions that are then called by the class methods. Added start and end for Panda and Puma, this is similar to what happens with R implementation. Lioness uses the same formula as R. Updated tests for the new behavior. Separated cpu and gpu


Co-authored-by: Thomas Gilgenast <thomas@vant.ai>
Co-authored-by: Marouen <marouenbg@users.noreply.github.com>
Co-authored-by: marouenbg <marouen.b.guebila@gmail.com>
Co-authored-by: violafanfani <viol.fanfani@gmail.com>
  • Loading branch information
5 people authored Feb 9, 2022
1 parent 00ef6dc commit a1e0530
Show file tree
Hide file tree
Showing 32 changed files with 89,106 additions and 871 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/conda-publish-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: conda release manual
on:
workflow_dispatch:
branches:
- master
- devel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: "Setup Conda"
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge, bioconda
- name: "Install Conda development packages"
run: |
conda install conda-build
conda install -c anaconda anaconda-client
- name: "Build and upload package"
run: |
mkdir conda-build
conda build . --no-build-id --output-folder ./conda-build
conda convert -p all ./conda-build/**/netzoopy*.bz2 --output-dir ./conda-build
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --force -u netzoo --no-progress ./conda-build/**/netzoopy*.bz2
31 changes: 31 additions & 0 deletions .github/workflows/conda-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish on release conda
on:
release:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- name: "Setup Conda"
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge, bioconda
- name: "Install Conda development packages"
run: |
conda install conda-build
conda install -c anaconda anaconda-client
- name: "Build and upload package"
run: |
mkdir conda-build
conda build . --no-build-id --output-folder ./conda-build
conda convert -p all ./conda-build/**/netzoopy*.bz2 --output-dir ./conda-build
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --force -u netzoo --no-progress ./conda-build/**/netzoopy*.bz2
53 changes: 26 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,43 @@ name: netZooPy

on:
push:
branches:
branches:
- master
- devel
pull_request:
branches:
branches:
- master
- devel

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and build package
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov codecov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=netZooPy tests
- name: Report coverage
run: |
codecov
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and build package
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov codecov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=netZooPy tests
- name: Report coverage
run: |
codecov
31 changes: 31 additions & 0 deletions .github/workflows/test-conda-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: test conda
on:
push:
branches:
- master
- devel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- name: "Setup Conda"
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge, bioconda
- name: "Install Conda development packages"
run: |
conda install conda-build
conda install -c anaconda anaconda-client
- name: "Build and upload package"
run: |
mkdir conda-build
conda build . --no-build-id --output-folder ./conda-build
conda convert -p all ./conda-build/**/netzoopy*.bz2 --output-dir ./conda-build --dry-run
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ pt_out.csv
reg_memb.txt
tar_memb.txt
gt_panda*.txt


!tests/lioness
!tests/lioness/*
.DS_Store
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Documentation Status](https://readthedocs.org/projects/netzoopy/badge/?version=latest)](https://netzoopy.readthedocs.io/en/latest/?badge=latest)
[![tutorials](https://img.shields.io/badge/netZooPy-tutorials-9cf)](https://github.com/netZoo/netZooPy/tree/master/tutorials)
[![netBooks](https://img.shields.io/badge/netZooPy-netBooks-ff69b4)](http://netbooks.networkmedicine.org/user/marouenbg/notebooks/Welcome_to_netBooks.ipynb?)
[![alt-version](https://anaconda.org/netzoo/netzoopy/badges/version.svg)](https://anaconda.org/netzoo/netzoopy)
[![netBooks](https://img.shields.io/badge/netZooPy-netBooks-ff69b4)](http://netbooks.networkmedicine.org/)


netZooPy is tested on: (OS: Ubuntu + Macos) X (Language: Python v3.6 + Python v3.7 + Python v3.8 + Python v3.9)


## Description
netZooPy is a Python package of network methods.

netZooPy is a Python package of network methods.

## Zoo animals

(gpu)PANDA, (gpu)LIONESS, (gpu)PUMA, SAMBAR, CONDOR, OTTER, and DRAGON.

## Quick guide
Expand All @@ -27,22 +32,36 @@ Then install netZooPy through pip:
```bash
cd netZooPy
pip3 install -e .
```
```

Upon completion you can load netZooPy in your python code through

```python
import netZooPy
```

## Conda installation

On anaconda.org you will find the conda recipes for all platforms. We recommend using conda environments to keep your analyses self-contained and reproducible.

To install netzoopy through conda:

```bash
conda install -c netzoo netzoopy
```

## User guide

Please refer to the [documentation](https://netzoopy.readthedocs.io/en/latest/) website for installation instructions and usage.

## License

The software is free and is licensed under the GNU General License v3.0, see the file [LICENSE](LICENSE) for details.

## Feedback/Issues

Please report any issues to the [issues page](https://github.com/netZoo/netZooPy/issues).

## Code of conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
5 changes: 5 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python:
- 3.9
- 3.8
- 3.7
- 3.6
44 changes: 44 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package:
name: netzoopy
version: 0.8.1

source:
path: ..

build:
number: 0
script: "python -m pip install . --no-deps --ignore-installed -vv"

requirements:
build:
- numpy>=1.19.2
- python {{ python }}
- networkx>=2.6.3
- matplotlib>=3.3.4
- scipy>=1.5.3
- python-igraph>=0.9.6
- joblib>=1.1.0
- statsmodels>=0.12.2
run:
- numpy>=1.19.2
- python {{ python }}
- networkx>=2.6.3
- matplotlib>=3.3.4
- scipy>=1.5.3
- python-igraph>=0.9.6
- joblib>=1.1.0
- statsmodels>=0.12.2

test:
commands:
- python -c "from netZooPy.panda.panda import Panda"

about:
home: https://github.com/netZoo/netZooPy
summary: Python implementation of the NetZoo ecosystem
license: GPL3
license_file: LICENSE
dev_url: https://github.com/netZoo/netZooPy
doc_url: netzoo.github.io/
description: |
netZooPy is a Python package of network methods and it is part of the NetZoo family.
Loading

0 comments on commit a1e0530

Please sign in to comment.