MAAP
Discover and use biomass relevant data, integrating the data for comparison, analysis, evaluation, and generation.
https://github.com/MAAP-Project/maap-api-nasa
Category: Biosphere
Sub Category: Biomass
Keywords from Contributors
stac open-science
Last synced: about 19 hours ago
JSON representation
Repository metadata
NASA Python implementation of the MAAP API specification
- Host: GitHub
- URL: https://github.com/MAAP-Project/maap-api-nasa
- Owner: MAAP-Project
- License: apache-2.0
- Created: 2018-09-12T22:13:57.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T00:23:12.000Z (11 days ago)
- Last Synced: 2025-04-17T22:44:30.681Z (10 days ago)
- Language: Python
- Homepage: https://api.maap-project.org/api
- Size: 1.53 MB
- Stars: 9
- Watchers: 6
- Forks: 3
- Open Issues: 11
- Releases: 40
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
README.md
NASA MAAP API
The joint ESA-NASA Multi-Mission Algorithm and Analysis Platform (MAAP) focuses on developing a collaborative data system enabling collocated data, processing, and analysis tools for NASA and ESA datasets. The NASA MAAP API adheres to the joint ESA-NASA MAAP API specification currently in development. This joint architectural approach enables NASA and ESA to each run independent MAAPs, while ultimately sharing common facilities to share and integrate collocated platform services.
Development server: https://api.dit.maap-project.org/api
I. Local development using docker
cd docker
docker-compose -f docker-compose-local.yml up
II. Local development using poetry and virtualenv
Prerequisites:
- poetry
- postgresql
- Linux:
sudo apt-get install postgresql python-psycopy2 libpq-dev
- Mac OSx:
brew install postgresql
- Linux:
- python3.9+
cd maap-api-nasa
poetry install
First run: Configure the database.
-
Add a new user called
maapuser
(A fix for 'role does not exist')NOTE: You may need to use
sudo -u postgres
before postgres commands.createuser maapuser
-
Create an empty postgres db (maap) (a fix for 'database maap does not exist'):
createdatabase maap
-
OPTIONAL: PyCharm configuration, if using the PyCharm IDE:
- Script path:
./api/maapapp.py
- Environment variables:
PYTHONUNBUFFERED=1
- Python interpreter:
Python 3.9
- Working directory:
./api
(Obsolete?) Config Titiler endpoint and maap-api-host
In the settings.py (i.e., maap-api-nasa/api/settings.py):
# settings.py
API_HOST_URL = 'http://0.0.0.0:5000/' # For local testing
# ...
# The endpoint obtained after doing Titiler deployment
TILER_ENDPOINT = 'https://XXX.execute-api.us-east-1.amazonaws.com'
# If running the tiler locally, this can be TILER_ENDPOINT = 'http://localhost:8000'
Run the app:
poetry shell
FLASK_APP=api/maapapp.py flask run --host=0.0.0.0
Some issues you may experience while running the above line:
-
Allowing using postgres without login (A fix for 'fe_sendauth: no password supplied'):
sudo vi /etc/postgresql/9.5/main/pg_hba.conf #(the location may be different depend on OS and postgres version)
# Reconfig as follows: local all all trust host all all 127.0.0.1/32 trust host all all ::1/0 trust # Save pg_hba.conf
# Restart postgresql sudo /etc/init.d/postgresql reload sudo /etc/init.d/postgresql start
Running tests
When using docker-compose to start the app it is possible to run the tests locally if you first
update the settings.py DATABASE_URL
value to specify localhost
as the servername instead of db
(DO NOT check in this change).
python -m unittest test/api/endpoints/test_wmts_get_tile.py
If you are running the latest version of Titiler, use the following local test scripts:
while keeping the server in the previous step running (i.e., local maap-api-nasa). Open a new terminal
poetry env use $(poetry env info -e)
#If you are running the latest version of Titiler, then use the following test scripts:
python -m unittest -v test/api/endpoints/test_wmts_get_tile_new_titiler.py
python -m unittest -v test/api/endpoints/test_wmts_get_capabilities_new_titiler.py
III. User Accounts
A valid MAAP API token must be included in the header for any API request. An Earthdata account is required to access the MAAP API. To obtain a token, URS credentials must be provided as shown below:
curl -X POST --header "Content-Type: application/json" -d "{ \"username\": \"urs_username\", \"password\": \"urs_password\" }" https://api.dit.maap-project.org/token
Comments:
-
After running the local maap-api-nasa, go to http://0.0.0.0:5000/api to see the APIs.
-
Or running the your own test scripts with:
curl -X POST --header "Content-Type: application/json" -d "{ \"username\": \"urs_username\", \"password\": \"urs_password\" }" http://0.0.0.0:5000/token
Owner metadata
- Name: MAAP-Project
- Login: MAAP-Project
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/42812645?v=4
- Repositories: 99
- Last ynced at: 2024-04-15T03:24:57.663Z
- Profile URL: https://github.com/MAAP-Project
GitHub Events
Total
- Create event: 20
- Issues event: 3
- Release event: 7
- Watch event: 1
- Delete event: 10
- Member event: 1
- Issue comment event: 15
- Push event: 67
- Pull request review comment event: 2
- Pull request review event: 9
- Pull request event: 13
Last Year
- Create event: 20
- Issues event: 3
- Release event: 7
- Watch event: 1
- Delete event: 10
- Member event: 1
- Issue comment event: 15
- Push event: 67
- Pull request review comment event: 2
- Pull request review event: 9
- Pull request event: 13
Committers metadata
Last synced: 5 days ago
Total Commits: 599
Total Committers: 18
Avg Commits per committer: 33.278
Development Distribution Score (DDS): 0.653
Commits in past year: 72
Committers in past year: 6
Avg Commits per committer in past year: 12.0
Development Distribution Score (DDS) in past year: 0.722
Name | Commits | |
---|---|---|
bsatoriu | b****s@j****v | 208 |
Aimee Barciauskas | a****e@d****g | 81 |
namratam | n****g@g****m | 69 |
Malarout | n****t@j****v | 54 |
bsatoriu | b****u@j****v | 46 |
grallewellyn | g****n@j****v | 42 |
Anil Natha | A****a@j****v | 23 |
Frank Greguska | 8****e | 19 |
TonHai1111 | t****i@g****m | 15 |
Sujen Shah | s****2 | 14 |
Marjorie Lucas | m****s@j****v | 10 |
Anthony Lukach | a****h@g****m | 6 |
Phil Varner | p****r@g****m | 5 |
echyam | e****m@g****m | 3 |
Chuck Daniels | c****4@g****m | 1 |
Jamison French | j****h@g****m | 1 |
Laura Alisic Jewell | l****l | 1 |
Slesa Adhikari | s****d@g****m | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 21
Total pull requests: 136
Average time to close issues: 2 months
Average time to close pull requests: 13 days
Total issue authors: 10
Total pull request authors: 16
Average comments per issue: 1.33
Average comments per pull request: 0.56
Merged pull request: 118
Bot issues: 0
Bot pull requests: 2
Past year issues: 13
Past year pull requests: 30
Past year average time to close issues: 3 months
Past year average time to close pull requests: 7 days
Past year issue authors: 6
Past year pull request authors: 5
Past year average comments per issue: 1.62
Past year average comments per pull request: 1.17
Past year merged pull request: 24
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sujen1412 (7)
- frankinspace (4)
- marjo-luc (3)
- abarciauskas-bgse (1)
- bsatoriu (1)
- emileten (1)
- omshinde (1)
- anilnatha (1)
- wildintellect (1)
- hrodmn (1)
Top Pull Request Authors
- bsatoriu (60)
- abarciauskas-bgse (13)
- sujen1412 (13)
- marjo-luc (11)
- anilnatha (10)
- grallewellyn (7)
- frankinspace (6)
- TonHai1111 (5)
- dependabot[bot] (2)
- NamrataM (2)
- jjfrench (2)
- chuckwondo (1)
- philvarner (1)
- emileten (1)
- slesaad (1)
Top Issue Labels
- enhancement (3)
- bug (2)
- help wanted (1)
Top Pull Request Labels
- dependencies (2)
- bug (2)
Dependencies
- PyJWT *
- Werkzeug ==0.16.1
- boto3 ==1.9.199
- flask *
- flask-restplus *
- flask_sqlalchemy *
- gitpython *
- mapproxy *
- marshmallow-sqlalchemy *
- natsort *
- owslib *
- pillow *
- psycopg2 *
- pycryptodome *
- pyproj ==1.9.6
- pyshp *
- requests *
- requests_file *
- xmltodict *
- python 3.9 build
- maap-api-nasa latest
- postgres 14.5
Score: 5.886104031450156