Skip to content

Commit

Permalink
feat: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
YiqingQu committed Apr 22, 2024
1 parent 5ee41f0 commit 89de9f9
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 8 deletions.
67 changes: 63 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,70 @@
# GeoEDF Portal
The GeoEDF project seeks to develop a resource data management portal that supports the FAIR data principles, particularly for geospatial datasets.
The portal currently supports customized search and filter operations as part of the resource querying functionality.

The resource landing page is deveployed to display detailed file metadata and make it indexable and searchable via Google Dataset Search. It displays resource metadata and the spatial coverage bounding box in a Google map. The landing page also contains embedded structured schema.org metadata which can be crawled and indexed by Google.



## Deploying
### Local Deployment
docker-compose build
docker-compose run -it -p 8000:8000 web
Your portal should now be running at http://localhost:8000


### Anvil Development
1. To build the image with `Github Actions`, push code to Github repository and track the status of the workflow.
2. Github Actions config file is in `.github/workflows/github-actions-demo.yml`.
3. Images are stored in [Registry Harbor](registry.anvil.rcac.purdue.edu). Registry server and token information can be set in Settings->Environments->{$ENV_NAME}->Environment Secrets
4. Update image tag via Anvil user interface or with `kubectl`


## Testing and Debugging

### API Swagger

http://localhost:8000/swagger/

### API Documentation

http://localhost:8000/redoc/

### Database


### Environment Variables
- `DJANGO_SUPERUSER_USERNAME`, `DJANGO_SUPERUSER_EMAIL`, `DJANGO_SUPERUSER_PASSWORD` are variables for Django admin superuser
- `SITE_NAME` is the domain name for sitemap

### Running the Portal
docker-compose build
docker-compose run -it -p 8000:8000 web

Your portal should now be running at http://localhost:8000
## Features and Tools
### Globus Search Index
- [Globus Index Documentation](https://django-globus-portal-framework.readthedocs.io/en/latest/tutorial/search/search-settings-reference.html#search-indices)
- Globus app credentials
- Client ID, ...


### Google Search
- Sitemap
- Auto-update domain name
- Submit sitemap in Google Search Console

- [Google Search Console](https://search.google.com/search-console)
- [Documentation](https://developers.google.com/search/docs/appearance/structured-data/dataset)
- (waiting for reply) [The post to Google Search Console Help Community](https://support.google.com/webmasters/thread/253986586?hl=en&sjid=5136514339393167681-NC)

### FAIR Evaluation
Refer to `myportal/tests`

### Authorization
The APIs in the portal normally have two ways of identity verification.
1. CILogon
- Register callback URLs through CILogon website
- Use `client identifier` and `client secret`
2. Jupyter API Token


### Schema.org
- [Structured Data Validator](https://validator.schema.org/)
- [Google Rich Result Test](https://search.google.com/test/rich-results)
Binary file modified db.sqlite3
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion myportal/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
ALLOWED_HOSTS = ['*']
CSRF_TRUSTED_ORIGINS = ["https://geoedf-portal.anvilcloud.rcac.purdue.edu"]

PROJECT_TITLE = 'GeoEDF Resource Data Portal'
PROJECT_TITLE = 'Fair Compliant Data Resource Portal'
# PROJECT_TITLE = 'GeoEDF Resource Data Portal'
SEARCH_INDEXES = {
'schema-org-index': {
'uuid': 'dfbccff7-36f8-43e2-9e6e-c38059184985',
Expand Down
4 changes: 2 additions & 2 deletions myportal/templates/file-management/file-manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ <h5> Actions: </h5>
<i title="Publish" class="fa-solid fa-paper-plane" style="color: #8a5ae2;"></i>
Publish
</button>
<input type="button" onclick="alert(getCheckedCheckboxesFor('select'));"
value="Get Values"/>
{# <input type="button" onclick="alert(getCheckedCheckboxesFor('select'));"#}
{# value="Get Values"/>#}

</div>

Expand Down
2 changes: 1 addition & 1 deletion myportal/views/api_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def post(self, request):

publish_to_globus_index(resource, request.headers.get('Authorization'))
# task_id = get_globus_index_submit_taskid(resource)
# resource.task_id = task_id
resource.status = "EXTRACTING"
resource.save()
return Response(
data={"status": "Submitted", "uuid": file_uuid,
Expand Down

0 comments on commit 89de9f9

Please sign in to comment.