Skip to content

Commit fec2f73

Browse files
Imanimanshafiei540
Iman
authored andcommitted
Local PoC sync via Copybara - 082fa1a4f29cb050ee4ea53c88c06075cad3f26a Fix runner selection logic for lint job based on reposito... by Iman Shafiei <[email protected]>
- 5be4aaa4d335f5892ec6a0e8af923f5b4e875590 Add pull_request trigger to workflows for better CI integ... by Iman Shafiei <[email protected]> - 6522b429410df79b2c6acf02fc842dbc4f8f2427 Fix virtualenv activation command in Copybara sync workflow by Iman Shafiei <[email protected]> - 1822e48ca9b79a2f57a73d16e4554e5c87f99d89 Refactor secret scanning workflow to clone repository man... by Iman Shafiei <[email protected]> - 73a6795b16bcf2f74c0269a1577cdce695e00747 Refactor secret scanning workflow to use Alpine image and... by Iman Shafiei <[email protected]> - 3b0e46719f0810c291cb8e336314d52bd2847879 Add step to install jq in secret scanning workflow by Iman Shafiei <[email protected]> - bd142eae532db672b6e061ed3d97a55f3c886129 Add configuration for Git safe directory in secret scanni... by Iman Shafiei <[email protected]> - ab8515a7030c0fb9aea7eb0b34ef4a168ddfe9d9 Add configuration for Git safe directory in secret scanni... by Iman Shafiei <[email protected]> - 4cc3959122cc10b7d01529813e654e1a9fa1a575 Refactor secret scanning workflow to use TruffleHog Docke... by Iman Shafiei <[email protected]> - feaa54f1ce823560a2f8ce7c611dc99b107b35fb Update secret scanning workflow to install additional dep... by Iman Shafiei <[email protected]> - d770a696c4a6c94f9935ab947bc35d73caa19a3d Update secret scanning workflow to use Docker stable imag... by Iman Shafiei <[email protected]> - 30c5bdc77bba8a0395941f20275ad5abeb71293d Update secret scanning workflow to install additional dep... by Iman Shafiei <[email protected]> - e38fab2d223599461f7deb7a247d6b4ae590d228 Add configuration for Git safe directory in secret scanni... by Iman Shafiei <[email protected]> - c1f13aaeb118143d22d54268c9a363941323a4a9 Add git installation step to secret scanning workflow by Iman Shafiei <[email protected]> - c20fcc1b8adea1cc67ff7bc6691ad7a80c864250 Add container configuration with Ubuntu image to CI workf... by Iman Shafiei <[email protected]> - 2c0b4062c69e6bd71beca6632670b0f77d05611e format with ruff 0.11.0 by Iman Shafiei <[email protected]> - b5efc402a65bdac855632248c4fddf23ca16d4ca Refactor CI test jobs to use a matrix strategy for Python... by Iman Shafiei <[email protected]> - 3485721d1cb2b8d3eb57e9b962125e5cc1abef1a Refactor linting workflow to consolidate Python version h... by Iman Shafiei <[email protected]> - 88fa81508552f3658534fb96850a80b6ded31b92 Add CI workflows for linting and testing with Python vers... by Iman Shafiei <[email protected]> - ba318c0b5667f9585ec50045f3ea5f9254f8f0a9 Update CI workflows to use ed-runner-set for consistency ... by Iman Shafiei <[email protected]> - 5effcd5b81839d7f68783d2a1ce65144cfa8e5b8 Update CI workflows and BulkInsert/BulkSearch services fo... by Iman Shafiei <[email protected]> - ea78f2c91cb69f3b55d8125a7b17b5f157b4bfa7 Add InternalService and bulk operations support to EDSCli... by Iman Shafiei <[email protected]> - bfe7972f2b1df36143c609736e5ff952ff149403 Comment out CodeQL workflow configuration in codeql.yml by Iman Shafiei <[email protected]> - 0e46cd33ede3f3f1a8b8ad059a64069cf1ab6aa4 Beta/add pyjwt dependency and implement GitHub token gene... by Iman Shafiei <[email protected]> - a9174ac2cf3c1455019f98efba2dfb355980ede8 Merge remote-tracking branch 'public-repo/beta/1.x' by Iman Shafiei <[email protected]> - dbdaa9c820ec7245f5964ead6ce985803157e92a Initial commit by edawader <[email protected]> GitOrigin-RevId: 082fa1a4f29cb050ee4ea53c88c06075cad3f26a
1 parent 4721d15 commit fec2f73

File tree

9 files changed

+149
-89
lines changed

9 files changed

