Skip to content

Commit

Permalink
refactor: rename project from EarthDataStore to EarthDaily and update…
Browse files Browse the repository at this point in the history
… references throughout the codebase
  • Loading branch information
imanshafiei540 committed Feb 11, 2025
1 parent 25bfd66 commit 4b663a4
Show file tree
Hide file tree
Showing 45 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ cython_debug/
# asv environments
.asv

# EarthDataStore
# EarthDaily
examples/
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to EarthDataStore
# Contributing to EarthDaily Python Client

This document will guide you through the steps required to set up your development environment, develop, test, and contribute to the project.

Expand All @@ -15,7 +15,7 @@ Ensure you have the following installed on your machine:
1. **Clone the repository**:
```bash
git clone [email protected]:earthdaily/earthdaily-python-client.git
cd earthdatastore
cd earthdaily-python-client
```

2. **Install dependencies using Poetry**:
Expand Down Expand Up @@ -129,4 +129,4 @@ If you encounter any bugs or have feature requests, please create an issue in ou

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Thank you for contributing to EarthDataStore Python Client!
Thank you for contributing to EarthDaily Python Client!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Earth Data Store (EDS) Client is a Python library for interacting with the E
You can install the EDS Client using pip:

```bash
pip install earthdatastore
pip install earthdaily
```

## Environment Variables
Expand Down
25 changes: 25 additions & 0 deletions earthdaily/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Authentication-related imports
from earthdaily._api_requester import APIRequester
from earthdaily._auth_client import Authentication, CognitoAuth

# Client and config-related imports
from earthdaily._eds_client import EDSClient
from earthdaily._eds_config import EDSConfig

# HTTP-related imports
from earthdaily._http_client import HTTPClient, HTTPRequest, HTTPResponse

# Platform-related imports
from earthdaily.platform import PlatformService

