Skip to content

Commit

Permalink
Rename package eturb -> snek5000
Browse files Browse the repository at this point in the history
New subpackage: assets
New module: output.base
  • Loading branch information
ashwinvis committed May 8, 2020
1 parent f897664 commit 9c7e201
Show file tree
Hide file tree
Showing 38 changed files with 370 additions and 226 deletions.
1 change: 0 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Authors

* [Ashwin Vishnu Mohanan](mailto:[email protected])
* [Luigi Antonialli](mailto:[email protected])
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Security in case of vulnerabilities.

### Added
- Tar shell functions in activate script
- Module `eturb.clusters` for job submission
- Module `snek5000.clusters` for job submission

### Changed
- Conda environment packages
Expand Down Expand Up @@ -100,7 +100,7 @@ Security in case of vulnerabilities.
### Added
- Uses `fluidsim` framework for creating a scripting layer
- Package `abl` with a single module and an `abl.Output` class
- New sub-packages and modules under `eturb`: `solvers, output, info, log,
- New sub-packages and modules under `snek5000`: `solvers, output, info, log,
make, magic, operators`
- Testing with `pytest`, and CI on GitHub actions
- Detailed documentation
Expand All @@ -114,6 +114,6 @@ Security in case of vulnerabilities.
## [0.0.1] - 2020-01-17

### Added
- Scripting for managing run parameters `eturb.params`
- Scripting for managing run parameters `snek5000.params`
- Python packaging
- Sphinx + Doxygen + Breathe documentation
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pip install -e '.[dev]'
also rely on [git submodules](https://www.git-scm.com/docs/git-submodule) to
track other libraries. The following branches are important:

* `eturb`:
* `snek5000`:
* `master`: main branch
* `develop`: development branch
* `lib/Nek5000`:
Expand All @@ -40,7 +40,7 @@ pip install -e '.[dev]'
top-level directory. The test-cases can be found under `tests/` directory.
* **Debugging**: Set the environment variable:
```bash
export ETURB_DEBUG=true
export SNEK_DEBUG=true
```
to activate debugging logs and longer tests.

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Project *eTurb*

[![](https://github.com/exabl/eturb/workflows/Tests/badge.svg)](https://github.com/exabl/eturb/actions?workflow=Tests)
[![](https://github.com/exabl/eturb/workflows/Docs/badge.svg)](https://github.com/exabl/eturb/actions?workflow=Docs)
[![](https://github.com/exabl/snek5000/workflows/Tests/badge.svg)](https://github.com/exabl/snek5000/actions?workflow=Tests)
[![](https://github.com/exabl/snek5000/workflows/Docs/badge.svg)](https://github.com/exabl/snek5000/actions?workflow=Docs)

**Efficient** simulations of **turbulent** atmospheric boundary layer.

Expand All @@ -10,10 +10,10 @@

```sh
# Clone
git clone --recursive [email protected]:exabl/eturb.git
git clone --recursive [email protected]:exabl/snek5000.git

# Activate paths: Start here. Always!
cd eturb
cd snek5000
source activate.sh

# Build Nek5000
Expand All @@ -38,8 +38,8 @@ do this (and it has to be done only once):
```
- Using `conda`
```sh
conda env create -n eturb -f environment.yml
conda activate eturb
conda env create -n snek5000 -f environment.yml
conda activate snek5000
pip install -e .
```
After setting up Python, you can do either of the following:
Expand All @@ -60,11 +60,11 @@ After setting up Python, you can do either of the following:
snakemake clean
cd -

2. Use the **[`eturb` Python
API](https://exabl.github.io/eturb/_generated/eturb.html)**, based on
2. Use the **[`snek5000` Python
API](https://exabl.github.io/snek5000/_generated/snek5000.html)**, based on
[fluidsim](https://fluidsim.readthedocs.io)
```python
from eturb.solvers.abl import Simul
from snek5000.solvers.abl import Simul
params = Simul.create_default_params()
Expand Down
8 changes: 4 additions & 4 deletions Snakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from glob import iglob
from eturb.util.archive import tar_name, archive
from snek5000.util.archive import tar_name, archive

