Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRossetti committed Jun 7, 2023
2 parents e344d4f + 343dd09 commit ef37718
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 19 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/build_and_upload_pypi.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package-conda.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Add conda to system path
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test_ubuntu.yml
Expand Up @@ -8,6 +8,9 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: "0 6 1 * *" # The 1st day of each month at 06:00 UTC

jobs:
build:
Expand All @@ -16,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -48,4 +51,4 @@ jobs:
pytest --cov-config=.coveragerc --cov=./ --cov-report=xml
- name: codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ DyNetx provides implementations of dynamic networks in python (it is built upon

The project documentation can be found on [ReadTheDocs](http://dynetx.readthedocs.io).

If you would like to test ``DyNetx`` functionalities withouth installing anything on your machine consider using the preconfigured Jupyter Hub instances offered by [SoBigData++](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853).
If you would like to test ``DyNetx`` functionalities without installing anything on your machine consider using the preconfigured Jupyter Hub instances offered by [SoBigData++](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853).


## Citation
Expand Down
2 changes: 1 addition & 1 deletion docs/installing.rst
Expand Up @@ -50,7 +50,7 @@ Run python setup.py install to build and install
------
GitHub
------
Clone the DyNetx repostitory (see GitHub_ for options)
Clone the DyNetx repository (see GitHub_ for options)

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion dynetx/algorithms/assortativity.py
Expand Up @@ -217,7 +217,7 @@ def sliding_delta_conformity(dg, delta: int, alphas: list, labels: list, profile
:param profile_size:
:param hierarchies: label hierarchies
:param path_type: time respecting path type. String among: shortest, fastest, foremost, fastest_shortest and shortest_fastest (default: shortest)
:param progress_bar: wheter to show the progress bar, default false
:param progress_bar: whether to show the progress bar, default false
:return: conformity trend value for each node
-- Example --
Expand Down
2 changes: 1 addition & 1 deletion dynetx/classes/dyndigraph.py
Expand Up @@ -321,7 +321,7 @@ def number_of_nodes(self, t=None):
return nds

def avg_number_of_nodes(self):
"""Return the number of nodes in the t snpashot of a dynamic graph.
"""Return the number of nodes in the t snapshot of a dynamic graph.
Returns
Expand Down
10 changes: 5 additions & 5 deletions dynetx/test/test_algorithms.py
Expand Up @@ -4,7 +4,7 @@
import dynetx.algorithms as al


def get_netowrk():
def get_network():
g = dn.DynGraph()
g.add_interaction("A", "B", 1, 4)
g.add_interaction("B", "D", 2, 5)
Expand All @@ -19,7 +19,7 @@ def get_netowrk():
class AlgorithmsTestCase(unittest.TestCase):

def test_DAG(self):
g = get_netowrk()
g = get_network()
DAG, sources, targets, _, _ = al.temporal_dag(g, "D", "C", start=1, end=9)
self.assertIsInstance(DAG, nx.DiGraph)
self.assertIsInstance(sources, list)
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_ping_pong(self):
self.assertIsInstance(ressa, dict)

def test_time_respecting_paths(self):
g = get_netowrk()
g = get_network()
pts = al.time_respecting_paths(g, "A", "D", start=1, end=9)

for p in pts:
Expand All @@ -73,14 +73,14 @@ def test_time_respecting_paths(self):
self.assertIsInstance(p, tuple)

def test_all_time_respecting_paths(self):
g = get_netowrk()
g = get_network()
pts = al.all_time_respecting_paths(g, start=1, end=9)

for p in pts:
self.assertIsInstance(p, tuple)

def test_annotated_paths(self):
g = get_netowrk()
g = get_network()
pts = al.time_respecting_paths(g, "D", "C", start=2, end=9)

for _, ap in pts.items():
Expand Down
7 changes: 3 additions & 4 deletions dynetx/utils/decorators.py
Expand Up @@ -3,7 +3,6 @@

import networkx as nx
from decorator import decorator
from networkx.utils import is_string_like

__all__ = [
'open_file',
Expand All @@ -22,14 +21,14 @@ def not_implemented():
Raises
------
NetworkXNotImplemnted
NetworkXNotImplemented
If any of the packages cannot be imported
Examples
--------
Decorate functions like this::
@not_implemnted()
@not_implemented()
def sp_function():
pass
Expand Down Expand Up @@ -167,7 +166,7 @@ def _open_file(func, *args, **kwargs):
# Now we have the path_arg. There are two types of input to consider:
# 1) string representing a path that should be opened
# 2) an already opened file object
if is_string_like(path):
if isinstance(path, str):
ext = splitext(path)[1]
fobj = _dispatch_dict[ext](path, mode=mode)
close_fobj = True
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,5 +1,5 @@
numpy
future
tqdm
networkx>=2.4
networkx
decorator
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -21,7 +21,7 @@


setup(name='dynetx',
version='0.3.1',
version='0.3.2',
license='BSD-2-Clause',
description='Dynamic Network library',
url='https://github.com/GiulioRossetti/dynetx',
Expand Down

0 comments on commit ef37718

Please sign in to comment.