Move archived HTML documentation out of core repository
As discussed a few times previously offline, and most recently due to the loss of our 'Python' codebase (majority) language label at the last release (v3.14.0), it seems like we likely want to shift the older built (HTML) documentation out to a new dedicated repository, because it is bloating the repository which means it is slower to push and pull between local and remote repositories, and we'd like our codebase Python label back!
(On the topic, I've confirmed that this is why our 'Python' label went in the last release: a relevant page in the GitHub docs states:
Note that Linguist only works for repositories with fewer than 100,000 files.
and we'd just surpassed that limit with our new docs:
$ git ls-files | wc -l
100364
$ cd docs/
2_to_3_changes.html collapse_faq.html
3.0.0/ constant.html
3.0.2/ contributing.html
3.0.3/ dev/
3.0.4/ docs/
3.0.5/ .doctrees/
3.0.6/ _downloads/
3.1.0/ field_analysis.html
3.10.0/ function/
3.11.0/ function.html
3.12.0/ genindex.html
3.13.0/ _images/
3.13.1/ index.html
3.14.0/ installation.html
3.2.0/ introduction.html
3.3.0/ Makefile
3.4.0/ method/
3.5.0/ .nojekyll
3.6.0/ objects.inv
3.7.0/ performance.html
3.8.0/ recipes.html
3.9.0/ releases.html
aggregation_rules.html sample_datasets.html
analysis.html search.html
api_reference.html searchindex.js
attribute/ source/
bad-spellings _sources/
build/ spelling_wordlist_backup.txt
.buildinfo spelling_wordlist.txt
cf_conventions.html _static/
cf_data_model.html _templates/
Changelog.html tester-sades
class/ tutorial.html
classes/ visualisation.html
class.html
$ cd docs/3.14.0/
$ git ls-files | wc -l
3711
$ cd ../3.0.0
$ git ls-files | wc -l
5714
where the further commands indicate that there are OOM 1000 files per built docs directory.)
So if we move the docs out, git esp. push/pull operations will be faster, and we'll get our label back.
Suggestion
I suggest moving all 3.X[X].Y directories up to 3.12.0 (in terms of versioning number) out now to a new repository under 'NCAS-CMS' and then every time there is a new release, move out the oldest version directories, such that we always keep all built directories for the latest two major versions (i.e. 3.X.* for the present X and X-1, with the equivalent logic if we pass an epoch.).
We would then need to apply some logic so that the old built versions are still linked to and rendered by our cf-python docs page, despite the location change.
Hi Sadie, Thanks for putting this together and analysing what we've got (which is a lot!). A few comments/questions:
- The archive's
release.htmlpages will need to be modified to point to the new archive locations, as willrelease.rst. This is an easy, one-offsed-style job. - The X-1 release will have to be in the archive, so I don't think there's any need to also have it here. Am I missing something?
- What should the new repo be called, bearing in mind that it's name will appear int he URLs (i.e.
http://ncas-cms.github.io/<REPO_NAME>/).cf-python-docssprings to mind. Any other ideas?
Thanks for your thoughts, David.
The archive's release.html pages will need to be modified to point to the new archive locations, as will release.rst. This is an easy, one-off sed-style job.
That's a neat idea to connect things up. Let's do that.
The X-1 release will have to be in the archive, so I don't think there's any need to also have it here. Am I missing something?
Oh, fair enough. I guess I suggested to leave some built versions in the main repo here because it might make checking on differences across versions simpler, say to pinpoint issues or bugs that may have emerged, but that could be done easily enough if they are all in the new repo, and now after your comment I realise it will be logistically more difficult, and perhaps annoying, to have some older built docs sets left in the main repo.
So I now think (which I believe is agreeing with what you are implying is best here) that moving all of the old docs directories (3.*) out is the best approach. That would leave only the latest documentation and source under docs/ unless I am mistaken, which would make grepping for terms codebase-wide much simpler (the built HTML clogged up the grep output before).
What should the new repo be called ...
cf-python-docssprings to mind. Any other ideas?
cf-python-docs seems very natural, I like it. We could add something to clarify these are the built HTML docs only, and/or the older/non-latest only, e.g. cf-python-built-docs or cf-python-html for the former or cf-python-docs-archive or cf-python-old-docs or similar for the latter, or a combination of those extra words, but that does add letter count to the URL. I'm not sure if a longer name matters too much though as people will rarely be typing it out (at least one hopes so).
Any such name would work for me! So feel free to choose any one of those or a name along those lines (though I can initiate the repo for us if you like).
Let me quickly add since I've thought this and might forgot (though I'm not working today so won't respond further...), maybe we should also move the old built cfdm and even cfunits documentation away to this new repository, so that we can tidy those up too and be consistent across our CF Tools repositories? Then the name could be built-cf-docs or similar to reflect the wider scope.
Hi - I think it's a good idea to move the archive docs for cfdm and cfunits in a similar manner, but I think that each should have it's own repo. I favour <name>-docs, i.e. cf-python-docs, cfdm-docs, and cfunits-docs.
So I now think (which I believe is agreeing with what you are implying is best here) that moving all of the old docs directories (3.*) out is the best approach. That would leave only the latest documentation and source under docs/ unless I am mistaken
You are not - that's what I envisage, too!
but I think that each should have it's own repo. I favour
-docs, i.e. cf-python-docs, cfdm-docs, and cfunits-docs.
Fair enough, I can see there would be benefits to doing that instead of having them in the same one (that, without going to the trouble of listing them all out, could easily outweigh the cons). Let's do exactly this!
I'll get those repos created under NCAS-CMS now (if I have the privileges, if not I'll ask Ros or Andy when I see them in the office) and then I'll suggest a structuring, but it's possibly trivial if we go with the current structure of each old version having it's own directory, under the root of the repo...
OK done:
- https://github.com/NCAS-CMS/cf-python-docs
- https://github.com/NCAS-CMS/cfdm-docs
- https://github.com/NCAS-CMS/cfunits-docs
which are currently empty (except for some minimal standard community files).
I went with an MIT license because that's what we already have on the three core repos ('cf-python', etc.) so is most sensible and leaves us with no license switching complications. If you disagree then it's easy enough to change before we go final and remove the built old docs from the core repos, which I suggest we wait to do until we've copied them and pushed them as-is to the new *-docs repos and confirmed we are happy and that the release.html page redirection works.
All sounds good - thanks!
Great. In that case I'll go ahead and copy the old docs into the new repos and do the extra step you advised, namely:
The archive's release.html pages will need to be modified to point to the new archive locations, as will release.rst. This is an easy, one-off sed-style job.
in each case to hopefully get something working.
I'll let you know once that's done. Once you've confirmed you are happy and we've agreed no restructure would be useful (I'll also let you know what I think with respect to that) we can delete the old docs, at that point moved, from the core repo.