Skip to content

Commit

Permalink
add missing types (#13)
Browse files Browse the repository at this point in the history
* fields without types get given str type

* model best practice by using the https as an example url if needed
  • Loading branch information
gblackadder authored Jan 23, 2025
1 parent f60e138 commit 838401e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
Binary file modified excel_sheets/Document_metadata.xlsx
Binary file not shown.
Binary file modified excel_sheets/Image_metadata.xlsx
Binary file not shown.
Binary file modified excel_sheets/Table_metadata.xlsx
Binary file not shown.
4 changes: 2 additions & 2 deletions pydantic_schemas/indicator_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class AuthoringEntityItem(SchemaBaseModel):
title="Agency Name",
)
affiliation: Optional[str] = Field(None, title="Affiliation")
abbreviation: Optional[Any] = Field(
abbreviation: Optional[str] = Field(
None, description="Abbreviation", title="Abbreviation"
)
email: Optional[Any] = Field(None, description="Email", title="Email")
email: Optional[str] = Field(None, description="Email", title="Email")
uri: Optional[str] = Field(None, title="URI")


Expand Down
4 changes: 2 additions & 2 deletions pydantic_schemas/table_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ class ProvenanceSchema(SchemaBaseModel):


class AuthorIdItem(SchemaBaseModel):
type: Optional[Any] = Field(
type: Optional[str] = Field(
None, description="Source of identifier, e.g. ORCID", title="Type"
)
id: Optional[Any] = Field(
id: Optional[str] = Field(
None,
description="Author's unique identifier for the corresponding source",
title="Identifier",
Expand Down
2 changes: 1 addition & 1 deletion pydantic_schemas/utils/quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .utils import standardize_keys_in_dict

DEFAULT_URL = "http://www.example.com"
DEFAULT_URL = "https://www.example.com"
MAX_DEPTH = 12


Expand Down
6 changes: 4 additions & 2 deletions schemas/table-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
"properties": {
"type": {
"title": "Type",
"description": "Source of identifier, e.g. ORCID"
"description": "Source of identifier, e.g. ORCID",
"type": "string"
},
"id": {
"title": "Identifier",
"description": "Author's unique identifier for the corresponding source"
"description": "Author's unique identifier for the corresponding source",
"type": "string"
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions schemas/timeseries-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@
},
"abbreviation": {
"title": "Abbreviation",
"description": "Abbreviation"
"description": "Abbreviation",
"type": "string"
},
"email": {
"title": "Email",
"description": "Email"
"description": "Email",
"type": "string"
},
"uri": {
"title": "URI",
Expand Down

0 comments on commit 838401e

Please sign in to comment.