Skip to content

Add gitlab version for deploying sphinx doc - #349

Draft
mmesiti wants to merge 3 commits into
coderefinery:mainfrom
mmesiti:gitlab-ci-1
Draft

mmesiti wants to merge 3 commits into
coderefinery:mainfrom
mmesiti:gitlab-ci-1

Conversation

@mmesiti

@mmesiti mmesiti commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

from https://github.com/mmesiti/cr-best-practices-in-rse/blob/98b7940782ff1c3cdfb55a433e9d60f735b8f94c/content/gh_workflow.md

Addresses #342

Should go in the direction of coderefinery/git-intro#535

Update: Discovered that the #2 exercise is actually not compatible with the GitLab track. @bast 's suggestion fixes this, rebased this branch on top of #351 . Merging this would also merge #351, so changing this to draft until #351 is merged.

@bast

bast commented Sep 23, 2026

Copy link
Copy Markdown
Member

Comment thread content/gh_workflow.md
## Alternatives to GitHub and GitLab Pages

- [Read the Docs](https://readthedocs.org) is the most common alternative to
hosting in GitHub Pages.

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.

Suggested change
hosting in GitHub Pages.
the two solutions presented above.

@bast

bast commented Sep 23, 2026

Copy link
Copy Markdown
Member

One thing I would suggest to improve is that the workflow recipes install from a requirements.txt or environment.yml instead of listing the dependencies explicitly. But I know that your PR here did not introduce this so perhaps it should not need to fix it.

Motivation for rather using requirements.txt/environment.yml:

  • It connects better to the reproducibility lesson.
  • For local preview, a programmer will have to install these anyway and then hopefully from files like requirements.txt/environment.yml.
  • And if they need such files anyway, there is less risk to accidentally break the Pages version if both use a consistent dependency list.

But this can become its own issue and does not have to delay this PR.

@mmesiti

mmesiti commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

One thing I would suggest to improve is that the workflow recipes install from a requirements.txt or environment.yml instead of listing the dependencies explicitly. But I know that your PR here did not introduce this so perhaps it should not need to fix it.

Motivation for rather using requirements.txt/environment.yml:

* It connects better to the reproducibility lesson.

* For local preview, a programmer will have to install these anyway and then hopefully from files like requirements.txt/environment.yml.

* And if they need such files anyway, there is less risk to accidentally break the Pages version if both use a consistent dependency list.

But this can become its own issue and does not have to delay this PR.

I think it would be better but

  • this would require changing also the template repo and add the requirements.txt there, so it's a multi-repo change
  • this would be good to do also for the github version that deserves its own issue/

Edit: added #351 and issues/PRs therein

Updated the workflow to install dependencies from requirements.txt instead of hardcoding them. 

Also, Added instructions about changing requirements.txt adding sphinx-autodoc2 and myst-nb packages in the relevant exercises.
@mmesiti
mmesiti marked this pull request as draft September 24, 2026 18:28
@mmesiti

mmesiti commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Changed to draft because Discovered that the GH-2 exercise is actually not compatible with the GitLab track.

Interestingly, if we merged #351 first, we would not have this problem, since the environment setup would be delegated requirements.txt, so we don't have to change anything workflow/pipeline definition files.

Rebasing this onto #351

@mmesiti

mmesiti commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

One thing I would suggest to improve is that the workflow recipes install from a requirements.txt or environment.yml instead of listing the dependencies explicitly.

Turns out this was a smell with interesting consequences :-)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants