Skip to content

Commit

Permalink
Merge branch 'main' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-gricourt committed Mar 28, 2023
2 parents 1d88c50 + 540d0bc commit 02e145b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 50 deletions.
35 changes: 1 addition & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ['3.8', '3.9', '3.10', '3.11']
defaults:
run:
shell: bash -l {0}
Expand All @@ -41,36 +41,3 @@ jobs:
run: |
pip install --no-deps .
python -m pytest tests
Coverage:
needs: [Build]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: 'Setup Neo4j with APOC'
uses: mdanics/[email protected]
- name: 'Deploying miniconda'
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
environment-file: recipes/workflow.yaml
python-version: '3.9'
mamba-version: "*"
channel-priority: true
use-mamba: true
- name: 'Run tests'
run: |
pip install --no-deps .
coverage run -m pytest
coverage lcov
- name: 'Coveralls'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# Neo4jSbml

[![Github Version](https://img.shields.io/github/v/release/brsynth/neo4jsbml?display_name=tag&sort=semver)](version)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![GitHub Super-Linter](https://github.com/brsynth/brsynth/workflows/Tests/badge.svg)](https://github.com/marketplace/actions/super-linter) [![Coverage](https://img.shields.io/coveralls/github/brsynth/neo4jsbml)](coveralls)
[![Github Version](https://img.shields.io/github/v/release/brsynth/neo4jsbml?display_name=tag&sort=semver)](version) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Documentation Status](https://readthedocs.org/projects/neo4jsbml/badge/?version=latest)](https://neo4jsbml.readthedocs.io/en/latest/?badge=latest) [![GitHub Super-Linter](https://github.com/brsynth/neo4jsbml/workflows/Tests/badge.svg)](https://github.com/marketplace/actions/super-linter)
[![DOI](https://zenodo.org/badge/585859244.svg)](https://zenodo.org/badge/latestdoi/585859244)

## Install

```sh
git clone [email protected]:brsynth/neo4jsbml.git
cd neo4jsbml
conda env create -n neo4jsbml -f recipes/workflow.yml
conda activate neo4jsbml
pip install --no-deps .
conda install -c conda-forge neo4jsbml
```

## Usage
Expand Down Expand Up @@ -40,7 +35,7 @@ Import your data with `neo4jsbml` into Neo4j.
```sh
neo4jsbml \
# Database parameters
--input-protocol-str ["neo4j", "bolt"] \
--input-protocol-str ["neo4j", "neo4j+s", "neo4j+ssc", "bolt", "bolt+s", "bolt+ssc"] \
--input-url-str "localhost" \
--input-port-int 7687 \
--input-user-str "neo4j" \
Expand Down
2 changes: 1 addition & 1 deletion docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Example
View shared metabolite
----------------------

View shared metabolite, fumarat, between two models: *iAF1260* and *iML1515* available from `BiGG <http://bigg.ucsd.edu>`_
View shared metabolite, fumarate, between two models: *iAF1260* and *iML1515* available from `BiGG <http://bigg.ucsd.edu>`_

.. code-block:: console
Expand Down
10 changes: 5 additions & 5 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ Usage
Installation
------------

To use neo4jsbml, first install it using conda:
With conda:

.. code-block:: console
$ conda install -c conda-forge -n neo4jsbml
$ conda install -c conda-forge neo4jsbml
Principles
----------

Import data from SBML into the Neo4j database is conducted in several steps:

1. Define your schema with `Arrows <https://arrows.app>`_ and download the schema at the JSON format
1. Define your schema with `Arrows <https://arrows.app>`_ and download the schema at the ``JSON`` format
2. Import your data into Neo4j


Expand All @@ -41,7 +41,7 @@ Configure access to Neo4j

The connection to the Neo4j database needs to have several parameters defined:

* protocol: ``neo4j`` or ``bolt`` (default: ``neo4j``)
* protocol: ``neo4j``, ``neo4j+s``, ``neo4j+ssc``, ``bolt``, ``bolt+s``, ``bolt+ssc`` (default: ``neo4j``)
* url (default: ``localhost``)
* port (default: ``7687``)
* user name (default: ``neo4j``)
Expand Down Expand Up @@ -98,7 +98,7 @@ Command line
~~~~~~~~~~~~
To import your data with ``neo4jsbml`` into Neo4j, you will need:
1. the database parameters
2. the ``SBML`` file, the model
2. the ``SBML`` file, e.g. the model
3. the ``JSON`` file downloaded from `arrows <https://arrows.app>`_

.. code-block:: console
Expand Down
2 changes: 2 additions & 0 deletions recipes/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ requirements:
run:
- python-libsbml
- neo4j-python-driver
- sphinx
- sphinx_rtd_theme

test:
imports:
Expand Down
2 changes: 1 addition & 1 deletion src/neo4jsbml/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def from_config(cls, path: str) -> "Connect"
create a Connect from an .ini file
"""

PROTOCOLS = ["neo4j", "bolt"]
PROTOCOLS = ["neo4j", "neo4j+s", "neo4j+ssc", "bolt", "bolt+s", "bolt+ssc"]

def __init__(
self,
Expand Down

0 comments on commit 02e145b

Please sign in to comment.