OpenEnergyPlatform / ontology

Repository for the Open Energy Ontology (OEO)
Creative Commons Zero v1.0 Universal
111 stars 23 forks source link

`oeo-closure.owl` no longer built on every push #1955

Closed ColinHDev closed 1 week ago

ColinHDev commented 1 month ago

Summary of the discussion

The OEO CI workflow is run on every push and regularly requires around 11 minutes to build and test the ontology. To do this it builds the oeo-full.omn, oeo-full.owl and oeo-closure.owl files. However, only the first two are required for the subsequent test step.

This Pr changes the workflow to no longer build the oeo-closure.owl file as it does not need to be built after every push. As can be seen at the required completion time on the workflow of this pr, the time was reduced to 3m 39s.

This breaks backwards compatibility as this workflow also attaches the built files as artifacts of the workflow run for anyone to download. So any script, tool or tutorial (e.g. the wiki entry How-to-release-a-new-ontology-version) will no longer be feasible since the artifacts no longer contain the previously expected files. The problem with the release workflow as described in the tutorial is fixed with https://github.com/OpenEnergyPlatform/ontology/pull/1956.

Type of change (CHANGELOG.md)

---

Workflow checklist

Automation

Closes #1934

PR-Assignee

Reviewer

ColinHDev commented 3 weeks ago

Since a few people were added to review the PR, here is a little explanation of why changing this one line (hopefully) works as expected:

  1. The make command builds the ontology using the Makefile, which defines all the steps to build the ontology.
  2. In those Makefiles you can also define so-called targets.
    • This is the base target, which we could run specifically by executing make base.
    • Here is the all target. It is defined that if it is run by executing make all, it will call the base, merge, and then closure targets.
    • You can execute a given or multiple targets by defining them after the make command. If no target is given, the make command will execute the first target in the file.
  3. In the previous implementation, only make was called, so it would execute the first target in the Makefile, which is all. This target then calls base, merge and closure.
  4. I am yet not really sure, how to describe what the base target exactly does. But the merge target also builds the oeo-full.owl file, while the closure target builds the oeo-closure.owl.
  5. So I changed that line to no longer implicitly call the base merge closure targets, but explicitly only the base merge targets. This way it no longer builds the oeo-closure.owl.

I hope this helps. :)

stap-m commented 3 weeks ago

As addition to @ColinHDev explanation: the oeo-closure will be removed from the usual push workflows. With #1956 its creation will be only performed in the post-release procedures.