+149
-89
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
- main
77
- beta/*
88
pull_request:
9-
branches:
10-
- main
11-
- beta/*
9+
workflow_dispatch:
1210
schedule:
1311
- cron: '31 17 * * 5'
1412

1513
jobs:
1614
analyze:
15+
if: ${{ !github.event.repository.private }} # Only run on public repos
16+
1717
name: Analyze (${{ matrix.language }})
1818
runs-on: 'ubuntu-latest'
1919
permissions:

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint, Format and Type Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta/*
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
lint:
13+
runs-on: ${{ github.repository_visibility == 'private' && 'ed-runner-set' || 'ubuntu-latest' }}
14+
strategy:
15+
matrix:
16+
python-version: ["3.10", "3.11", "3.12", "3.13"]
17+
container:
18+
image: python:${{ matrix.python-version }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install system dependencies
24+
run: |
25+
apt-get update
26+
apt-get install -y gdal-bin libgdal-dev
27+
28+
- name: Install Poetry
29+
run: pip install poetry
30+
31+
- name: Install test dependencies
32+
run: poetry install --only tests
33+
34+
- name: Run Linting
35+
run: poetry run tox -e lint
36+
37+
- name: Run Formatting Check
38+
run: poetry run tox -e format

.github/workflows/publish_pypi_on_tag.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ on:
88
jobs:
99
pypi-publish:
1010
name: Upload release to PyPI
11-
runs-on: ubuntu-latest
11+
runs-on: [ed-runner-set]
12+
container:
13+
image: ubuntu:latest
1214
environment:
1315
name: pypi
1416
url: https://pypi.org/p/earthdaily
@@ -19,7 +21,7 @@ jobs:
1921
- uses: actions/checkout@v4
2022
- uses: actions/setup-python@v5
2123
with:
22-
python-version: "3.12"
24+
python-version: "3.13"
2325

2426
- name: Install Poetry
2527
run: pip install poetry

.github/workflows/secret-scanning.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
name: "Secret Scanning"
1+
name: Secret Scanning
22

33
on:
44
push:
55
branches:
66
- main
77
- beta/*
88
pull_request:
9-
branches:
10-
- main
11-
- beta/*
129
workflow_dispatch:
1310

1411
jobs:
15-
secret-scan:
16-
name: Scan for Secrets
17-
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
20-
security-events: write
12+
security-secrets:
13+
name: TruffleHog Secret Scan
14+
runs-on: [ed-runner-set]
15+
container:
16+
image: alpine:latest
2117
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
18+
- name: Install Git and dependencies
19+
run: |
20+
apk add --no-cache git curl jq
21+
22+
- name: Clone the repository manually
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: |
26+
git clone https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git repo
27+
cd repo
28+
29+
# install TruffleHog
30+
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin
2431
25-
- name: Run TruffleHog OSS
26-
uses: trufflesecurity/trufflehog@v3.88.17
32+
# run TruffleHog scan
33+
trufflehog filesystem "." --results=verified,unknown --fail --json | jq

.github/workflows/test.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: earthdaily-python-client CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta/*
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
name: Unit Tests (Python ${{ matrix.python-version }})
14+
runs-on: [ed-runner-set]
15+
strategy:
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
18+
include:
19+
- python-version: "3.10"
20+
tox_env: py310
21+
- python-version: "3.11"
22+
tox_env: py311
23+
- python-version: "3.12"
24+
tox_env: py312
25+
- python-version: "3.13"
26+
tox_env: py313
27+
container:
28+
image: python:${{ matrix.python-version }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Install GDAL and dependencies
34+
run: |
35+
apt-get update
36+
apt-get install -y gdal-bin libgdal-dev
37+
38+
- name: Install Poetry
39+
run: pip install poetry
40+
41+
- name: Install test dependencies
42+
run: poetry install --only tests
43+
44+
- name: Run tests with tox
45+
run: poetry run tox -e ${{ matrix.tox_env }}

earthdaily/_eds_client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from earthdaily._api_requester import APIRequester
22
from earthdaily._auth_client import Authentication
33
from earthdaily._eds_config import EDSConfig
4+
from earthdaily.internal import InternalService
45
from earthdaily.legacy import EarthDataStore
56
from earthdaily.platform import PlatformService
67

@@ -78,3 +79,17 @@ def legacy(self):
7879
if not hasattr(self, "_legacy_service"):
7980
self._legacy_service = EarthDataStore(self.api_requester)
8081
return self._legacy_service
82+
83+
@property
84+
def internal(self):
85+
"""
86+
Lazily initializes and returns the InternalService for interacting with internal API endpoints.
87+
88+
Returns:
89+
-------
90+
InternalService:
91+
The service that interacts with internal API operations.
92+
"""
93+
if not hasattr(self, "_internal_service"):
94+
self._internal_service = InternalService(self.api_requester)
95+
return self._internal_service

poetry.lock

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ sphinx-copybutton = "^0.5.2"
5656
sphinx-automodapi = "^0.18.0"
5757
sphinx-multiversion = "^0.2.4"
5858

59+
60+
[tool.poetry.group.dev.dependencies]
61+
pyjwt = "^2.10.1"
62+
5963
[build-system]
6064
requires = ["poetry-core"]
6165
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)