Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Draft
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
16 changes: 15 additions & 1 deletion .compile_mod.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#!/bin/sh

# Copyright 2012-2024 Blue Brain Project / EPFL

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

INSTALL_DIR=$1
MOD_DIR=$2

cd ${INSTALL_DIR}

echo "Building mod files"
rm -rf x86_64
nrnivmodl ${MOD_DIR} >nrnivmodl.log 2>&1
25 changes: 25 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Prepares a draft PDF of the paper using the Open Journals draft action.
name: Draft JOSS Paper PDF
on: push

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: "3.10"

- name: Fetch the tag, if any. If not tagged, create a patch tag
uses: anothrNick/github-tag-action@1.69.0
uses: anothrNick/github-tag-action@1.70.0
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
id: tag
env:
Expand Down
28 changes: 0 additions & 28 deletions .gitlab-ci.yml

This file was deleted.

27 changes: 27 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Contributing to BlueCelluLab
============================

Thank you for taking the time to contribute!

Reporting Bugs and Suggesting Enhancements
------------------------------------------

1. Search existing `issues <https://github.com/BlueBrain/BlueCelluLab/issues>`_.
2. Open a new issue with a clear title and detailed description.
3. Include steps to reproduce, expected and actual behavior for bugs, or the current and expected behavior for enhancements.
4. Attach any relevant screenshots or files.
5. If applicable specify the versions of BlueCelluLab, Python and any relevant dependencies.

Pull Requests
-------------

1. Fork the repository and create a new branch.
2. Make your changes.
3. Run `tox -e lint` to check the code format.
4. Run the tests with `tox -e py3`.
5. Add unit tests for the new code.
6. If applicable add type hints and docstrings.
7. If applicable update the documentation.
8. Submit a pull request with a clear description.

Thank you for contributing to BlueCelluLab!
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ Testing is set up using `tox`:
tox -e py3 # runs the tests
tox -e lint # runs the format checks

Contributing
============

We welcome contributions to BlueCelluLab! Please see the `CONTRIBUTING.rst <https://github.com/BlueBrain/BlueCelluLab/blob/main/CONTRIBUTING.rst>`_ for guidelines on how to contribute.

Funding & Acknowledgements
==========================

Expand Down
26 changes: 26 additions & 0 deletions bluecellulab-bb5-tests/.compile_mod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

# Copyright 2024 Blue Brain Project / EPFL

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

INSTALL_DIR=$1
MOD_DIR=$2

cd ${INSTALL_DIR}

echo "Building mod files"
rm -rf x86_64
nrnivmodl ${MOD_DIR} >nrnivmodl.log 2>&1
11 changes: 11 additions & 0 deletions bluecellulab-bb5-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.nrndat
bin
lib
share
.pytest_cache
.tox-info.json
.tox
.neurodamus
__pycache__
x86_64
nrnivmodl.log
26 changes: 26 additions & 0 deletions bluecellulab-bb5-tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Variables
PIP_INDEX_URL := https://pypi.python.org/simple
NEURON_MODULE_OPTIONS := '-nogui'
TESTS_DIR := tests
MECHANISMS_DIR := ./../tests/mechanisms/
PYTEST_OPTS := --numprocesses=auto --timeout=600 -vsx --forked

# Default rule (similar to 'testenv' in tox)
default: install_deps compile_mod run_lint run_tests

# Rule for installing dependencies (similar to 'deps' in tox)
install_deps:
python -m pip install --index-url $(PIP_INDEX_URL) -r test_requirements.txt

# Rule for compiling mod (similar to the first 'commands' in tox)
compile_mod:
chmod +x ./.compile_mod.sh
./.compile_mod.sh . $(MECHANISMS_DIR)

# Rule for running tests (similar to the second 'commands' in tox)
run_tests:
NEURON_MODULE_OPTIONS=$(NEURON_MODULE_OPTIONS) pytest $(TESTS_DIR) $(PYTEST_OPTS)

