Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HIGH] Update CI/CD for docs #82

Closed
wants to merge 12 commits into from
Closed

Conversation

CasperWA
Copy link
Collaborator

@CasperWA CasperWA commented Mar 2, 2022

Update documentation CI/CD workflows similarly as to what is done in BIG-MAP/LabNotebookAppOntology.

Closes #73

Updated/Reworked this PR:

IMPORTANT: A change in this PR adds .ttl to the end of the owl:versionIRI value. If this is not intended, this should be reverted. One thing is that the IRI will currently not be resolvable due to the battinfo.ttl file being released under an extra sub-folder for v0.6.0. This can be changed manually, simultaneously with merging this PR, while a new version should proabably be released as well (v0.6.1?). How to proceed on this should be agreed upon before merging this PR and it should be well coordinated to ensure no real down time for users of BattINFO.

Following @eibar-flores's excellent work with updating the documentation build workflow, this builds on that and ensures the ontology is also "published" as intended.
The CI/CD workflows have been updated and expanded in the following way:

  • The CI tests workflow now properly tests building the documentation as well as "publishing" the ontologies/-y.
  • The Update GH-Pages workflow will now push to the gh-pages branch, updating it with the latest documentation and ontologies as well as preserving earlier versions of the ontologies.
    Furthermore, it's made callable by other workflows, useful for the "release" workflow (mentioned below).
  • A new CD Update Version workflow, or "release" workflow, has been added, which will run when a GitHub release is published. It will take the new tag and use it to update the owl:versionIRI and owl:versionInfo values in the ontologies (now only battinfo.ttl) and also it's reference in the catalog-v001.xml file. Then it will merge those changes back to master and run the Update GH-Pages workflow, effectively publishing the new ontology version.

Finally, a bit of developer documentation has been added to explain the intended way of publishing the documentation as well as releasing a new BattINFO version.

CasperWA added 2 commits March 2, 2022 17:23
Update according to BIG-MAP/LabNotebookAppOntology.
@CasperWA
Copy link
Collaborator Author

CasperWA commented Mar 2, 2022

@jesper-friis and @jsimonclark do you know what the error is here? (Failing action run)

@jesper-friis
Copy link
Collaborator

jesper-friis commented Mar 4, 2022

I think ChargePerMassDimension has been changed to ElectricChargePerMassDimension. I guess that the reason for the failing test is that source /home/runner/work/BattINFO/BattINFO/doc/ontodoc/tmp/battinfo-inferred.ttl is outdated.

Copy link
Collaborator

@jesper-friis jesper-friis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good. But we should resolve the failing test before merge

@CasperWA
Copy link
Collaborator Author

CasperWA commented Mar 7, 2022

I think ChargePerMassDimension has been changed to ElectricChargePerMassDimension. I guess that the reason for the failing test is that source /home/runner/work/BattINFO/BattINFO/doc/ontodoc/tmp/battinfo-inferred.ttl is outdated.

Is this something that either you @jesper-friis or @jsimonclark can fix directly in the branch for this PR? :)

@CasperWA CasperWA marked this pull request as draft September 13, 2022 08:03
@CasperWA CasperWA changed the title Update CI/CD for docs and update-pages.sh [HIGH] Update CI/CD for docs and update-pages.sh Jan 24, 2023
Finalize build script.
One can build the documentation simply by running

  python docs/scripts/build.py site

It will then be built in the 'site' folder at the root of the
repository.
It utilizes the md_to_html.py script to generate HTML from all markdown
files in the 'docs' folder and sub-folders (excluding any files found in
'assets', 'css', and 'scripts').
Update CI/CD workflows
Also ensure all requirements are installed for CI
@CasperWA CasperWA marked this pull request as ready for review September 6, 2023 13:40
@CasperWA CasperWA changed the title [HIGH] Update CI/CD for docs and update-pages.sh [HIGH] Update CI/CD for docs Sep 6, 2023
@CasperWA CasperWA marked this pull request as draft September 6, 2023 13:40
@CasperWA
Copy link
Collaborator Author

CasperWA commented Sep 6, 2023

Updated this completely to comply with the excellent documentation updates implemented by @eibar-flores.

Tests now succeed - the actual publishing workflow now needs to be fixed and remedied.

@CasperWA CasperWA requested review from eibar-flores and removed request for jsimonclark September 8, 2023 10:00
Update and add documentation for how to release a new BattINFO version
as well as how to release the documentation.
@CasperWA CasperWA marked this pull request as ready for review September 9, 2023 12:38

def rendering_workflow():
# Get all Markdown files NOT in the assets, css, or scripts directories
md_files = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont fully follow the code from lines 63 to 85. I think you are scanning through md files not in the assets, css and scripts, but you have already moved them there. What is the purpose of this part of the code?

Copy link
Collaborator Author

@CasperWA CasperWA Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

63-65: Ensuring the output_path is a sub-folder of the repository folder, i.e., that it exists in the BattINFO folder. This is only checked if the output_path given is a relative path, i.e., something like docs/site or similar (so it shouldn't start with a slash).

((WILL UPDATE/EXPAND ON ANSWER for the other lines))

@eibar-flores
Copy link
Collaborator

Could you elaborate on what are the consequences of having (or not) the ttl ending on the owl:versionIRI field?

@eibar-flores
Copy link
Collaborator

Greatly appreciated the two **.md files added to the docs directory, providing useful information for developers. We should perhaps consider publishing these as part of a "For developers" tab in the deployed documentation :)

@jsimonclark
Copy link
Collaborator

we've updated the documentation workflow according to recommendations from the EMMO working group.

@jsimonclark jsimonclark closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Update and test documentation CD
4 participants