Skip to content
Merged
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
3 changes: 1 addition & 2 deletions ndradex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
__all__ = ["consts", "lamda", "nd", "radex", "run"]
__all__ = ["lamda", "nd", "radex", "run"]
__version__ = "0.3.1"


# dependencies
from . import consts
from . import lamda
from . import nd
from . import radex
Expand Down
86 changes: 0 additions & 86 deletions ndradex/consts.py

This file was deleted.

14 changes: 6 additions & 8 deletions ndradex/radex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["build", "run", "runmap", "to_input"]
__all__ = ["RADEX_BIN", "build", "run"]


# standard library
Expand All @@ -14,10 +14,6 @@
from typing import Any, Iterable, Iterator, Optional, Union


# dependencies
from .consts import NDRADEX, RADEX_BIN, RADEX_VERSION


# type hints
Input = tuple[str, ...]
Output = list[tuple[str, ...]]
Expand All @@ -30,11 +26,13 @@
# constants
FC = getenv("FC", "gfortran")
NAN = str(float("nan"))
NDRADEX_BIN = NDRADEX / "bin"
NDRADEX_BIN = Path(__file__).parent / "bin"
RADEX_BIN = Path(getenv("RADEX_BIN", NDRADEX_BIN)).expanduser().resolve()
RADEX_COLUMNS = 11
RADEX_LOGFILE = devnull
RADEX_MAXITER = 1_000_000
RADEX_MINITER = 10
RADEX_VERSION = "30nov2011"


# module logger
Expand All @@ -55,7 +53,7 @@ def build(
set to the package's bin (``/path/to/ndradex/bin``):
Otherwise, no build is run even if ``force=True``.

Keyword Args:
Args:
force: Whether to forcibly rebuild the binaries.
logfile: Path of the RADEX log file.
miniter: Minimum number of iterations.
Expand All @@ -72,7 +70,7 @@ def build(
if force:
sprun(
args=["make", "clean"],
cwd=NDRADEX / "bin",
cwd=NDRADEX_BIN,
stdout=PIPE,
stderr=PIPE,
check=True,
Expand Down
3 changes: 1 addition & 2 deletions tests/test_radex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@


# dependencies
from ndradex.consts import RADEX_BIN
from ndradex.lamda import query
from ndradex.radex import run, runmap, to_input
from ndradex.radex import RADEX_BIN, run, runmap, to_input


# test data
Expand Down