pysal icon indicating copy to clipboard operation
pysal copied to clipboard

Move to single directory and auto generate/publish docs

Open sjsrey opened this issue 3 years ago • 24 comments

Currently we build the html docs out of docsrc and use a sync script to copy over to docs and publish via gh-pages:

image

It would be great to refactor this to use the gh-pages branch approach to publish and build out of a single directory.

I'm assuming this would enable the bot action to work as intended.

sjsrey avatar Jan 30 '22 18:01 sjsrey

I can see that this action is running, but where is it running from? The workflow is not showing up in the .github/workflows/ directory:

Screen Shot 2022-01-30 at 2 04 28 PM

jGaboardi avatar Jan 30 '22 19:01 jGaboardi

Ahhh maybe because I don't have access to Settings.

jGaboardi avatar Jan 30 '22 19:01 jGaboardi

Yup, that is the mystery.

sjsrey avatar Jan 30 '22 19:01 sjsrey

I'm seeing the same thing you are:

image

sjsrey avatar Jan 30 '22 19:01 sjsrey

https://github.blog/changelog/2021-12-16-github-pages-using-github-actions-for-builds-and-deployments-for-public-repositories/

sjsrey avatar Jan 30 '22 19:01 sjsrey

In spaghetti I have access to Settings/Pages, but not for PySAL. Do you see something like this?

Screen Shot 2022-01-30 at 2 12 49 PM

jGaboardi avatar Jan 30 '22 19:01 jGaboardi

Let's @knaaptime and @martinfleis in on this for potential insight.

jGaboardi avatar Jan 30 '22 19:01 jGaboardi

yes, see the top of this issue.

sjsrey avatar Jan 30 '22 19:01 sjsrey

I think the reason the docs were not getting updated (2.4 was the last version) is that I forgot to run the sync step last release. I just did a pr that has the sync #1247 which should update now.

But moving forward it would be nice to move away from this two-step docsrc -> docs dance.

sjsrey avatar Jan 30 '22 19:01 sjsrey

But moving forward it would be nice to move away from this two-step docsrc -> docs dance.

we solved this in the other packages, so this is a straightforward fix

knaaptime avatar Jan 30 '22 19:01 knaaptime

The other complication I want to address is that with the move to versioneer, I'm not quite sure how to have the right tag on the docs when we build them. This is probably another good reason to automate the doc build.

sjsrey avatar Jan 30 '22 19:01 sjsrey

I'm not quite sure how to have the right tag on the docs when we build them.

martin might have some insight. Ive seen this raised over in geopandas too

knaaptime avatar Jan 30 '22 19:01 knaaptime

the release is ready to go, but I wanted to see if we could dial in the doc build as part of the release. Ideally, we want to be able to update the docs if needed, but have the tag match the release tag.

sjsrey avatar Jan 30 '22 19:01 sjsrey

The other complication I want to address is that with the move to versioneer, I'm not quite sure how to have the right tag on the docs when we build them.

Tag the repository and run sphinx. That way you get a proper version on the docs. No commit in between.

martinfleis avatar Jan 30 '22 19:01 martinfleis

This is the problem with the current approach: image

sjsrey avatar Jan 30 '22 19:01 sjsrey

Yeah, because in the branch you are using, the latest tag is 2.2.0. And then there's 215 commits after that.

martinfleis avatar Jan 30 '22 19:01 martinfleis

I have a draft release on gh that will create the v2.6.0 tag when published.

sjsrey avatar Jan 30 '22 19:01 sjsrey

So if I publish the release, I can then update the docs and it should grab the new tag?

sjsrey avatar Jan 30 '22 19:01 sjsrey

So if I publish the release, I can then update the docs and it should grab the new tag?

Yes, that is the theory and my experience. We can always fix docs later if that won't work as expected.

martinfleis avatar Jan 30 '22 19:01 martinfleis

release action appears to work for pypi

sjsrey avatar Jan 30 '22 19:01 sjsrey

Will have to fix the version tag before pushing to pypi in that action:

image

Version is 2.6 but our badge in the description is 2.5.

sjsrey avatar Jan 30 '22 19:01 sjsrey

Version is 2.6 but our badge in the description is 2.5.

Try reloading, I see 2.6.0

martinfleis avatar Jan 30 '22 19:01 martinfleis

Might be another chance to look into #1216?

jGaboardi avatar Jan 30 '22 21:01 jGaboardi

Once #1252 is merged, the remaining thing (I think) here is to add this gh-action.

sjsrey avatar Jan 30 '22 22:01 sjsrey