__all__ = [
"Authentication",
"CognitoAuth",
"APIRequester",
"HTTPClient",
"HTTPRequest",
"HTTPResponse",
"EDSClient",
"EDSConfig",
"PlatformService",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from earthdatastore._auth_client import Authentication
from earthdatastore._http_client import HTTPClient, HTTPRequest, HTTPResponse
from earthdaily._auth_client import Authentication
from earthdaily._http_client import HTTPClient, HTTPRequest, HTTPResponse


class APIRequester:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions earthdatastore/_downloader.py → earthdaily/_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from requests.exceptions import ConnectionError, HTTPError, RequestException, Timeout
from tqdm import tqdm

from earthdatastore._eds_logging import LoggerConfig
from earthdatastore.exceptions import UnsupportedAssetException
from earthdaily._eds_logging import LoggerConfig
from earthdaily.exceptions import UnsupportedAssetException

logger = LoggerConfig(logger_name=__name__).get_logger()

Expand Down
10 changes: 5 additions & 5 deletions earthdatastore/_eds_client.py → earthdaily/_eds_client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from earthdatastore._api_requester import APIRequester
from earthdatastore._auth_client import Authentication, CognitoAuth
from earthdatastore._eds_config import EDSConfig
from earthdatastore.agriculture import EarthDataStore
from earthdatastore.platform import PlatformService
from earthdaily._api_requester import APIRequester
from earthdaily._auth_client import Authentication, CognitoAuth
from earthdaily._eds_config import EDSConfig
from earthdaily.agriculture import EarthDataStore
from earthdaily.platform import PlatformService


class EDSClient:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions earthdatastore/_uploader.py → earthdaily/_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from requests.exceptions import RequestException
from tqdm import tqdm

from earthdatastore._eds_logging import LoggerConfig
from earthdatastore.exceptions import UnsupportedAssetException
from earthdaily._eds_logging import LoggerConfig
from earthdaily.exceptions import UnsupportedAssetException

logger = LoggerConfig(logger_name=__name__).get_logger()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import xarray as xr
from rasterio.features import geometry_mask

from earthdatastore.agriculture.earthdatastore.cube_utils import _bbox_to_intersects
from earthdaily.agriculture.earthdatastore.cube_utils import _bbox_to_intersects

dask.config.set(**{"array.slicing.split_large_chunks": True})

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pystac_client import Client
from pystac_client.stac_api_io import StacApiIO

from earthdatastore._api_requester import APIRequester
from earthdaily._api_requester import APIRequester


class PlatformService:
Expand Down
File renamed without changes.
25 changes: 0 additions & 25 deletions earthdatastore/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "earthdatastore"
name = "earthdaily"
version = "1.0.0b1"
description = "EarthDaily Python Client"
authors = ["EarthDaily <[email protected]>"]
Expand Down Expand Up @@ -53,5 +53,5 @@ lint.ignore = []
line-length = 120

[tool.pytest.ini_options]
addopts = "--cov=earthdatastore --cov-report=term-missing"
addopts = "--cov=earthdaily --cov-report=term-missing"
testpaths = ["tests"]
6 changes: 3 additions & 3 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import unittest
from unittest.mock import Mock, patch

from earthdatastore._auth_client import CognitoAuth
from earthdaily._auth_client import CognitoAuth


class TestCognitoAuth(unittest.TestCase):
def setUp(self):
self.auth = CognitoAuth("client_id", "client_secret", "token_url")

@patch("earthdatastore._auth_client.requests.Session.post")
@patch("earthdaily._auth_client.requests.Session.post")
def test_authenticate_success(self, mock_post):
# Prepare mock response
mock_response = Mock()
Expand All @@ -21,7 +21,7 @@ def test_authenticate_success(self, mock_post):
self.assertEqual(token, "test_token")
mock_post.assert_called_once()

@patch("earthdatastore._auth_client.requests.Session.post")
@patch("earthdaily._auth_client.requests.Session.post")
def test_authenticate_failure(self, mock_post):
# Prepare mock response
mock_response = Mock()
Expand Down
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import unittest
from unittest.mock import patch

from earthdatastore._auth_client import CognitoAuth
from earthdatastore._eds_client import EDSClient
from earthdatastore._eds_config import EDSConfig
from earthdaily._auth_client import CognitoAuth
from earthdaily._eds_client import EDSClient
from earthdaily._eds_config import EDSConfig


class TestEDSClient(unittest.TestCase):
@patch("earthdatastore._auth_client.CognitoAuth.get_token", return_value="test_token")
@patch("earthdaily._auth_client.CognitoAuth.get_token", return_value="test_token")
def test_create_auth_cognito(self, mock_auth):
config = EDSConfig(
auth_method="cognito",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import unittest

from earthdatastore import EDSConfig
from earthdaily import EDSConfig


class TestEDSConfig(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_http.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import unittest
from unittest.mock import Mock, patch

from earthdatastore._http_client import HTTPClient, HTTPRequest
from earthdaily._http_client import HTTPClient, HTTPRequest


class TestHTTPClient(unittest.TestCase):
def setUp(self):
self.client = HTTPClient()

@patch("earthdatastore._http_client.requests.request")
@patch("earthdaily._http_client.requests.request")
def test_send_success(self, mock_request):
# Prepare mock response
mock_response = Mock()
Expand All @@ -32,7 +32,7 @@ def test_send_success(self, mock_request):
self.assertEqual(response.body, {"result": "success"})
self.assertEqual(response.headers, {"Content-Type": "application/json"})

@patch("earthdatastore._http_client.requests.request")
@patch("earthdaily._http_client.requests.request")
def test_send_failure(self, mock_request):
# Prepare mock response
mock_response = Mock()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import requests

from earthdatastore._uploader import HttpUploader
from earthdatastore.exceptions import UnsupportedAssetException
from earthdaily._uploader import HttpUploader
from earthdaily.exceptions import UnsupportedAssetException


class TestHttpUploader(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_zipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import zipfile
from pathlib import Path

from earthdatastore._zipper import Zipper
from earthdaily._zipper import Zipper


class TestZipper(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ commands = ruff format . --diff
[testenv:mypy]
description = Run mypy for type checking
deps = mypy
commands = mypy --install-types --non-interactive earthdatastore
commands = mypy --install-types --non-interactive earthdaily

[testenv:coverage]
deps =
pytest
pytest-cov
commands =
pytest --cov=earthdatastore --cov-report=xml
pytest --cov=earthdaily --cov-report=xml

[gh-actions]
python =
Expand Down

0 comments on commit 4b663a4

Please sign in to comment.