Skip to content

Commit

Permalink
H vs h updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarlet committed Aug 7, 2024
1 parent 2963f62 commit ed23591
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/_build/html/_sources/user_guide/defaults.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The default is
return_as = "xarray"
[nearesttime]
within = "1H"
within = "1h"
return_as = "xarray"
The ``[default]`` section are global settings used by each download method. These can be overwritten for each method. For instance, *s3_refresh* is set to false for ``[timerange]`` because it's unlikely you will need to refresh the file listing. Also, ``[latest]`` and ``[nearesttime]`` are by default returned as an xarray object instead of a list of files downloaded.
Expand Down
3 changes: 0 additions & 3 deletions goes2go/NEW.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
==========
"""

import itertools
import logging
import re
from pathlib import Path

import numpy as np
import pandas as pd
import s3fs
import toml

from goes2go import config
from goes2go.data import _goes_file_df, goes_latest, goes_nearesttime, goes_timerange, goes_single_point_timerange
Expand Down
8 changes: 4 additions & 4 deletions goes2go/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# TODO: Move some of the tools.py to these accessors.
try:
import goes2go.accessors
except:
except Exception:
warnings.warn("goes2go xarray accessors could not be imported.")


Expand Down Expand Up @@ -80,7 +80,7 @@ def _expand(self):
return_as = "xarray"
["nearesttime"]
within = "1H"
within = "1h"
return_as = "xarray"
"""

Expand All @@ -89,7 +89,7 @@ def _expand(self):
try:
# Load the goes2go config file
config = toml.load(_config_file)
except:
except Exception:
try:
# Create the goes2go config file
_config_path.mkdir(parents=True, exist_ok=True)
Expand All @@ -106,7 +106,7 @@ def _expand(self):

# Load the new goes2go config file
config = toml.load(_config_file)
except (FileNotFoundError, PermissionError, IOError):
except (OSError, FileNotFoundError, PermissionError):
print(
f" ╭─goes2go─────────────────────────────────────────────╮\n"
f" │ WARNING: Unable to create config file │\n"
Expand Down
4 changes: 2 additions & 2 deletions goes2go/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def goes_timerange(
start = pd.to_datetime(start)
if isinstance(end, str):
end = pd.to_datetime(end)
# If `recent` is a string (like recent='1H'), parse with Pandas
# If `recent` is a string (like recent='1h'), parse with Pandas
if isinstance(recent, str):
recent = pd.to_timedelta(recent)

Expand Down Expand Up @@ -520,7 +520,7 @@ def goes_single_point_timerange(
start = pd.to_datetime(start)
if isinstance(end, str):
end = pd.to_datetime(end)
# If `recent` is a string (like recent='1H'), parse with Pandas
# If `recent` is a string (like recent='1h'), parse with Pandas
if isinstance(recent, str):
recent = pd.to_timedelta(recent)

Expand Down
6 changes: 2 additions & 4 deletions tests/test_abi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## Brian Blaylock
## October 18, 2021

"""
Some simple tests for the ABI data
"""
"""Some simple tests for the ABI data."""

from goes2go.data import goes_nearesttime, goes_latest, goes_timerange
from goes2go.data import goes_nearesttime, goes_latest


def test_nearesttime():
Expand Down
6 changes: 2 additions & 4 deletions tests/test_glm.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## Brian Blaylock
## October 18, 2021

"""
Some simple tests for the GLM data
"""
"""Some simple tests for the GLM data."""

from goes2go.data import goes_latest, goes_nearesttime, goes_timerange
from goes2go.data import goes_latest, goes_nearesttime


def test_nearesttime():
Expand Down

0 comments on commit ed23591

Please sign in to comment.