Skip to content

Added pull request build #102

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

Merged
merged 24 commits into from
Feb 18, 2025
Merged

Added pull request build #102

merged 24 commits into from
Feb 18, 2025

Conversation

Tom-van-Woudenberg
Copy link
Member

No description provided.

@Tom-van-Woudenberg Tom-van-Woudenberg marked this pull request as ready for review February 14, 2025 16:32
@Tom-van-Woudenberg
Copy link
Member Author

Adds documentation to manual: https://teachbooks.io/manual/pull_request_BTD/features/pull_request_build.html

Replaces extension of deploy-book-workflow: TeachBooks/deploy-book-workflow#73

@moorepants, indeed easy to set up!

@rlanzafame, fancy reviewing this?

Afterwards, it deserves a post on the website.

@moorepants
Copy link

Nice!

Copy link
Member

@rlanzafame rlanzafame left a comment

Choose a reason for hiding this comment

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

Looks good! A few comments/questions though:

  1. Can you provide a set of example links to illustrate? If you give me links I can update text. I presume given the screenshot you have it set up for the Manual? I have no way to find it and I gave up trying to guess the link.
  2. I added RTD to my account but can't see anything related to TeachBooks...do you still need to add me to the RTD Project for the Manual?
  3. Why can't we use the APA extension? It looks like the problem could be that you use jupyter book to build the book instead of teachbooks, which handles the manual file transfer. I can change it, but then I did not see the config.py file that is needed for the config sphinx part...is that in RTD? Is that why we can't use the APA thing?
  4. The first paragraph made me realize we need to add a bit more "meat" to the Git explanation to include PR and fork descriptions improve git chapter, specifically forks and PR's #103

@Tom-van-Woudenberg
Copy link
Member Author

Looks good! A few comments/questions though:

  1. Can you provide a set of example links to illustrate? If you give me links I can update text. I presume given the screenshot you have it set up for the Manual? I have no way to find it and I gave up trying to guess the link.

I couldn't set it up for the manual because it has those local extensions. I think the conversion from _config.yml to conf.py doesn't support local extensions (although I could be mistaken).

Another example is here: CIEM5000-2025/book#5. But maybe it would be better to have a dedicated example book in teachbook org which allows people to fork to test it themselves too.

  1. I added RTD to my account but can't see anything related to TeachBooks...do you still need to add me to the RTD Project for the Manual?

So the project doesn't exist and yes I need to add you manually in RTD if it would exist.

  1. Why can't we use the APA extension? It looks like the problem could be that you use jupyter book to build the book instead of teachbooks, which handles the manual file transfer. I can change it, but then I did not see the config.py file that is needed for the config sphinx part...is that in RTD? Is that why we can't use the APA thing?

Is teavhbooks required for the applications in _ext? I don't use jupyter book to build the book, just to make the conf.py file. After that, RTD uses it's sphinx option to build the book

@rlanzafame
Copy link
Member

  1. I still don't know how to find the RTD pages for the book that you sent.
  2. Yes, good idea to set up something that can be forked - maybe you can set up something that would be useful for a teacher and i can be the tester? github.com/teachbooks/rtd-example?
  3. Ahhh so you convert your book to a sphinx book and RTD does the rest. It's like the reverse process of Jason's book, cool. It is definitely possible to use the APA thing with RTD then; the question is whether I need to add a small change to the teachbooks package to help facilitate it. Maybe I can try this out on the test book.

@moorepants
Copy link

For every primary book repository, the owner of that repository would have to connect it to read the docs and set the setting in read the docs to "build previews on pull requests". You'd have to have to have a RTD configuration file also, so that all the teachbooks tooling is available for the RTD builds. After all that, when anyone opens a PR on the primary repository, it should show the preview build in the CI check list (when green check you can click and open the preview website).

@Tom-van-Woudenberg
Copy link
Member Author

  1. I still don't know how to find the RTD pages for the book that you sent.

Here: image, leading to https://ciem5000--5.org.readthedocs.build/5/intro.html

  1. Yes, good idea to set up something that can be forked - maybe you can set up something that would be useful for a teacher and i can be the tester? github.com/teachbooks/rtd-example?

Done: https://github.com/TeachBooks/Read-the-Docs-example-book, including reference to it in this branch

  1. Ahhh so you convert your book to a sphinx book and RTD does the rest. It's like the reverse process of Jason's book, cool. It is definitely possible to use the APA thing with RTD then; the question is whether I need to add a small change to the teachbooks package to help facilitate it. Maybe I can try this out on the test book.

Teachbooks is not used with read-the-docs and I doubt it whether it's possible to do so. You could run the 'process only' option of TeachBooks as a 'pre-build' step thought. I think the problem is that jupyter-book config sphinx book/ doensn't convert the local_extensions part of the config, but I'm not sure.

@Tom-van-Woudenberg
Copy link
Member Author

For every primary book repository, the owner of that repository would have to connect it to read the docs and set the setting in read the docs to "build previews on pull requests". You'd have to have to have a RTD configuration file also, so that all the teachbooks tooling is available for the RTD builds. After all that, when anyone opens a PR on the primary repository, it should show the preview build in the CI check list (when green check you can click and open the preview website).

Yes, this is all explained on this page in the manual :)

@rlanzafame
Copy link
Member

OK I think that wraps it up for now. the last text changes describes how we haven't checked the APA/local extensions thing but that it should be possible. I set it up as an issue for later TeachBooks/Read-the-Docs-example-book#3

Copy link
Member

@rlanzafame rlanzafame left a comment

Choose a reason for hiding this comment

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

Hey @Tom-van-Woudenberg I'm done! I'll leave the final button-pushing to you in case you want to read the additions I made one more time

In theory this should work with the TeachBooks Python package `teachbooks` as well as local extensions (e.g., those in `book/_ext` like [](./apa.md)), but we have not checked this yet. If you are interested, try setting it up as a PR related to [this issue](https://github.com/TeachBooks/Read-the-Docs-example-book/issues/3).

```{tip}
Once set up, this tool is only accessible via the Pull Request page for a repository in the 'Checks' part of the automated rule set box (illustrated below). This is different from our deploy-book-workflow, which is accessed
Copy link
Member Author

Choose a reason for hiding this comment

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

@rlanzafame , this part is not finished, what do you mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

After this you can merge!

@rlanzafame rlanzafame merged commit eecdd50 into release Feb 18, 2025
4 checks passed
@rlanzafame rlanzafame deleted the pull_request_BTD branch February 18, 2025 04:05
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.

3 participants