Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-maschler committed Feb 15, 2024
1 parent ac8e143 commit 8d3832f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
- Require `type` property to be set for Catalog and Collections
- Fix validator for Item `datetime` and Common MetaData `start_datetime` and `end_datetime`
- Make sure all `datetime` fields are correctly parsed
- Include `datetime` and `license` to Common MetaData
- Make sure default values for required but unset fields are correctly parsed
- Add support from Python 3.12
- Lint all files
- Increase test coverage


3.0.0 (2024-01-25)
------------------
- Support pydantic>2.0 (@huard)
Expand Down
38 changes: 22 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,39 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name="stac-pydantic"
description="Pydantic data models for the STAC spec"
classifiers=[
name = "stac-pydantic"
description = "Pydantic data models for the STAC spec"
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
]
keywords=["stac", "pydantic", "validation"]
authors=[{ name = "Arturo Engineering", email = "[email protected]"}]
license= { text = "MIT" }
requires-python=">=3.8"
dependencies = ["click>=8.1.7", "pydantic>=2.4.1", "geojson-pydantic>=1.0.0", "ciso8601~=2.3"]
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License"]
keywords = ["stac", "pydantic", "validation"]
authors = [{ name = "Arturo Engineering", email = "[email protected]" }]
license = { text = "MIT" }
requires-python = ">=3.8"
dependencies = [
"click>=8.1.7",
"pydantic>=2.4.1",
"geojson-pydantic>=1.0.0",
"ciso8601~=2.3"]
dynamic = ["version", "readme"]

[project.scripts]
stac-pydantic = "stac_pydantic.scripts.cli:app"

[project.urls]
homepage = "https://github.com/stac-utils/stac-pydantic"
repository ="https://github.com/stac-utils/stac-pydantic.git"
repository = "https://github.com/stac-utils/stac-pydantic.git"

[project.optional-dependencies]
dev = ["arrow>=1.2.3",
dev = [
"arrow>=1.2.3",
"pytest>=7.4.2",
"pytest-cov>=4.1.0",
"pytest-icdiff>=0.8",
Expand All @@ -39,7 +44,8 @@ dev = ["arrow>=1.2.3",
"dictdiffer>=0.9.0",
"jsonschema>=4.19.1",
"pyyaml>=6.0.1"]
lint = ["types-requests>=2.31.0.5",
lint = [
"types-requests>=2.31.0.5",
"types-jsonschema>=4.19.0.3",
"types-PyYAML>=6.0.12.12",
"black>=23.9.1",
Expand All @@ -52,10 +58,10 @@ lint = ["types-requests>=2.31.0.5",

[tool.setuptools.dynamic]
version = { attr = "stac_pydantic.version.__version__" }
readme = {file = ["README.md"], content-type = "text/markdown"}
readme = { file = ["README.md"], content-type = "text/markdown" }

[tool.setuptools.package-data]
stac_pydantic= ["*.typed"]
stac_pydantic = ["*.typed"]

[tool.setuptools.packages.find]
include = ["stac_pydantic*"]
Expand All @@ -81,6 +87,6 @@ exclude = ["tests", ".venv"]

[tool.flake8]
ignore = ["E203", "E501"]
select = ["C","E","F","W","B","B950"]
select = ["C", "E", "F", "W", "B", "B950"]
exclude = ["tests", ".venv"]
max-line-length = 88
4 changes: 0 additions & 4 deletions stac_pydantic/item.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Any, Dict, List, Optional

from ciso8601 import parse_rfc3339
from geojson_pydantic import Feature
from pydantic import AnyUrl, ConfigDict, Field, model_serializer, model_validator

Expand Down Expand Up @@ -33,9 +32,6 @@ def validate_datetime(cls, data: Any) -> Any:
"start_datetime and end_datetime must be specified when datetime is null"
)
data["datetime"] = None
else:
if isinstance(datetime, str):
data["datetime"] = parse_rfc3339(datetime)

return data

Expand Down

0 comments on commit 8d3832f

Please sign in to comment.