Skip to content

Commit

Permalink
Merge pull request #5 from CarlosBergillos/develop
Browse files Browse the repository at this point in the history
New version 1.1.0
  • Loading branch information
CarlosBergillos authored Jan 21, 2023
2 parents 1e937cf + a1f7e2f commit b032395
Show file tree
Hide file tree
Showing 20 changed files with 616 additions and 395 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/package-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
CIBW_TEST_COMMAND: pytest {project}/tests

- name: Upload wheels to artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*.whl
Expand All @@ -47,10 +47,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

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

Expand All @@ -64,7 +64,7 @@ jobs:
python -m build --sdist

- name: Upload source distribution to artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*.tar.gz
Expand All @@ -75,13 +75,13 @@ jobs:

steps:
- name: Download wheels from artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: ./dist

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/package-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

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

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

Expand All @@ -34,7 +34,7 @@ jobs:
CIBW_TEST_COMMAND: pytest {project}/tests

- name: Upload wheels to artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*.whl
Expand All @@ -43,10 +43,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

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

Expand All @@ -60,7 +60,7 @@ jobs:
python -m build --sdist

- name: Upload source distribution to artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*.tar.gz
Expand All @@ -71,13 +71,13 @@ jobs:

steps:
- name: Download wheels from artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: ./dist

- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

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

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
17 changes: 8 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ and can be easily installed by running:
pip install ts2vg
For other advanced uses, to build |ts2vg| from source Cython is
required.
For other advanced uses, to build |ts2vg| from source Cython is required.

.. Graph types
.. -----------

.. - Natural Visibility Graph [``ts2vg.NaturalVG``]
.. Weighted directed variations
.. - Horizontal Visibility Graph [``ts2vg.HorizontalVG``]
.. Weighted directed variations
.. - Parametric Natural Visibility Graph [*planned, not implemented yet*]
Supported graph types
---------------------

- Natural Visibility Graphs (``ts2vg.NaturalVG``)
- Horizontal Visibility Graphs (``ts2vg.HorizontalVG``)
- Weighted and Directed Visibility Graphs (via the ``weighted`` and ``directed`` parameters)
- Parametric Visibility Graphs (via the ``min_weight`` and ``max_weight`` parameters)

.. - Dual Perspective Visibility Graph [*planned, not implemented yet*]
Expand Down
13 changes: 12 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
Changelog
=========

**1.0**
**1.1.0**
---------

*21-01-2023*

Highlights:

+ Add Parametric Visibility Graph capabilities via ``min_weight`` and ``max_weight``.
+ General clean-up and refactor of some parts of the code.


**1.0.0**
---------

*20-08-2021*
Expand Down
55 changes: 28 additions & 27 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,57 @@
import os
import sys

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

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

import ts2vg

project = 'ts2vg'
copyright = '2021, Carlos Bergillos'
author = 'Carlos Bergillos'
project = "ts2vg"
copyright = "2023, Carlos Bergillos"
author = "Carlos Bergillos"
release = ts2vg.__version__
version = ts2vg.__version__


# -- General configuration ---------------------------------------------------

extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.githubpages',
'sphinx.ext.mathjax',
'sphinx.ext.linkcode',
'sphinx.ext.autosummary',
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.githubpages",
"sphinx.ext.mathjax",
"sphinx.ext.linkcode",
"sphinx.ext.autosummary",
]

autoclass_content = 'class'
autodoc_member_order = 'bysource'
autodoc_typehints = 'none'
autoclass_content = "class"
autodoc_member_order = "bysource"
autodoc_typehints = "none"
napoleon_use_rtype = False

templates_path = ['_templates']
templates_path = ["_templates"]

exclude_patterns = []


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

html_theme = 'pydata_sphinx_theme'
html_theme = "pydata_sphinx_theme"

html_static_path = ['_static']
html_static_path = ["_static"]

html_css_files = [
'custom.css',
"custom.css",
]

html_copy_source = False
html_show_sourcelink = False

html_favicon = '_static/favicon-32x32.png'
html_favicon = "_static/favicon-32x32.png"

html_theme_options = {
'favicons': [
"favicons": [
{
"rel": "icon",
"sizes": "16x16",
Expand All @@ -74,7 +74,7 @@
"href": "favicon-32x32.png",
},
],
'icon_links': [
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/CarlosBergillos/ts2vg",
Expand All @@ -86,8 +86,8 @@
"icon": "fas fa-cube",
},
],
'show_prev_next': False,
'navigation_with_keys': False,
"show_prev_next": False,
"navigation_with_keys": False,
}

# svg math output
Expand All @@ -102,15 +102,16 @@

# -- Options for sphinx.ext.linkcode -----------------------------------------


def linkcode_resolve(domain, info):
if domain != 'py':
if domain != "py":
return None
if not info['module']:
if not info["module"]:
return None

module = import_module(info['module'])
module = import_module(info["module"])
obj = module
for attr in info['fullname'].split('.'):
for attr in info["fullname"].split("."):
if not hasattr(obj, attr):
return None

Expand All @@ -126,4 +127,4 @@ def linkcode_resolve(domain, info):

relative_path = module_path.name / source_file.relative_to(module_path)

return f'https://github.com/CarlosBergillos/ts2vg/blob/main/{relative_path}#L{source_line_from}-L{source_line_to}'
return f"https://github.com/CarlosBergillos/ts2vg/blob/main/{relative_path}#L{source_line_from}-L{source_line_to}"
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ build-backend = "setuptools.build_meta"
# "Programming Language :: Python :: 3.7",
# "Programming Language :: Python :: 3.8",
# "Programming Language :: Python :: 3.9",
# "Programming Language :: Python :: 3.10",
# "Programming Language :: Python :: 3.11",
# "Programming Language :: Cython",
# "Topic :: Software Development :: Libraries :: Python Modules",
# "Operating System :: OS Independent",
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: OS Independent
Topic :: Scientific/Engineering :: Information Analysis
Expand Down
16 changes: 16 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest


@pytest.fixture
def empty_ts():
return []


@pytest.fixture
def sample_ts():
return [3.0, 4.0, 2.0, 1.0]


@pytest.fixture
def flat_ts():
return [1.0, 1.0, 1.0, 1.0]
Loading

0 comments on commit b032395

Please sign in to comment.