Skip to content

Commit

Permalink
Merge pull request #87 from Knowledge-Graph-Hub/81-automatic-build-of…
Browse files Browse the repository at this point in the history
…-site-artifacts-fails-due-to-missing-subcommand

Remove targets for building principles resources
  • Loading branch information
caufieldjh authored Feb 11, 2025
2 parents be294b9 + c5f6fdd commit d545321
Show file tree
Hide file tree
Showing 34 changed files with 15 additions and 3,115 deletions.
39 changes: 14 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ RUN = poetry run
# All KG .md files
KGS := $(wildcard resource/*.md)

# All principles .md files
PRINCIPLES := $(wildcard principles/*.md)

# Path to the source KG-Registry schema
SOURCE_SCHEMA = src/kg_registry/kg_registry_schema/schema/kg_registry_schema.yaml

Expand Down Expand Up @@ -72,31 +69,26 @@ reports:
reports/robot:
mkdir -p $@

reports/principles:
mkdir -p $@
# reports/principles:
# mkdir -p $@


### Build Configuration Files

# Create the site-wide config file by combining all metadata on resources + principles
# Create the site-wide config file by combining all metadata on resources
# and combining with site-wide metadata.
#
# Note that anything in _config.yml is accessible to any liquid template via the
# `sites` object - think of it like the global database
#
# (this is somewhat hacky, but concatenating these yamls is safe)
_config.yml: _config_header.yml registry/kgs.yml principles/all.yml
_config.yml: _config_header.yml registry/kgs.yml
cat $^ > $@.tmp && mv $@.tmp $@

# Sort resources based on the validation (metadata-grid)
registry/kgs.yml: reports/metadata-grid.csv
./util/sort-resources.py tmp/unsorted-resources.yml $< $@ && rm -rf tmp

# Extract the metadata from each principle in the principles/ directory, and concatenate
# into a single yaml file in that directory
principles/all.yml: $(PRINCIPLES)
./util/extract-metadata.py concat-principles -o $@.tmp $^ && mv $@.tmp $@

# Use a generic yaml->json conversion, but adding a @content
registry/kgs.jsonld: registry/kgs.yml
./util/yaml2json.py $< > $@.tmp && mv $@.tmp $@
Expand Down Expand Up @@ -191,18 +183,18 @@ build/robot-foreign.jar: | build
# Generate the initial dashboard results file
# ALWAYS make sure nothing is running on port 25333
# Then boot Py4J gateway to ROBOT on that port
reports/dashboard.csv: registry/kgs.yml | \
reports/robot reports/principles build/resource build/robot.jar build/robot-foreign.jar
make reboot
./util/principles/dashboard.py $< $@ --big false
# reports/dashboard.csv: registry/kgs.yml | \
# reports/robot reports/principles build/resource build/robot.jar build/robot-foreign.jar
# make reboot
# ./util/principles/dashboard.py $< $@ --big false

reports/big-dashboard.csv: reports/dashboard.csv
make reboot
./util/principles/dashboard.py registry/kgs.yml $@ --big true
# reports/big-dashboard.csv: reports/dashboard.csv
# make reboot
# ./util/principles/dashboard.py registry/kgs.yml $@ --big true

# Combine the dashboard files
reports/dashboard-full.csv: reports/dashboard.csv reports/big-dashboard.csv registry/kgs.yml
./util/principles/sort_tables.py $^ $@
# # Combine the dashboard files
# reports/dashboard-full.csv: reports/dashboard.csv reports/big-dashboard.csv registry/kgs.yml
# ./util/principles/sort_tables.py $^ $@

# Generate the HTML grid output for dashboard
reports/dashboard.html: reports/dashboard-full.csv
Expand All @@ -215,7 +207,6 @@ build/dashboard: reports/dashboard.html
mkdir -p $@/reports
cp $< $@
cp -r reports/robot $@/reports
cp -r reports/principles $@/reports
cp -r assets/svg $@/assets
rm -rf build/dashboard.zip
zip -r $@.zip $@
Expand All @@ -226,10 +217,8 @@ build/dashboard: reports/dashboard.html
clean-dashboard: build/dashboard
rm -rf build/resource
rm -rf reports/robot
rm -rf reports/principles
rm -rf build/dashboard


# Note this should *not* be run as part of general travis jobs, it is expensive
# and may be prone to false positives as it is inherently network-based
valid-purl-report.txt: registry/kgs.yml
Expand Down
49 changes: 0 additions & 49 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,52 +1241,3 @@ resources:
url: https://w3id.org/biopragmatics/resources/uniprot/uniprot.sssom
repository: https://github.com/biopragmatics/obo-db-ingest
url: https://biopragmatics.github.io/obo-db-ingest/
principles:
- id: fp-000-summary
layout: principle
title: Overview
- id: fp-001-open
layout: principle
title: Open (principle 1)
- id: fp-002-format
layout: principle
title: Common Format (principle 2)
- id: fp-003-uris
layout: principle
title: URI/Identifier Space (principle 3)
- id: fp-004-versioning
layout: principle
title: Versioning (principle 4)
- id: fp-005-delineated-content
layout: principle
title: Scope (principle 5)
- id: fp-006-textual-definitions
layout: principle
title: Textual Definitions (principle 6)
- id: fp-007-relations
layout: principle
title: Relations (principle 7)
- id: fp-008-documented
layout: principle
title: Documentation (principle 8)
- id: fp-009-users
layout: principle
title: Documented Plurality of Users (principle 9)
- id: fp-010-collaboration
layout: principle
title: Commitment To Collaboration (principle 10)
- id: fp-011-locus-of-authority
layout: principle
title: Locus of Authority (principle 11)
- id: fp-012-naming-conventions
layout: principle
title: Naming Conventions (principle 12)
- id: fp-013-notification
layout: principle
title: Notification of Changes (principle 13)
- id: fp-016-maintenance
layout: principle
title: Maintenance (principle 16)
- id: fp-020-responsiveness
layout: principle
title: Responsiveness (principle 20)
60 changes: 0 additions & 60 deletions principles/Makefile

This file was deleted.

49 changes: 0 additions & 49 deletions principles/all.yml

This file was deleted.

Loading

0 comments on commit d545321

Please sign in to comment.