Skip to content

Commit

Permalink
bump to v0.2.27
Browse files Browse the repository at this point in the history
  • Loading branch information
junipertcy committed Jun 29, 2024
1 parent c04499f commit 984be1b
Show file tree
Hide file tree
Showing 24 changed files with 197 additions and 206 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
run: curl -sSL https://install.python-poetry.org | python - -y

- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Update Poetry configuration
run: poetry config virtualenvs.create false

- name: Install dependencies
run: poetry install --no-root
run: poetry install --sync --no-interaction

- name: Build package
run: poetry build
Expand All @@ -48,9 +54,12 @@ jobs:
venv-wheel/bin/python -m pip install ../dist/rspringrank-*.whl
venv-wheel/bin/python -c "import rSpringRank"
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI --local
poetry publish --build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0

# - name: Publish to PyPI
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
# run: |
# poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI --local
# poetry publish --build
141 changes: 75 additions & 66 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,105 +12,104 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))

from recommonmark.parser import CommonMarkParser

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

from recommonmark.parser import CommonMarkParser

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

project = 'junipertcy/rSpringRank'
copyright = '2023-2024, Tzu-Chi Yen <tzuchi.yen@colorado.edu>'
author = 'Tzu-Chi Yen <tzuchi.yen@colorado.edu>'
project = "junipertcy/rSpringRank"
copyright = "2023-2024, Tzu-Chi Yen <tzuchi.yen@colorado.edu>"
author = "Tzu-Chi Yen <tzuchi.yen@colorado.edu>"

# The full version, including alpha/beta/rc tags
release = '0.1.1'
release = "0.1.1"


# -- General configuration ---------------------------------------------------
source_parsers = {
'.md': CommonMarkParser,
".md": CommonMarkParser,
}

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.autosummary',
'numpydoc',
'sphinx.ext.extlinks',
'sphinx.ext.viewcode',
'extlinks_fancy',
'myst_parser', # markdown support
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.autosummary",
"numpydoc",
"sphinx.ext.extlinks",
"sphinx.ext.viewcode",
"extlinks_fancy",
"myst_parser", # markdown support
]
autosummary_generate = True
numpydoc_show_class_members = False
mathjax_path = "MathJax/MathJax.js?config=default"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = '.rst'
source_suffix = ".rst"
# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'style_nav_header_background': '#0074D9',
"logo_only": False,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": False,
"style_nav_header_background": "#0074D9",
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}
html_logo = "assets/rSpringRank-logo.png"
html_favicon = 'assets/rSpringRank-favicon.png'
html_favicon = "assets/rSpringRank-favicon.png"
html_context = {
'display_github': True,
'github_user': 'junipertcy',
'github_repo': 'rSpringRank',
'github_version': 'main/docs/'
"display_github": True,
"github_user": "junipertcy",
"github_repo": "rSpringRank",
"github_version": "main/docs/",
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# Custom sidebar templates, must be a dictionary that maps document names
Expand All @@ -127,35 +126,37 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'rSpringRank'
htmlhelp_basename = "rSpringRank"

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'ipython': ('https://ipython.org/ipython-doc/stable/', None)}
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"ipython": ("https://ipython.org/ipython-doc/stable/", None),
}

extlinks_fancy = {'doi': (['https://dx.doi.org/{0}',
'https://sci-hub.tw/{0}'],
['DOI: {0}', "sci-hub"]),
'arxiv': (['https://arxiv.org/abs/{0}'], ['arXiv: {0}'])}
extlinks_fancy = {
"doi": (
["https://dx.doi.org/{0}", "https://sci-hub.tw/{0}"],
["DOI: {0}", "sci-hub"],
),
"arxiv": (["https://arxiv.org/abs/{0}"], ["arXiv: {0}"]),
}

# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -165,19 +166,21 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'rSpringRank.tex', 'rSpringRank Documentation',
'Tzu-Chi Yen', 'manual'),
(
master_doc,
"rSpringRank.tex",
"rSpringRank Documentation",
"Tzu-Chi Yen",
"manual",
),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'rSpringRank', 'rSpringRank Documentation',
[author], 1)
]
man_pages = [(master_doc, "rSpringRank", "rSpringRank Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -186,9 +189,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'rSpringRank', 'rSpringRank Documentation',
author, 'rSpringRank', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"rSpringRank",
"rSpringRank Documentation",
author,
"rSpringRank",
"One line description of project.",
"Miscellaneous",
),
]


Expand All @@ -207,7 +216,7 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------
13 changes: 6 additions & 7 deletions docs/extlinks_fancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
:license: BSD, see LICENSE for details.
"""

from six import iteritems
from docutils import nodes, utils

import sphinx
from docutils import nodes, utils
from six import iteritems
from sphinx.util.nodes import split_explicit_title


Expand All @@ -41,6 +40,7 @@ def role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
if len(base_urls) > 1:
pnodes.append(nodes.Text("]"))
return pnodes, []

return role


Expand All @@ -50,7 +50,6 @@ def setup_link_roles(app):


def setup(app):
app.add_config_value('extlinks_fancy', {}, 'env')
app.connect('builder-inited', setup_link_roles)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}

app.add_config_value("extlinks_fancy", {}, "env")
app.connect("builder-inited", setup_link_roles)
return {"version": sphinx.__display_version__, "parallel_read_safe": True}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "rSpringRank"
version = "0.2.26"
version = "0.2.27"
authors = ["Tzu-Chi Yen <tzuchi.yen@colorado.edu>"]
license = "LGPL-3.0-or-later"
readme = "README.md"
Expand Down
32 changes: 15 additions & 17 deletions rSpringRank/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,21 @@
import importlib as _importlib
import os

__version__ = "0.0.1"

import warnings

from rSpringRank import *
import rSpringRank
from rSpringRank.datasets import *
import rSpringRank.datasets
from rSpringRank.io import *
import rSpringRank.draw
import rSpringRank.io
from rSpringRank.optimize import *
import rSpringRank.optimize
from rSpringRank.stats import *
import rSpringRank.stats
from rSpringRank.stats import *
import rSpringRank.stats
from rSpringRank import *
from rSpringRank.datasets import *
from rSpringRank.draw import *
import rSpringRank.draw

from rSpringRank.io import *
from rSpringRank.optimize import *
from rSpringRank.stats import *

__package__ = "rSpringRank"
__title__ = "rSpringRank: Regularized methods for efficient ranking in networks."
Expand All @@ -52,9 +48,8 @@
]
)
__URL__ = "https://github.com/junipertcy/rSpringRank"
__version__ = "0.2.26"
__release__ = "0.2.26"

__version__ = "0.2.27"
__release__ = "0.2.27"

submodules = ["datasets", "io", "optimize", "stats", "draw"]
dunder = [
Expand All @@ -67,10 +62,13 @@
"__license__",
"__release__",
]
__all__ = submodules + [
"show_config",
] + dunder

__all__ = (
submodules
+ [
"show_config",
]
+ dunder
)


def __dir__():
Expand Down
Loading

0 comments on commit 984be1b

Please sign in to comment.