Skip to content

Commit

Permalink
Add migration for pydantic 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moradology committed Jul 8, 2021
1 parent 33a662f commit c5257aa
Show file tree
Hide file tree
Showing 13 changed files with 223 additions and 191 deletions.
2 changes: 2 additions & 0 deletions scripts/ingest_joplin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from pathlib import Path
from urllib.parse import urljoin

from stac_pydantic import Collection

import requests

workingdir = Path(__file__).parent.absolute()
Expand Down
3 changes: 1 addition & 2 deletions stac_fastapi/pgstac/stac_fastapi/pgstac/models/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from urllib.parse import ParseResult, parse_qs, unquote, urlencode, urljoin, urlparse

import attr
from stac_pydantic.api.extensions.paging import PaginationLink
from stac_pydantic.links import Link, Relations
from stac_pydantic.links import Link, Relations, PaginationLink
from stac_pydantic.shared import MimeTypes
from starlette.requests import Request

Expand Down
3 changes: 2 additions & 1 deletion stac_fastapi/pgstac/tests/data/joplin/collection.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"id": "joplin",
"description": "This imagery was acquired by the NOAA Remote Sensing Division to support NOAA national security and emergency response requirements. In addition, it will be used for ongoing research efforts for testing and developing standards for airborne digital imagery. Individual images have been combined into a larger mosaic and tiled for distribution. The approximate ground sample distance (GSD) for each pixel is 35 cm (1.14 feet).",
"stac_version": "1.0.0-beta.2",
"stac_version": "1.0.0",
"license": "public-domain",
"links": [],
"type": "collection",
"extent": {
"spatial": {
"bbox": [
Expand Down
Loading

0 comments on commit c5257aa

Please sign in to comment.