Skip to content

Commit

Permalink
refactor the add nodes methods
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Nov 20, 2024
1 parent c4ab757 commit 16f6eb0
Show file tree
Hide file tree
Showing 14 changed files with 604 additions and 595 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
language_version: python3
Expand All @@ -24,7 +24,7 @@ repos:
args: ['--ignore', 'D213,D100,D203,D104']
files: ^src/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.2'
rev: 'v1.13.0'
hooks:
- id: mypy
files: ^src/
Expand Down
20 changes: 10 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
# -- Project information -----------------------------------------------------

project = "pyhgf"
copyright = u"2022-{}, Nicolas Legrand".format(time.strftime("%Y"))
copyright = "2022-{}, Nicolas Legrand".format(time.strftime("%Y"))
author = "Nicolas Legrand"
release = pyhgf.__version__

nb_execution_timeout = 300

image_scrapers = ("matplotlib",)

bibtex_bibfiles = ['refs.bib']
bibtex_bibfiles = ["refs.bib"]
bibtex_reference_style = "author_year"
bibtex_default_style = "unsrt"

Expand Down Expand Up @@ -73,10 +73,10 @@
plot_html_show_source_link = False

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'myst-nb',
'.ipynb': 'myst-nb',
'.myst': 'myst-nb',
".rst": "restructuredtext",
".md": "myst-nb",
".ipynb": "myst-nb",
".myst": "myst-nb",
}

# The master toctree document.
Expand Down Expand Up @@ -112,13 +112,13 @@
"logo": {
"text": "pyhgf",
},
"show_nav_level": 2
"show_nav_level": 2,
}

myst_enable_extensions = ["dollarmath", "colon_fence"]

html_sidebars = {
"api": [],
"cite": [],
"references": [],
"api": [],
"cite": [],
"references": [],
}
297 changes: 57 additions & 240 deletions docs/source/notebooks/0.3-Generalised_filtering.ipynb

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion pyhgf/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
from .add_nodes import (
add_binary_state,
add_categorical_state,
add_continuous_state,
add_dp_state,
add_ef_state,
get_couplings,
insert_nodes,
update_parameters,
)
from .network import Network

from .hgf import HGF # isort: skip

__all__ = ["HGF", "Network"]
__all__ = [
"HGF",
"Network",
"add_nodes",
"add_continuous_state",
"add_binary_state",
"add_ef_state",
"add_categorical_state",
"add_dp_state",
"get_couplings",
"update_parameters",
"insert_nodes",
]
Loading

0 comments on commit 16f6eb0

Please sign in to comment.