Skip to content

Commit

Permalink
Merge branch 'main' into ppdp_aryan
Browse files Browse the repository at this point in the history
  • Loading branch information
adam2392 authored Aug 26, 2024
2 parents 440c8bb + 68de868 commit 0802ef0
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 57 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@

repos:
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files", "--skip", "__init__.py"]
files: ^dodiscover/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.971"
rev: "v1.11.1"
hooks:
- id: mypy
name: mypy (dodiscover)
args: ["--config-file", "pyproject.toml"]
files: ^dodiscover/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.971"
rev: "v1.11.1"
hooks:
- id: mypy
name: mypy (tests)
Expand Down
12 changes: 12 additions & 0 deletions doc/_static/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"name": "0.2 (devel)",
"version": "dev",
"url": "https://www.pywhy.org/pywhy-graphs/dev/index.html"
},
{
"name": "0.1",
"version": "stable",
"url": "https://www.pywhy.org/pywhy-graphs/stable/index.html"
}
]
20 changes: 0 additions & 20 deletions doc/_templates/docs-navbar.html

This file was deleted.

13 changes: 0 additions & 13 deletions doc/_templates/docs-toc.html

This file was deleted.

11 changes: 0 additions & 11 deletions doc/_templates/version-switcher.html

This file was deleted.

8 changes: 7 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
copyright = f"{datetime.today().year}, Adam Li"
author = "Adam Li"
version = pywhy_graphs.__version__
release = version

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

Expand Down Expand Up @@ -270,6 +271,7 @@ def setup(app):
html_css_files = ["css/custom.css"]
html_favicon = "_static/favicon_url.ico"

switcher_version_match = "dev" if "dev" in release else version
html_theme_options = {
"icon_links": [
dict(
Expand All @@ -281,7 +283,11 @@ def setup(app):
"use_edit_page_button": False,
"navigation_with_keys": False,
"show_toc_level": 1,
"navbar_end": ["version-switcher", "navbar-icon-links"],
"navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
"switcher": {
"json_url": "https://raw.githubusercontent.com/neurodata/treeple/main/doc/_static/versions.json", # noqa: E501
"version_match": switcher_version_match,
},
}

scrapers = ("matplotlib",)
Expand Down
1 change: 1 addition & 0 deletions examples/intro/intro_causal_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
and missing edge. We will review some of the fundamental causal graphs used
in causal inference, and their differences from traditional graphs.
"""

import networkx as nx
import numpy as np
import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions examples/visualization/plot_timeseries_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
For comparing different graphs with the same layout, see :ref:`ex-draw-graphs`
"""

from pywhy_graphs import StationaryTimeSeriesDiGraph
from pywhy_graphs.viz import draw, timeseries_layout

Expand Down
1 change: 1 addition & 0 deletions pywhy_graphs/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Version number."""

from importlib.metadata import version # type: ignore

__version__ = version(__package__)
12 changes: 4 additions & 8 deletions pywhy_graphs/classes/networkxprotocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ class NetworkXProtocol(Protocol):
_adj: Dict

@property
def nodes(self):
...
def nodes(self): ...

@property
def edges(self):
...
def edges(self): ...

@abstractmethod
def add_node(self, node):
...
def add_node(self, node): ...

@abstractmethod
def remove_edge(self, u, v):
...
def remove_edge(self, u, v): ...

0 comments on commit 0802ef0

Please sign in to comment.