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
12 changes: 10 additions & 2 deletions HydroEO/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ def fetch_swot_raster(
startdate = _parse_date(start, "--start")
enddate = _parse_date(end, "--end")
u, p = _resolve_earthaccess_creds(username, password)
if u:
os.environ["EARTHDATA_USERNAME"] = u
if p:
os.environ["EARTHDATA_PASSWORD"] = p

config = {
"aoi": {
Expand All @@ -296,7 +300,7 @@ def fetch_swot_raster(

from HydroEO.satellites.swot.raster import download_raster

download_raster(config=config, project_dir=output, credentials=(u, p))
download_raster(config=config, project_dir=output)
typer.echo(f"SWOT raster download complete. Output: {output}")


Expand Down Expand Up @@ -363,6 +367,10 @@ def fetch_swot_pixc(
startdate = _parse_date(start, "--start")
enddate = _parse_date(end, "--end")
u, p = _resolve_earthaccess_creds(username, password)
if u:
os.environ["EARTHDATA_USERNAME"] = u
if p:
os.environ["EARTHDATA_PASSWORD"] = p

# Parse optional classes and fields
classes_list = (
Expand All @@ -389,7 +397,7 @@ def fetch_swot_pixc(

from HydroEO.satellites.swot.pixc import download_pixc

download_pixc(config=config, project_dir=output, credentials=(u, p))
download_pixc(config=config, project_dir=output)
typer.echo(f"SWOT pixel cloud download complete. Output: {output}")


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exclude = ["notebooks", "tests", "images"]
[project]
# name on PyPI (e.g. pip install HydroEO)
name = "HydroEO"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"earthaccess>=0.9.0,<2.0",
"h5netcdf>=1.3.0,<2.0",
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading