Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge join changes to make indexing work. #3

Merged
merged 54 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
dd0c937
Use STACObjectType to identifiy objects
valentinedwv Apr 29, 2024
750319d
Use STACObjectType to identifiy objects
valentinedwv Apr 29, 2024
306e3de
Merge remote-tracking branch 'origin/yl_dv' into yl_dv
valentinedwv Apr 29, 2024
8dbe7ab
commit a run config
valentinedwv Apr 30, 2024
0f293ad
process catalog is an list..
valentinedwv Apr 30, 2024
950b778
add runconfig
valentinedwv Apr 30, 2024
c080526
Use STACObjectType to identifiy objects
valentinedwv Apr 29, 2024
7dc7b54
Added NOTES_DEV.md
valentinedwv May 2, 2024
8b42ec3
Added NOTES_DEV.md
valentinedwv May 2, 2024
bdd0987
fix some stac data
valentinedwv May 3, 2024
f6053bf
Update NOTES_DEV.md
ylyangtw May 6, 2024
c513732
Update NOTES_DEV.md
ylyangtw May 6, 2024
e4d5a69
Update walkstac.py
ylyangtw May 10, 2024
91943b7
add jsonld output
ylyangtw May 10, 2024
527d10b
update jsonlds
ylyangtw May 10, 2024
f69d9db
generate sitemap
ylyangtw May 13, 2024
f7a5917
separate 3 datasets; fix titles and descriptions; auto clear output (#6)
ylyangtw May 19, 2024
098a5f9
move sitemaps
ylyangtw May 20, 2024
fdbc993
fix ids
ylyangtw May 20, 2024
6b019f9
update
ylyangtw May 20, 2024
da5b5d1
update (#9)
ylyangtw Jun 7, 2024
430c4c7
remove output
ylyangtw Jun 7, 2024
d9f0634
Yl dv demo (#10)
ylyangtw Jun 7, 2024
5da078a
update
ylyangtw Jun 7, 2024
3762960
Merge branch 'yl_dv' of https://github.com/earthcube/stacIndexer into…
ylyangtw Jun 7, 2024
ce8a6f3
fix geoshape
ylyangtw Jun 14, 2024
f55d45e
Resolve bounding box (#13)
ylyangtw Aug 13, 2024
35d886c
Update walkstac.py
ylyangtw Aug 13, 2024
2b0c9ac
update
ylyangtw Aug 13, 2024
4910752
add workflow and requirement
ylyangtw Aug 14, 2024
2361e4c
Update requirements.txt
ylyangtw Aug 14, 2024
ff6226b
Update generate_json_files.yml
ylyangtw Aug 14, 2024
28f5e84
Update walkstac.py
ylyangtw Aug 14, 2024
2445def
Update generate_json_files.yml
ylyangtw Aug 14, 2024
439a8b3
Update generate_json_files.yml
ylyangtw Aug 14, 2024
fc8aa09
add token
ylyangtw Aug 14, 2024
9b7a452
Update generate_json_files.yml
ylyangtw Aug 14, 2024
0145271
Update generate_json_files.yml
ylyangtw Aug 14, 2024
d03b6c9
Automated commit: Generate folder
github-actions[bot] Aug 14, 2024
593e24e
Update generate_json_files.yml
ylyangtw Aug 14, 2024
76f262b
Update generate_json_files.yml
ylyangtw Aug 14, 2024
38fa495
add titile
ylyangtw Aug 15, 2024
e470cb6
Update generate_json_files.yml
ylyangtw Aug 15, 2024
d990a2f
Automated commit: Update data folder
github-actions[bot] Aug 15, 2024
6322c30
Automated commit: Update data folder
github-actions[bot] Aug 17, 2024
faca3e6
Automated commit: Update data folder
github-actions[bot] Aug 18, 2024
abb2837
Automated commit: Update data folder
github-actions[bot] Aug 19, 2024
dd28015
Automated commit: Update data folder
github-actions[bot] Aug 20, 2024
820de26
Automated commit: Update data folder
github-actions[bot] Aug 21, 2024
097a0e1
change keywords to array
ylyangtw Aug 21, 2024
921b271
Update generate_json_files.yml
ylyangtw Aug 21, 2024
e50a128
Automated commit: Update data folder
github-actions[bot] Aug 21, 2024
950e5ba
Automated commit: Update data folder
github-actions[bot] Aug 22, 2024
ece5784
Merge branch 'yl' into yl_dv
ylyangtw Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
59 changes: 59 additions & 0 deletions .github/workflows/generate_json_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update sitemap and jsonlds

on:
push:
branches: [ yl_dv ]
schedule:
# Runs at 00:00 UTC every day
- cron: '0 0 * * *'

jobs:
update-sitemap-and-jsonlds:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: yl_dv # Check out the `yl_dv` branch

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Specify the Python version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Clean up the target folder (if exists)
run: |
if [ -d "data/output" ]; then
rm -rf data/output/*
else
mkdir -p data/output
fi

- name: Run main.py with configfile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python main.py --configfile ./data/challenge/catalog-yl.json

- name: Stage changes in the data folder
run: |
git add data # Stage only the `data` folder

- name: Commit and push changes if any
run: |
if git diff --cached --quiet; then
echo "No changes to commit."
else
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Automated commit: Update data folder"
git push origin yl_dv
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 18 additions & 2 deletions .idea/jupyter-settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added archive/__pycache__/s2cells.cpython-311.pyc
Binary file not shown.
Binary file modified archive/__pycache__/spatial.cpython-310.pyc
Binary file not shown.
Binary file added archive/__pycache__/spatial.cpython-311.pyc
Binary file not shown.
15 changes: 5 additions & 10 deletions archive/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@


def sdo_box(bbox, cells):

doc = {}
geo_a = []

geo = {}
geo["@type"] = "GeoShape"
geo["box"] = bbox
geo_a.append(geo)
additional_property = []
geo = {"@type": "GeoShape", "box": bbox}

for c in cells:
geos2 = {}
Expand All @@ -34,10 +29,10 @@ def sdo_box(bbox, cells):
geos2["name"] = "s2Level13"
geos2["description"] = "S2 cell at level 13"
geos2["value"] = c
geo_a.append(geos2)

additional_property.append(geos2)

doc['@type'] = 'Place'
doc['geo'] = geo_a
doc['geo'] = geo
doc['additionalProperty'] = additional_property

return doc
Binary file added data/.DS_Store
Binary file not shown.
Binary file added data/challenge/.DS_Store
Binary file not shown.
62 changes: 62 additions & 0 deletions data/challenge/NOTES_DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Notes on fixing issues

# dates
pending is not a date

## href
arrays and null is not a valid href
changed to a valid empty href.

{
"rel": "item",
"href": [],
"type": "text/html",
"title": "Link for Model Code"
}

https://github.com/earthcube/stacIndexer/blob/yl/data/challenge/neon4cast-stac/forecasts/models/model_items/GLEON_physics.json
```

should not generate an asset, or may point to example.com

```
{
"rel": "item",
"href": "https://github.com/radiantearth",
"type": "text/html",
"title": "Link for Model Code"
}
## hrefs cannot be arrays
https://github.com/earthcube/stacIndexer/blob/8a64765c652a85438c54a5b773d0e5a09571ad30/data/challenge/neon4cast-stac/summaries/Aquatics/Daily_Chlorophyll_a/collection.json#L281
'/Users/valentin/development/dev_earthcube/stacIndexer/data/challenge/neon4cast-stac/summaries/Aquatics/Daily_Chlorophyll_a/collection.json'

['s3://anonymous@bio230014-bucket01/challenges/forecasts/parquet/project_id=neon4cast/duration=P1D/variable=chla?endpoint_override=sdsc.osn.xsede.org', 's3://anonymous@bio230014-bucket01/challenges/forecasts/parquet/project_id=usgsrc4cast/duration=P1D/variable=chla?endpoint_override=sdsc.osn.xsede.org']


## bbox should not be lists

"bbox": [

-156.6194,
71.2824,
-66.7987,
71.2824

],

(used two replace in files (
1:
"bbox": [
[

2:

))

the bbox should be
"bbox": [
-156.6194,
71.2824,
-66.7987,
71.2824
],
72 changes: 36 additions & 36 deletions data/challenge/catalog-yl.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"type": "Catalog",
"id": "eco4cast-stac",
"title": "Ecological Forecasting Initiative Forecasting Challenges Catalog",
"description": "A STAC (Spatiotemporal Asset Catalog) describing forecasts and forecast scores for ecological forecasting challenges",
"stac_version": "1.0.0",
"conformsTo": "conformsTo",
"links": [
{
"rel": "self",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "root",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "neon4cast",
"href": "neon4cast-stac/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast-LTREB-reservoirs",
"href": "vera4cast-stac/catalog.json"
},
"type": "Catalog",
"id": "eco4cast-stac",
"title": "Ecological Forecasting Initiative Forecasting Challenges Catalog",
"description": "A STAC (Spatiotemporal Asset Catalog) describing forecasts and forecast scores for ecological forecasting challenges",
"stac_version": "1.0.0",
"conformsTo": "conformsTo",
"links": [
{
"rel": "child",
"type": "application/json",
"title": "vera4cast-eco4cast",
"href": "usgsrc4cast-stac/catalog.json"
}
]
}
"rel": "self",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "root",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "neon4cast",
"href": "neon4cast-stac/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast-LTREB-reservoirs",
"href": "vera4cast-stac/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast-eco4cast",
"href": "usgsrc4cast-stac/catalog.json"
}
]
}
72 changes: 36 additions & 36 deletions data/challenge/catalog.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"type": "Catalog",
"id": "eco4cast-stac",
"title": "Ecological Forecasting Initiative Forecasting Challenges Catalog",
"description": "A STAC (Spatiotemporal Asset Catalog) describing forecasts and forecast scores for ecological forecasting challenges",
"stac_version": "1.0.0",
"conformsTo": "conformsTo",
"links": [
{
"rel": "self",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "root",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "neon4cast",
"href": "https://raw.githubusercontent.com/eco4cast/neon4cast-ci/main/catalog/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast",
"href": "https://raw.githubusercontent.com/LTREB-reservoirs/vera4cast/main/catalog/catalog.json"
},
"type": "Catalog",
"id": "eco4cast-stac",
"title": "Ecological Forecasting Initiative Forecasting Challenges Catalog",
"description": "A STAC (Spatiotemporal Asset Catalog) describing forecasts and forecast scores for ecological forecasting challenges",
"stac_version": "1.0.0",
"conformsTo": "conformsTo",
"links": [
{
"rel": "child",
"type": "application/json",
"title": "vera4cast",
"href": "https://raw.githubusercontent.com/eco4cast/usgsrc4cast-ci/main/catalog/catalog.json"
}
]
}
"rel": "self",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "root",
"type": "application/json",
"href": "catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "neon4cast",
"href": "https://raw.githubusercontent.com/eco4cast/neon4cast-ci/main/catalog/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast",
"href": "https://raw.githubusercontent.com/LTREB-reservoirs/vera4cast/main/catalog/catalog.json"
},
{
"rel": "child",
"type": "application/json",
"title": "vera4cast",
"href": "https://raw.githubusercontent.com/eco4cast/usgsrc4cast-ci/main/catalog/catalog.json"
}
]
}
Loading