Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b261236
added ogc endpoints
grallewellyn Jul 29, 2025
6c60c72
added string casting and changed to list_processes wording
grallewellyn Jul 29, 2025
591d757
fixed typo jobs_ogc
grallewellyn Jul 30, 2025
4eec87b
added tests and updated testing instructions
grallewellyn Jul 30, 2025
2625e7c
edited changelog
grallewellyn Jul 30, 2025
664376b
camelcase and removed _ogc from naming conventions
grallewellyn Aug 21, 2025
77b88f7
Updated changelog and tests, tests are not very helpful but api is al…
grallewellyn Aug 21, 2025
d59f540
corrected list jobs function
grallewellyn Sep 24, 2025
d529a2b
commented out register_algorithm_from_cwl_file because its functional…
grallewellyn Oct 6, 2025
c5977d9
added functions for registering an algorithm from a cwl file
grallewellyn Nov 12, 2025
1cb8ca5
merged develop branch
grallewellyn Dec 31, 2025
dd66f0c
Merge branch 'develop' into add-ogc-endpoints
grallewellyn Jan 8, 2026
462b4dc
converted more function names to snakecase
grallewellyn Jan 8, 2026
75b6cf0
initial attempt to register alg from cwl file
grallewellyn Jan 13, 2026
890dc97
cwl_text is now a string
grallewellyn Jan 13, 2026
2a7c749
pass cwl as raw text to API
grallewellyn Jan 13, 2026
48b69d3
deleted unnecessary code and print statements
grallewellyn Jan 15, 2026
4762c16
deleted unnecessary packages and imports
grallewellyn Jan 15, 2026
5d23fa3
added replace algorithm from cwl function
grallewellyn Jan 15, 2026
24584ed
Merge pull request #121 from MAAP-Project/register-alg-cwl-file
grallewellyn Jan 15, 2026
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
(post 4.2.0 release)
### Added
- Support for new OGC endpoints
### Changed
### Deprecated
### Removed
- Removed functions calling old WPST endpoints
### Fixed
### Security

## [4.2.0]
### Added
### Changed
- listJobs no longer takes username as an argument, you can only list jobs for the current `MAAP_PGT` token user
- submitJob gets the username from the `MAAP_PGT` token and not username being submitted as an argument
- submit_job gets the username from the `MAAP_PGT` token and not username being submitted as an argument
### Deprecated
### Removed
### Fixed
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ python
>>> from maap.maap import MAAP
>>> maap = MAAP()

>>> granules = maap.searchGranule(sitename='lope', instrument='uavsar')
>>> granules = maap.search_granule(sitename='lope', instrument='uavsar')
>>> for res in granules:
print(res.getDownloadUrl())
res.download()
Expand Down Expand Up @@ -64,17 +64,19 @@ where:
With named attribute parameters, this query:

```python
lidarGranule = maap.searchGranule(instrument='lvis', attribute='string,Site Name,lope')
lidarGranule = maap.search_granule(instrument='lvis', attribute='string,Site Name,lope')
```

Simplifies to:

```python
lidarGranule = maap.searchGranule(instrument='lvis', site_name='lope')
lidarGranule = maap.search_granule(instrument='lvis', site_name='lope')
```

## Test

```bash
python setup.py test
poetry install
poetry run pytest --cov=maap
poetry run pytest test/specific_test.py
```
2 changes: 1 addition & 1 deletion docs/api/dps.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ from maap.maap import MAAP
maap = MAAP()