run_lint:
ruff check $(TESTS_DIR)
mypy $(TESTS_DIR) --ignore-missing-imports
60 changes: 60 additions & 0 deletions bluecellulab-bb5-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# bluecellulab-bb5-tests

## Description

This folder contains tests for bluecellulab on the large circuits located on bb5. Please note that these tests are not directly usable as they are, due to dependencies.

## How to run locally

Simply clone the repository, install tox and type `tox` in the root directory of the repository.

## Continous Integration

This module will continue to be part of the continuous integration (CI) pipeline on GitLab until the end of the year. The scheduled CI tasks will run the tests for this module periodically until 2024.12.31. After this date, the tests will no longer be included in the CI pipeline.

## Mechanisms

The mechanisms for these tests have been merged into the [tests/mechanisms/](./../tests/mechanisms/) folder. Here is the list of mechanisms used for these tests. The original list is provided below, and files marked with an asterisk (*) were added to the tests folder as they were not already present:
- `Ca.mod`
- `CaDynamics_DC0.mod`
- `CaDynamics_E2.mod`
- `Ca_HVA.mod`
- `Ca_HVA2.mod`
- `Ca_LVAst.mod`
- `DetAMPANMDA.mod`
- `DetGABAAB.mod`
- `GluSynapse.mod`
- *`IN_Ih_Halnes2011.mod`
- *`IN_iT.mod`
- `Ih.mod`
- `Im.mod`
- `K_Pst.mod`
- `K_Tst.mod`
- `KdShu2007.mod`
- `NaTa_t.mod`
- `NaTg.mod`
- `NaTs2_t.mod`
- `Nap_Et2.mod`
- `ProbAMPANMDA_EMS.mod`
- `ProbGABAAB_EMS.mod`
- *`RC_IT_Des92.mod`
- `SK_E2.mod`
- `SKv3_1.mod`
- `StochKv.mod`
- `StochKv3.mod`
- *`TC_HH.mod`
- *`TC_ITGHK_Des98.mod`
- *`TC_Ih_Bud97.mod`
- *`TC_Ih_CaMod.mod`
- *`TC_Kleak.mod`
- *`TC_Naleak.mod`
- *`TC_Nap_Et2.mod`
- *`TC_cadecay.mod`
- *`TC_iA.mod`
- *`TC_iL.mod`
- *`TC_kir_Con15.mod`
- `TTXDynamicsSwitch.mod`
- `VecStim.mod`
- `gap.mod`
- *`ican.mod`
- `netstim_inhpoisson.mod`
5 changes: 5 additions & 0 deletions bluecellulab-bb5-tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pytest]
markers =
v5: tests on the neocortex circuit version 5.
v6: tests on the neocortex circuit version 6.
thal: tests on the thalamus circuit.
8 changes: 8 additions & 0 deletions bluecellulab-bb5-tests/pyvenv.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
home = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh/bin
implementation = CPython
version_info = 3.9.7.final.0
virtualenv = 20.17.1
include-system-site-packages = false
base-prefix = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh
base-exec-prefix = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh
base-executable = /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_externals/install_gcc-11.2.0-skylake/python-3.9.7-yj5alh/bin/python3.9
8 changes: 8 additions & 0 deletions bluecellulab-bb5-tests/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bluepy-configfile>=0.1.18
bluepy[bbp]>=2.5.0
pytest
pytest-timeout
pytest-xdist
pytest-forked
ruff>=0.0.40
mypy>=1.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Run Default
{

MorphologyPath /bgscratch/bbp/l5/release/2012.07.23/morphologies/h5
METypePath ../circuit_twocell_example1/ccells/
MeshPath /bgscratch/bbp/l5/release/2012.07.23/meshes
CircuitPath ../circuit_twocell_example1
nrnPath ../circuit_twocell_example1/ncsFunctionalAllRecipePathways
TargetFile /bgscratch/bbp/l5/release/2012.07.23/circuit/SomatosensoryCxS1-v4.lowerCellDensity.r151/O1/merged_circuit/default_user.target
BioName SomatosensoryCxS1-v4.lowerCellDensity.r151
CentralHyperColumn 2

}

Loading