Skip to content

Commit

Permalink
fix: Take review feedback into account
Browse files Browse the repository at this point in the history
  • Loading branch information
drodarie committed Jan 7, 2025
1 parent 8150dcd commit ee537d2
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ You can use your project to create reconstructions of your model, generating cel
and connections:

```
bsb compile -p
bsb compile
```

This creates a [network file](bsb.readthedocs.io/getting-started/networks.html) and plots the network.
This creates a network file.

### Simulating a network

Expand Down
4 changes: 2 additions & 2 deletions bsb/cli/commands/_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def handler(self, context):
for name, sim in extra_simulations.items():
if name not in network.simulations and name == sim_name:
network.simulations[sim_name] = sim
root = pathlib.Path(getattr(context.arguments, "output_folder", "./"))
root = pathlib.Path(getattr(context.arguments, "output-folder", "./"))
if not root.is_dir() or not os.access(root, os.W_OK):
return report(
f"Output provided '{root.absolute()}' is not an existing directory with write access.",
Expand All @@ -231,7 +231,7 @@ def get_options(self):
def add_parser_arguments(self, parser):
parser.add_argument("network")
parser.add_argument("simulation")
parser.add_argument("-o", "--output_folder")
parser.add_argument("-o", "--output-folder")


class CacheCommand(BaseCommand, name="cache"): # pragma: nocover
Expand Down
2 changes: 1 addition & 1 deletion bsb/config/_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Distribution:
)
"""Name of the scipy.stats distribution function"""
parameters: dict[str, typing.Any] = config.catch_all(type=types.any_())
"""parameters to pass to the distribution"""
"""Parameters to pass to the distribution"""

def __init__(self, **kwargs):
if self.distribution == "constant":
Expand Down
2 changes: 1 addition & 1 deletion bsb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def create_job_pool(self, fail_fast=None, quiet=False):
)
try:
# Check whether stdout is a TTY, and that it is larger than 0x0
# (e.g. MPI sets it to 0x0 unless a xterm is emulated.
# (e.g. MPI sets it to 0x0 unless an xterm is emulated).
tty = os.isatty(sys.stdout.fileno()) and sum(os.get_terminal_size())
except Exception:
tty = False
Expand Down
7 changes: 3 additions & 4 deletions bsb/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ def _all_chunks(iter_):


def _queue_connectivity(self, pool: "JobPool"):
"""Get the queued jobs of all the strategies we depend on.
"""
Get the queued jobs of all the strategies we depend on.
Parameters
----------
param pool : pool where the jobs will be queued
param pool: pool where the jobs will be queued
type pool: bsb.services.pool.JobPool
"""
deps = set(_gutil.ichain(pool.get_submissions_of(strat) for strat in self.get_deps()))
Expand Down
2 changes: 1 addition & 1 deletion docs/cells/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The :guilabel:`plotting` block allows you to specify formatting details.
.. rubric:: Specifying spatial density

You can set the spatial distribution for each cell type present in a
:ref:`NrrdVoxels <bsb:voxel-partition>` partition.
:ref:`NrrdVoxels <voxel-partition>` partition.

To do so, you should first attach your nrrd volumetric density file(s) to the partition with either
the :guilabel:`source` or :guilabel:`sources` blocks.
Expand Down
7 changes: 3 additions & 4 deletions docs/components/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ out of the box components for basic operations, but often you'll need to write y
If you want to read a step by step tutorial on how to make your own component, check this
:doc:`page </getting-started/guide_components>`

For each component, BSB provides interfaces, each with a set of functions that you must
implement. If these functions are present, the framework knows how to use your class.

Hence, the framework allows you to plug in user code pretty much anywhere. Neat.
For each component, the BSB provides interfaces, each with a set of functions that you must
implement. By implementing these functions are present, the framework can seamlessly integrate
your custom components.

Here is how you do it (theoretically):

Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"mpi4py": ("https://mpi4py.readthedocs.io/en/stable/", None),
"arbor": ("https://docs.arbor-sim.org/en/latest/", None),
"neo": ("https://neo.readthedocs.io/en/latest/", None),
"bsb": ("https://bsb.readthedocs.io/en/latest", None),
}

# Add any paths that contain templates here, relative to this directory.
Expand Down

0 comments on commit ee537d2

Please sign in to comment.