Skip to content

Commit

Permalink
Merge pull request #96 from mariuzka/mk/update_docs
Browse files Browse the repository at this point in the history
Mk/update docs
  • Loading branch information
mariuzka authored Sep 24, 2024
2 parents e26a692 + 37e61fa commit 14fb448
Show file tree
Hide file tree
Showing 11 changed files with 1,651 additions and 895 deletions.
741 changes: 650 additions & 91 deletions docs/Introduction/introduction_basics.ipynb

Large diffs are not rendered by default.

1,488 changes: 822 additions & 666 deletions docs/Introduction/introduction_creator.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Introduction/introduction_inspector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# Inspecting the network: The Inspector class\n",
"\n",
"When building network models, it is important to evaluate the created networks to ensure they are a valid representation of the target network.\n",
"For this purpose, pop2net provides a couple of tools."
"For this purpose, Pop2net provides a couple of tools."
]
},
{
Expand Down
173 changes: 93 additions & 80 deletions docs/Introduction/introduction_simulations.ipynb

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.wy-nav-content {
max-width: 900px !important;
}

/* margin after code cells */
div.nbinput.nblast.docutils.container {
margin-bottom: 15px;
/* Adjust this value for more or less space after code cells */
}

/* margin after output cells */
div.nboutput.nblast.docutils.container {
margin-bottom: 25px;
/* Adjust this value for more or less space after output cells */
}
2 changes: 1 addition & 1 deletion docs/api/creator.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. currentmodule:: pop2net.creator

Population Maker
Creator
================

.. autoclass:: Creator
Expand Down
1 change: 1 addition & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ API Reference

agent
location
magiclocation
creator
model
utils
9 changes: 9 additions & 0 deletions docs/api/magiclocation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. currentmodule:: pop2net

MagicLocation
========

The MagicLocation class is an interface to design specific network structures using the Creator.

.. autoclass:: MagicLocation
:members:
106 changes: 56 additions & 50 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ agentpy = "^0.1.5"
tabulate = "^0.9.0"
seaborn = "^0.12.1"
faker = "^15.1.1"
bokehgraph = "^0.6.0"
bokehgraph = "^0.6.1"

[tool.poetry.group.dev.dependencies]
pytest = ">=7.2.0"
Expand Down
10 changes: 5 additions & 5 deletions src/pop2net/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def __init__(self, model: _model.Model) -> None:
def setup(self) -> None:
"""Use this method to set instance attributes, for instance.
This method is called automatically by the population maker after creating an instance.
This method is called automatically by the creator after creating an instance.
"""

def filter(self, agent: _agent.Agent) -> bool: # noqa: ARG002
Expand All @@ -177,8 +177,8 @@ def bridge(self, agent: _agent.Agent) -> float | str | list | None: # noqa: ARG
agent (_agent.Agent): The agent that is currently processed by the Creator.
Returns:
float | str | list | None: The value which is used to assign agents
to location instances.
float | str | list | None:
The value which is used to assign agents to location instances.
"""
return None

Expand All @@ -189,8 +189,8 @@ def split(self, agent: _agent.Agent) -> float | str | list | None: # noqa: ARG0
agent: The agent that is currently processed by the Creator.
Returns:
float | str | list | None: The value(s) that determine(s) to which location instance
the agent is assigned.
float | str | list | None:
The value(s) that determine(s) to which location instance the agent is assigned.
"""
return None

Expand Down

0 comments on commit 14fb448

Please sign in to comment.