Developer guide
To install in development mode:
pip install -e '.[dev]'
General guidelines
Editor: Use an editor which supports EditorConfig
Style guide: Follow Fortran best practices. For the Python code, the tool
black
,isort
andflake8
are used. Installpre-commit
to automate this via git hooks.pre-commit install
Branching model: The development uses branches and pull-requests for experimental features. We also rely on git submodules to track other libraries. The following branches are important:
snek5000-abl
:master
: main branchdevelop
: development branch
lib/Nek5000
:master
: upstream branchstable
: main branch tracking the stable version 17develop
: development branch
The following make working with submodules easy and ensures consistency:
# Enable recursion for relevant commands, such that # regular commands recurse into submodules by default git config submodule.recurse true
Testing: Run
pytest
from the top-level directory. The test-cases can be found undertests/
directory.Debugging: Set the environment variable:
export SNEK_DEBUG=true
to activate debugging logs and longer tests.
Vim
Vim users could benefit by setting:
set secure exrc
This sources the .exrc
file which comes along with the repository and
enables syntax highlighting for file extensions used in lib/Nek5000
.