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

adding self-build of docs (publishes to gh-pages branch) #122

Merged
merged 6 commits into from
Apr 12, 2024
Merged

Conversation

bmaranville
Copy link
Contributor

We can build the docs ourselves instead of using readthedocs, which is an external point of failure.

This will make it easier to maintain and debug the documentation build (all code owners have access)

@arm61
Copy link
Contributor

arm61 commented Feb 23, 2024

I think this is a better option, that all devs will have an access to, compared to the readthedocs.

@bmaranville
Copy link
Contributor Author

It's not quite working yet - the module documentation is not being generated for some reason.

@bmaranville
Copy link
Contributor Author

Ok, it's working now - see test build from this configuration at https://bmaranville.github.io/orsopy/

@andyfaff
Copy link
Contributor

What will the URL be? Will it conflict with https://github.com/reflectivity/reflectivity.github.io?

@bmaranville
Copy link
Contributor Author

By default, the new url would be https://reflectivity.github.io/orsopy , which seems to be automatically redirected to https://www.reflectometry.org/orsopy (currently resulting in a 404). We might have to fiddle with the settings on the redirects.

@andyfaff
Copy link
Contributor

I think it's mergeable once the redirects are sorted. Who do we ask about that?

@bmaranville
Copy link
Contributor Author

bmaranville commented Feb 29, 2024

Actually it looks like it will work just fine - we will probably want to avoid making a folder called orsopy/ in our main website repo just to avoid conflicts. I uploaded a stub index.html to a new gh-pages branch on orsopy, and turned on github pages, and it is working.
See: https://www.reflectometry.org/orsopy

Discussion on folder vs. subrepo conflict: TL;DR: subrepo wins https://stackoverflow.com/a/26760818

@bmaranville
Copy link
Contributor Author

I think it's mergeable once the redirects are sorted. Who do we ask about that?

You ask your delegated representative in the International Scattering Alliance, who is happy to help. Also, it's me.

Copy link
Collaborator

@aglavic aglavic left a comment

Choose a reason for hiding this comment

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

Great you got this going so quickly.

on:
push:
branches:
- main
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we want to build it on every commit to main. The docs should be up-to-date with the latest released version to avoid confusion. This can be done the same way as we do with the PyPI release, based on the tag of the commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That seems like a good idea. Do we also need to add a test that tries to build the docs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think so, the github action should show us if the build fails and you can still allow manual build.

@arm61
Copy link
Contributor

arm61 commented Apr 9, 2024

Is this ready to merge?

@bmaranville
Copy link
Contributor Author

Yes, I think it's ready to merge.

@arm61
Copy link
Contributor

arm61 commented Apr 10, 2024

Do we know why the tests aren't passing?

@andyfaff
Copy link
Contributor

There was a coverage timeout

@arm61
Copy link
Contributor

arm61 commented Apr 10, 2024

That's what I thought. I don't have the power to tell Github to rerun them though, does someone have that power?

@bmaranville
Copy link
Contributor Author

bmaranville commented Apr 10, 2024

I did rerun them... they still failed. I will try again. I don't completely understand why there is a service we are uploading files to... isn't there an equivalent test that can run natively on Github Actions?

EDIT: I guess I can't re-run them. Never mind.

@arm61
Copy link
Contributor

arm61 commented Apr 11, 2024

The service gives a nice visualisation of the coverage. It isn’t 100% required, but nice to have and I don’t think it can be mirrored on GitHub actions.

@bmaranville
Copy link
Contributor Author

I have to say I really don't understand what is happening with the coveralls check... I copied the self-build-docs branch to my forked orsopy repository, created a pull request from it, and changed the pytest check so that coveralls runs for the forked repo, and it ran fine. Tests all passed.

Why is it not running here? Why the 422 error? Mysteries.

@arm61
Copy link
Contributor

arm61 commented Apr 12, 2024

Let's merge this as is and then I will remove the coveralls thing from the Github action cause it is just a faff.

@arm61 arm61 merged commit c74eed2 into main Apr 12, 2024
14 of 18 checks passed
@bmaranville
Copy link
Contributor Author

Hey, it worked! Check out https://www.reflectometry.org/orsopy/

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.

None yet

4 participants