Skip to content

Commit

Permalink
Updated makerules 2024-09-06
Browse files Browse the repository at this point in the history
  • Loading branch information
digital-land-bot committed Sep 6, 2024
1 parent fc439f8 commit d9d3414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions makerules/collection.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ second-pass:: collection

collect:: $(COLLECTION_CONFIG_FILES)
@mkdir -p $(RESOURCE_DIR)
digital-land ${DIGITAL_LAND_OPTS} collect $(ENDPOINT_CSV)
digital-land ${DIGITAL_LAND_OPTS} collect $(ENDPOINT_CSV) --collection-dir $(COLLECTION_DIR)

collection::
digital-land ${DIGITAL_LAND_OPTS} collection-save-csv
digital-land ${DIGITAL_LAND_OPTS} collection-save-csv --collection-dir $(COLLECTION_DIR)

clobber-today::
rm -rf $(LOG_FILES_TODAY) $(COLLECTION_INDEX)
Expand Down
8 changes: 4 additions & 4 deletions makerules/pipeline.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ endif

define run-pipeline
mkdir -p $(@D) $(ISSUE_DIR)$(notdir $(@D)) $(COLUMN_FIELD_DIR)$(notdir $(@D)) $(DATASET_RESOURCE_DIR)$(notdir $(@D))
digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(@D)) $(DIGITAL_LAND_FLAGS) pipeline $(1) --issue-dir $(ISSUE_DIR)$(notdir $(@D)) --column-field-dir $(COLUMN_FIELD_DIR)$(notdir $(@D)) --dataset-resource-dir $(DATASET_RESOURCE_DIR)$(notdir $(@D)) $(PIPELINE_FLAGS) $< $@
digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(@D)) --pipeline-dir $(PIPELINE_DIR) $(DIGITAL_LAND_FLAGS) pipeline $(1) --organisation-path $(CACHE_DIR)organisation.csv --issue-dir $(ISSUE_DIR)$(notdir $(@D)) --column-field-dir $(COLUMN_FIELD_DIR)$(notdir $(@D)) --dataset-resource-dir $(DATASET_RESOURCE_DIR)$(notdir $(@D)) $(PIPELINE_FLAGS) $< $@
endef

define build-dataset =
mkdir -p $(@D)
time digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(basename $@)) dataset-create --output-path $(basename $@).sqlite3 $(^)
time digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(basename $@)) dataset-create --output-path $(basename $@).sqlite3 --organisation-path $(CACHE_DIR)organisation.csv --issue-dir $(ISSUE_DIR) --column-field-dir=$(COLUMN_FIELD_DIR) --dataset-resource-dir $(DATASET_RESOURCE_DIR) $(^)
time datasette inspect $(basename $@).sqlite3 --inspect-file=$(basename $@).sqlite3.json
time digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(basename $@)) dataset-entries $(basename $@).sqlite3 $@
mkdir -p $(FLATTENED_DIR)
Expand All @@ -108,9 +108,9 @@ define build-dataset =
endef

collection::
digital-land ${DIGITAL_LAND_OPTS} collection-pipeline-makerules > collection/pipeline.mk
digital-land ${DIGITAL_LAND_OPTS} collection-pipeline-makerules --collection-dir $(COLLECTION_DIR) > $(COLLECTION_DIR)/pipeline.mk

-include collection/pipeline.mk
-include $(COLLECTION_DIR)/pipeline.mk

# restart the make process to pick-up collected resource files
second-pass::
Expand Down

0 comments on commit d9d3414

Please sign in to comment.