forked from atmtools/arts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up pyarts startup when all you need is XYZ
- Loading branch information
1 parent
b8e91c5
commit ff8c427
Showing
1 changed file
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
# -*- coding: utf-8 -*- | ||
"""This module contains functions to interact with ARTS.""" | ||
|
||
from pyarts import xml # noqa | ||
from pyarts import arts # noqa | ||
from pyarts import data # noqa | ||
from pyarts import plots # noqa | ||
from pyarts import workspace # noqa | ||
from pyarts import hitran # noqa | ||
from pyarts import fields # noqa | ||
from pyarts import recipe # noqa | ||
from pyarts.workspace import Workspace, arts_agenda # noqa | ||
from pyarts.workspace.callback import callback_operator # noqa | ||
|
||
def __getattr__(attr): | ||
if attr == "xml": | ||
import pyarts.xml as xml | ||
return xml | ||
elif attr == "data": | ||
import pyarts.data as data | ||
return data | ||
elif attr == "plots": | ||
import pyarts.plots as plots | ||
return plots | ||
elif attr == "workspace": | ||
import pyarts.workspace as workspace | ||
return workspace | ||
elif attr == "hitran": | ||
import pyarts.hitran as hitran | ||
return hitran | ||
elif attr == "fields": | ||
import pyarts.fields as fields | ||
return fields | ||
elif attr == "recipe": | ||
import pyarts.recipe as recipe | ||
return recipe | ||
|
||
raise AttributeError("module {!r} has no attribute " | ||
"{!r}".format(__name__, attr)) | ||
|
||
__all__ = [s for s in dir() if not s.startswith("_")] | ||
__version__ = "@ARTS_VERSION@" | ||
version = __version__ |