PYTHON_DIRECTORIES = ["docs", "src", "tests"]

Expand All @@ -9,7 +9,7 @@ rule env_export:
"""
conda env export -f environment.yml
sed -i '/^prefix/d' environment.yml
sed -i '/eturb/d' environment.yml
sed -i '/snek5000/d' environment.yml
"""

rule env_update:
Expand Down Expand Up @@ -42,7 +42,7 @@ rule ctags:
input:
nek5000='lib/Nek5000/core',
abl='src/abl',
eturb='src/eturb'
snek5000='src/snek5000'
output:
'.tags'
params:
Expand All @@ -64,7 +64,7 @@ rule ctags:
"""
ctags -f {output} --language-force=Fortran -R {input.nek5000}
ctags -f {output} {params.excludes} --append --language-force=Fortran -R {input.abl}
ctags -f {output} {params.excludes} --append -R {input.eturb}
ctags -f {output} {params.excludes} --append -R {input.snek5000}
"""

rule watch:
Expand Down
4 changes: 2 additions & 2 deletions activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function tar-diff() {

if [ -d venv ]; then
source venv/bin/activate
elif [ -z "$CONDA_PREFIX" ]; then
elif [[ -z "$CONDA_PREFIX" ]] && [[ -z "$VIRTUAL_ENV" ]]; then
echo 'WARNING: no venv / conda environment present.'
echo 'Read the docs on how to setup your Python environment: https://exabl.github.io/eturb/README.html#easy-way'
echo 'Read the docs on how to setup your Python environment: https://exabl.github.io/snek5000/README.html#easy-way'
fi

if [ "$BASH_VERSION" ]; then
Expand Down
53 changes: 1 addition & 52 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = .. ../lib/Nek5000/core ../src/abl ../src/abl/toolbox
INPUT = .. ../lib/Nek5000/core

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -859,57 +859,6 @@ FILE_PATTERNS = *.c \
*.ucf \
*.qsf \
*.usr \
ADJOINT \
AVG \
DEALIAS \
DOMAIN \
DXYZ \
EIGEN \
ESOLV \
FDMH1 \
GMRES \
HSMG \
IXYZ \
MVGEOM \
NEKUSE \
NONCON \
OPCTR \
ORTHOP \
ORTHOSTRS \
ORTHOT \
SCRCT \
SEMHAT \
STEADY \
TOPOL \
VPROJ \
WZ \
WZF \
CTIMER \
CVODE \
GEOM \
GFLDR \
GLOBALCOM \
HEADER \
INPUT \
MASS \
NEKNEK \
PARALLEL \
PARDICT \
RESTART \
SOLN \
TOTAL \
TSTEP \
ZPER \
SIZE \
CHKPOINTD \
CHKPTMSTPD \
FRAMELP \
IOTOOLD \
MAP2D \
MNTRLOGD \
MNTRTMRD \
RPRMD \
STATD
# *.py \

# The RECURSIVE tag can be used to specify whether or not subdirectories should
Expand Down
4 changes: 0 additions & 4 deletions docs/abl.rst

This file was deleted.

22 changes: 8 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
from subprocess import PIPE

import breathe

import abl
import eturb
import snek5000


def root(module):
Expand All @@ -36,23 +34,22 @@ def root(module):
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, root(abl))
sys.path.insert(0, root(eturb))
sys.path.insert(0, root(snek5000))

print("sys.path =\n ", "\n ".join(sys.path))

# -- Project information -----------------------------------------------------

project = "eturb"
project = "snek5000"
_today = date.today()
copyright = (
f"2019 - {_today.year}, Ashwin Vishnu Mohanan. Published: {_today.isoformat()}"
)
author = "Ashwin Vishnu Mohanan"

