Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor the add nodes methods #251

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 8 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ and creates a standard node structure for these models.

HGF
Network
add_continuous_state
add_binary_state
add_ef_state
add_categorical_state
add_dp_state
get_couplings
update_parameters
insert_nodes

Plots
*****
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
Loading