Skip to content

Commit

Permalink
reorder __init__ to fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Jul 25, 2023
1 parent 3b253ae commit 7001086
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions hydromt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,9 @@
# Set environment variables (this will be temporary)
# to use shapely 2.0 in favor of pygeos (if installed)
import os

os.environ["USE_PYGEOS"] = "0"

# pkg_resource deprication warnings originate from dependencies
# so silence them for now
import warnings

warnings.filterwarnings("ignore", category=DeprecationWarning)


# required for accessor style documentation
from subprocess import run

from xarray import DataArray, Dataset

# submodules
from . import cli, flw, raster, stats, vector, workflows
from .data_catalog import *
from .io import *

# high-level methods
from .models import *
os.environ["USE_PYGEOS"] = "0"


def _run_clean(s: str) -> str:
Expand All @@ -52,3 +33,21 @@ def _run_clean(s: str) -> str:
__version__ = f"{base_version}.dev{num_commits_since_release}"
except Exception:
__version__ = base_version

# pkg_resource deprication warnings originate from dependencies
# so silence them for now
import warnings

warnings.filterwarnings("ignore", category=DeprecationWarning)


# required for accessor style documentation
from xarray import DataArray, Dataset

# submodules
from . import cli, flw, raster, stats, vector, workflows
from .data_catalog import *
from .io import *

# high-level methods
from .models import *

0 comments on commit 7001086

Please sign in to comment.