version = ".".join(eturb.__version__.split(".")[:3])
version = ".".join(snek5000.__version__.split(".")[:3])
# The full version, including alpha/beta/rc tags
release = eturb.__version__
release = snek5000.__version__


# -- General configuration ---------------------------------------------------
Expand All @@ -74,10 +71,7 @@ def root(module):
os.makedirs("_build/html/doxygen", exist_ok=True)

# Inspect whether to run doxygen or not
last_modified = max(
eturb.util.last_modified("../lib").stat().st_mtime,
eturb.util.last_modified("../src/abl").stat().st_mtime,
)
last_modified = snek5000.util.last_modified("../lib").stat().st_mtime
timestamp = Path("_build/.doxygen_timestamp")
if timestamp.exists() and Path("_build/xml").exists():
with open(timestamp) as fp:
Expand Down Expand Up @@ -132,11 +126,11 @@ def root(module):
breathe_domain_by_file_pattern = {"SIZE": "f"}

# Input sources
breathe_projects = {"eturb": "_build/xml/"}
breathe_projects = {"snek5000": "_build/xml/"}
# breathe_projects_source = {
# "abl": ("../src/abl", ["SIZE", "abl.usr"]),
# }
breathe_default_project = "eturb"
breathe_default_project = "snek5000"

# ----------------------------------------------------------------------------

Expand Down
16 changes: 7 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. eturb documentation master file, created by
.. snek5000 documentation master file, created by
sphinx-quickstart on Wed Dec 25 01:55:26 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand All @@ -16,11 +16,11 @@ Welcome to project *eTurb*'s documentation!
-->
<img style="float: right;" src="_static/icon.svg" width="100rem"/>

+------------+--------------------------------+
| Repository | https://github.com/exabl/eturb |
+------------+--------------------------------+
| Version | |release| |
+------------+--------------------------------+
+------------+-----------------------------------+
| Repository | https://github.com/exabl/snek5000 |
+------------+-----------------------------------+
| Version | |release| |
+------------+-----------------------------------+

.. toctree::
:maxdepth: 2
Expand All @@ -32,14 +32,12 @@ Welcome to project *eTurb*'s documentation!
:maxdepth: 2
:caption: User Guide

abl
nek5000

.. autosummary::
:toctree: _generated/

eturb
abl
snek5000

.. toctree::
:maxdepth: 1
Expand Down
4 changes: 1 addition & 3 deletions docs/nek5000.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ Nek5000 core library
.. note::

The following is auto-generated using Doxygen and represents a fork_ of
Nek5000 v17. Only subroutines relevant to eturb project are listed here.
Nek5000 v17. Only subroutines relevant to snek5000 project are listed here.
The `official documentation`_ is hand-written and is more general.

.. doxygengroup:: core

.. _fork: https://github.com/exabl/Nek5000
.. _official documentation: https://nek5000.github.io/NekDoc/appendix.html
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm[toml]>=3.4.2"]


[tool.setuptools_scm]
write_to = "src/eturb/_version.py"
write_to = "src/snek5000/_version.py"
write_to_template = "__version__ = \"{version}\"\n"
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[metadata]
author = Ashwin Vishnu Mohanan
author_email = [email protected]
url = https://exabl.github.io/eturb
name = eturb
description = Python utilities for eturb project
url = https://github.com/exabl/snek5000-abl
name = abl
description = Python utilities for snek5000 project
long_description = file: README.md, HISTORY.md
long_description_content_type = text/markdown
license = BSD-3-Clause
Expand Down Expand Up @@ -65,5 +65,5 @@ ignore = E501,W503,W505
max-line-lenght = 82

[isort]
known_first_party = fluiddyn, fluidsim, eturb, abl
known_first_party = fluiddyn, fluidsim, snek5000, abl
multi_line_output = 3
Loading

0 comments on commit 9c7e201

Please sign in to comment.