Skip to content

docs: add webapp docs page#327

Merged
gcroci2 merged 10 commits into
devfrom
326_add_docs_page_webapp_gcroci2
May 26, 2025
Merged

docs: add webapp docs page#327
gcroci2 merged 10 commits into
devfrom
326_add_docs_page_webapp_gcroci2

Conversation

@gcroci2

@gcroci2 gcroci2 commented May 22, 2025

Copy link
Copy Markdown
Contributor

With this PR, I've added a workflow that automatically deploys updated docs with mike whenever a new GitHub release is made. It also fetches the latest nplinker-webapp README and overwrites its local copy. Doc versions are formatted as expected (e.g., 2.0.0a9). Finally, I added a new "Web App" tab to the mkdocs.yml nav.

To test this, we should merge to dev and create a new release. I'd suggest waiting for a new nplinker-webapp release (it will be done as soon as all the nplinker-webapp PRs are merged).

@gcroci2 gcroci2 requested a review from CunliangGeng May 22, 2025 12:50
@gcroci2 gcroci2 linked an issue May 22, 2025 that may be closed by this pull request

@CunliangGeng CunliangGeng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This approach couples the NPLinker release with the webapp doc. We should make them decoupled. It's ok to publish doc when there is a github release, but usually we also manually publish doc (frequently), e.g. for the doc on the latest commit of dev branch.

So please change the approach. One alternative solution could be make webapp as a submodule of this repo (git submodule), then you can directly reference its readme in mkdocs.
It'd be nice to have a new make publish-doc command in Makefile to automate the process. You could keep the github action but to use this make command to publish doc when there is a github release.

@gcroci2

gcroci2 commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

This approach couples the NPLinker release with the webapp doc. We should make them decoupled. It's ok to publish doc when there is a github release, but usually we also manually publish doc (frequently), e.g. for the doc on the latest commit of dev branch.

In NeuroGym, we typically publish documentation automatically in sync with GitHub releases. When minor doc updates are made after a release (not warranting a new version), we occasionally trigger a manual doc release. What’s the downside of this approach in your view?

An alternative approach could be to decouple the doc release from GitHub releases entirely by using a dispatch-triggered workflow. This would give you full flexibility: you could choose to publish the docs manually at any time, or let the action run and automatically update the readme from the webapp. What do you think? @CunliangGeng

@CunliangGeng

CunliangGeng commented May 23, 2025

Copy link
Copy Markdown
Member

It's great to publish the doc when making a github release, but, strictly speaking, not that good to just make a github release in order to publish the doc, because it violates the Semantic Versioning: whenever version changes, there should be updates in feature/code instead of only changes in doc.

We can keep the current action. Moreover, I think we still need the following features:

  1. build all doc (including the webapp readme) on local machine for doc development purpose
  2. manually publish doc from local machine
    For these, it's ok to create two make commands to download webapp readme to current repo and build/public doc.

Thus the doc will be published when there is a github release, you can manually update the doc without changing release version, and you can develop, build and view doc locally before publishing it.

@gcroci2

gcroci2 commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

It's great to publish the doc when making a github release, but, strictly speaking, not that good to just make a github release in order to publish the doc, because it violates the Semantic Versioning

I totally agree, and indeed when this is the case we don't make a new github release, but we just deploy the docs manually. This way is: default case, github release + docs publishing (full convenient automation). When needed because of more edits to the docs: manual docs release.

  1. build all doc (including the webapp readme) on local machine for doc development purpose
    manually publish doc from local machine

I've now added the updated webapp readme, and I've rendered it locally. It seems good to me. Let me know if I can proceed with the manual docs release. I will overwrite 2.0.0a9, right?

  1. For these, it's ok to create two make commands to download webapp readme to current repo and build/public doc.

Since the first command is just one line and the second only two, I'd prefer to document all three directly in the dev README instead of adding two separate make commands. If you agree I’ll proceed.

@gcroci2 gcroci2 requested a review from CunliangGeng May 23, 2025 11:20
Comment thread .github/workflows/deploy-docs.yml Outdated
Comment thread docs/webapp/readme.md
@gcroci2

gcroci2 commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

@CunliangGeng I've added the commands to the make file, updated accordingly the workflow for the automatic docs deployment and the dev docs for the manual one. I've also already released the new docs with the webapp readme page on both dev and 2.0.0a9 versions.

@gcroci2 gcroci2 requested a review from CunliangGeng May 23, 2025 16:46
Comment thread .github/workflows/deploy-docs.yml Outdated

@CunliangGeng CunliangGeng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding this feature! Please check the last minor comments and then you can merge it :shipit:

Comment thread Makefile Outdated
gcroci2 and others added 2 commits May 26, 2025 09:41
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
@gcroci2 gcroci2 merged commit 01b918c into dev May 26, 2025
1 check failed
@gcroci2 gcroci2 deleted the 326_add_docs_page_webapp_gcroci2 branch May 26, 2025 08:08
@github-project-automation github-project-automation Bot moved this to Done in dev May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add docs page about the NPLinker web-app

2 participants