# Submit a job
job = maap.submitJob(
job = maap.submit_job(
identifier='my_analysis',
algo_id='my_algorithm',
version='main',
Expand Down
6 changes: 3 additions & 3 deletions docs/api/maap.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ from maap.maap import MAAP
maap = MAAP()

# Search granules
granules = maap.searchGranule(short_name='GEDI02_A', limit=10)
granules = maap.search_granule(short_name='GEDI02_A', limit=10)

# Search collections
collections = maap.searchCollection(provider='MAAP')
collections = maap.search_collection(provider='MAAP')

# Submit a job
job = maap.submitJob(
job = maap.submit_job(
identifier='analysis',
algo_id='my_algo',
version='main',
Expand Down
2 changes: 1 addition & 1 deletion docs/api/result.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ from maap.maap import MAAP
maap = MAAP()

# Search granules
granules = maap.searchGranule(short_name='GEDI02_A', limit=5)
granules = maap.search_granule(short_name='GEDI02_A', limit=5)

for granule in granules:
# Get URLs
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from maap.maap import MAAP
maap = MAAP()

# Search for granules
granules = maap.searchGranule(
granules = maap.search_granule(
short_name='GEDI02_A',
bounding_box='-122.5,37.5,-121.5,38.5',
limit=10
Expand All @@ -42,7 +42,7 @@ for granule in granules:
print(f"Downloaded: {local_path}")

# Submit a job
job = maap.submitJob(
job = maap.submit_job(
identifier='my_analysis',
algo_id='my_algorithm',
version='main',
Expand Down
4 changes: 2 additions & 2 deletions examples/BrowseExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
}
],
"source": [
"granule = maap.searchGranule(granule_ur='uavsar_AfriSAR_v1_SLC-lopenp_14043_16015_001_160308_L090.vrt')[0]\n",
"granule = maap.search_granule(granule_ur='uavsar_AfriSAR_v1_SLC-lopenp_14043_16015_001_160308_L090.vrt')[0]\n",
"maap.show(granule)"
]
},
Expand Down Expand Up @@ -747,7 +747,7 @@
}
],
"source": [
"granule = maap.searchGranule(granule_ur='ILVIS2_GA2016_0220_R1611_038024')[0]\n",
"granule = maap.search_granule(granule_ur='ILVIS2_GA2016_0220_R1611_038024')[0]\n",
"maap.show(granule)"
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Search Collection - Basics-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"metadata": {},
"outputs": [],
"source": [
"results = maap.searchCollection(keyword='precipitation')"
"results = maap.search_collection(keyword='precipitation')"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Search Granule-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}
],
"source": [
"results = maap.searchCollection(keyword='land',data_center='modaps')\n",
"results = maap.search_collection(keyword='land',data_center='modaps')\n",
"print(len(results))\n",
"\n",
"for res in results:\n",
Expand Down Expand Up @@ -159,7 +159,7 @@
}
],
"source": [
"results = maap.searchGranule(limit=10,short_name=\"MOD11A1\")\n",
"results = maap.search_granule(limit=10,short_name=\"MOD11A1\")\n",
"\n",
"print(len(results))\n",
"for res in results:\n",
Expand Down
2 changes: 1 addition & 1 deletion maap/AWS.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def workspace_bucket_credentials(self):
See Also
--------
:meth:`requester_pays_credentials` : For accessing external data
:meth:`maap.maap.MAAP.uploadFiles` : Upload files to shared storage
:meth:`maap.maap.MAAP.upload_files` : Upload files to shared storage
"""
headers = self._api_header
headers["Accept"] = "application/json"
Expand Down
2 changes: 1 addition & 1 deletion maap/Profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def account_info(self, proxy_ticket=None):

Notes
-----
This method is used internally by :meth:`~maap.maap.MAAP.submitJob`
This method is used internally by :meth:`~maap.maap.MAAP.submit_job`
to automatically include the username with job submissions.

See Also
Expand Down
10 changes: 5 additions & 5 deletions maap/Result.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from maap.maap import MAAP

maap = MAAP()
granules = maap.searchGranule(short_name='GEDI02_A', limit=5)
granules = maap.search_granule(short_name='GEDI02_A', limit=5)

for granule in granules:
# Get download URLs
Expand Down Expand Up @@ -439,7 +439,7 @@ class Collection(Result):
--------
Search for collections::

>>> collections = maap.searchCollection(short_name='GEDI02_A')
>>> collections = maap.search_collection(short_name='GEDI02_A')
>>> for c in collections:
... print(c['Collection']['ShortName'])
... print(c['Collection']['Description'])
Expand All @@ -458,7 +458,7 @@ class Collection(Result):
See Also
--------
:class:`Granule` : Individual data file results
:meth:`maap.maap.MAAP.searchCollection` : Search for collections
:meth:`maap.maap.MAAP.search_collection` : Search for collections
"""

def __init__(self, metaResult, maap_host):
Expand Down Expand Up @@ -512,7 +512,7 @@ class Granule(Result):
--------
Search and access granule metadata::

>>> granules = maap.searchGranule(short_name='GEDI02_A', limit=5)
>>> granules = maap.search_granule(short_name='GEDI02_A', limit=5)
>>> granule = granules[0]
>>> print(granule['Granule']['GranuleUR'])

Expand Down Expand Up @@ -540,7 +540,7 @@ class Granule(Result):
See Also
--------
:class:`Collection` : Dataset metadata results
:meth:`maap.maap.MAAP.searchGranule` : Search for granules
:meth:`maap.maap.MAAP.search_granule` : Search for granules
"""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions maap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
maap = MAAP()

# Search for granules
granules = maap.searchGranule(
granules = maap.search_granule(
short_name='GEDI02_A',
limit=10
)
Expand All @@ -34,7 +34,7 @@
local_path = granule.getData(destpath='/tmp')

# Submit a job
job = maap.submitJob(
job = maap.submit_job(
identifier='my_job',
algo_id='my_algorithm',
version='main',
Expand Down
3 changes: 3 additions & 0 deletions maap/config_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ def __init__(self, maap_host):
self.algorithm_build = self._get_api_endpoint("algorithm_build")
self.mas_algo = self._get_api_endpoint("mas_algo")
self.dps_job = self._get_api_endpoint("dps_job")
self.processes_ogc = self._get_api_endpoint("processes_ogc")
self.deployment_jobs_ogc = self._get_api_endpoint("deployment_jobs_ogc")
self.jobs_ogc = self._get_api_endpoint("jobs_ogc")
self.member_dps_token = self._get_api_endpoint("member_dps_token")
self.requester_pays = self._get_api_endpoint("requester_pays")
self.edc_credentials = self._get_api_endpoint("edc_credentials")
Expand Down
14 changes: 7 additions & 7 deletions maap/dps/dps_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
maap = MAAP()

# Submit a job
job = maap.submitJob(
job = maap.submit_job(
identifier='my_analysis',
algo_id='my_algorithm',
version='main',
Expand All @@ -38,8 +38,8 @@

See Also
--------
:meth:`maap.maap.MAAP.submitJob` : Submit a new job
:meth:`maap.maap.MAAP.getJob` : Retrieve an existing job
:meth:`maap.maap.MAAP.submit_job` : Submit a new job
:meth:`maap.maap.MAAP.get_job` : Retrieve an existing job
"""

import json
Expand Down Expand Up @@ -131,12 +131,12 @@ class DPSJob:
--------
Get job status::

>>> job = maap.getJob('f3780917-92c0-4440-8a84-9b28c2e64fa8')
>>> job = maap.get_job('f3780917-92c0-4440-8a84-9b28c2e64fa8')
>>> print(f"Status: {job.status}")

Wait for completion::

>>> job = maap.submitJob(...)
>>> job = maap.submit_job(...)
>>> job.wait_for_completion()
>>> print(f"Final status: {job.status}")

Expand All @@ -159,7 +159,7 @@ class DPSJob:

See Also
--------
:meth:`maap.maap.MAAP.submitJob` : Submit new jobs
:meth:`maap.maap.MAAP.submit_job` : Submit new jobs
:meth:`maap.maap.MAAP.listJobs` : List all jobs
"""

Expand Down Expand Up @@ -243,7 +243,7 @@ def wait_for_completion(self):
--------
::

>>> job = maap.submitJob(...)
>>> job = maap.submit_job(...)
>>> job.wait_for_completion()
>>> if job.status == 'Succeeded':
... print("Job completed successfully!")
Expand Down
Loading