Skip to content

Commit

Permalink
make attributes field required in ingest config
Browse files Browse the repository at this point in the history
  • Loading branch information
fvankrieken committed Oct 16, 2024
1 parent f2ecc05 commit 2b856c3
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dcpy/models/lifecycle/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Template(BaseModel, extra="forbid"):
id: str
acl: recipes.ValidAclValues

attributes: DatasetAttributes | None = None
attributes: DatasetAttributes
ingestion: Ingestion
columns: list[Column] = []

Expand All @@ -108,7 +108,7 @@ class Config(SortedSerializedBase, extra="forbid"):
version: str
crs: str | None = None

attributes: DatasetAttributes | None = None
attributes: DatasetAttributes
archival: ArchivalMetadata
ingestion: Ingestion
columns: list[Column] = []
Expand Down
2 changes: 2 additions & 0 deletions dcpy/test/connectors/edm/resources/ingest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: test
acl: public-read
attributes:
name: Test
source:
type: local_file
path: dcpy/test/connectors/edm/resources/ingest_output/test.csv
Expand Down
3 changes: 3 additions & 0 deletions dcpy/test/connectors/edm/resources/ingest/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "test",
"version": "ingest",
"attributes": {
"name": "Test"
},
"archival": {
"archival_timestamp": "2024-09-05T12:04:03.450135-04:00",
"raw_filename": "dummy.csv",
Expand Down
1 change: 1 addition & 0 deletions dcpy/test/connectors/edm/test_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class TestArchiveDataset:
config = ingest.Config(
id=dataset,
version="dummy",
attributes=ingest.DatasetAttributes(name=dataset),
archival=ingest.ArchivalMetadata(
archival_timestamp=datetime.now(),
acl="private",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: bpl_libraries
acl: public-read

attributes:
name: BPL Libraries

ingestion:
source:
type: api
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: dca_operatingbusinesses
acl: public-read

attributes:
name: DCA Operating Businesses

ingestion:
source:
type: socrata
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: dcp-addresspoints
id: dcp_addresspoints
acl: public-read

attributes:
name: DCP Address Points

ingestion:
source:
type: edm_publishing_gis_dataset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: dcp_atomicpolygons
acl: public-read

attributes:
name: DCP Atomic Polygons

ingestion:
source:
type: file_download
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: dcp_pop_acs2010_demographic
acl: public-read

attributes:
name: DCP Population 2010 ACS Demographic Data

ingestion:
source:
type: local_file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
id: dob_now_permits
acl: public-read

attributes:
name: DOB Now Job Permits

ingestion:
source:
type: s3
Expand Down

0 comments on commit 2b856c3

Please sign in to comment.