Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Struct Overhaul #445

Open
wants to merge 15 commits into
base: v4-prep
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ignore =
N815
# Docstring in imperative mood. This should *not* be the case for @property's, but can't ignore them atm.
D401
# Module shadowing a builtin
A005
max-line-length = 88
max-complexity = 70
docstring-convention=numpy
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __getattr__(cls, name):
out = subprocess.run(["python", "setup.py", "--version"], capture_output=True)

try:
from py21cmfast import cache_tools
from py21cmfast.io import cache_tools
except ImportError:
raise

Expand Down
19 changes: 6 additions & 13 deletions src/py21cmfast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,24 @@
# package is not installed
__version__ = "unknown"

# This just ensures that the default directory for boxes is created.
from os import mkdir as _mkdir
from os import path

from . import cache_tools, lightcones, plotting, wrapper
from . import lightcones, plotting, wrapper
from ._cfg import config
from ._data import DATA_PATH
from ._logging import configure_logging
from .cache_tools import query_cache
from .drivers.coeval import Coeval, run_coeval
from .drivers.lightcone import LightCone, exhaust_lightcone, run_lightcone
from .drivers.param_config import InputParameters, get_logspaced_redshifts
from .drivers.single_field import (
brightness_temperature,
compute_halo_grid,
compute_initial_conditions,
compute_ionization_field,
compute_spin_temperature,
compute_xray_source_field,
determine_halo_list,
perturb_field,
perturb_halo_list,
spin_temperature,
)
from .io.caching import CacheConfig, OutputCache
from .lightcones import AngularLightconer, RectilinearLightconer
from .run_templates import create_params_from_template
from .utils import get_all_fieldnames
Expand All @@ -48,7 +44,9 @@
AstroParams,
CosmoParams,
FlagOptions,
InputParameters,
UserParams,
get_logspaced_redshifts,
global_params,
)
from .wrapper.outputs import (
Expand All @@ -64,8 +62,3 @@
)

configure_logging()

try:
_mkdir(path.expanduser(config["direc"]))
except FileExistsError:
pass
2 changes: 0 additions & 2 deletions src/py21cmfast/_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Config(dict):

_defaults = {
"direc": "~/21cmFAST-cache",
"regenerate": False,
"write": True,
"cache_param_sigfigs": 6,
"cache_redshift_sigfigs": 4,
"ignore_R_BUBBLE_MAX_error": False,
Expand Down
249 changes: 0 additions & 249 deletions src/py21cmfast/cache_tools.py

This file was deleted.

Loading
Loading