allenai / ir_datasets

Provides a common interface to many IR ranking datasets.
https://ir-datasets.com/
Apache License 2.0
318 stars 42 forks source link

documentation site master, versions, etc. #34

Closed seanmacavaney closed 3 years ago

seanmacavaney commented 3 years ago

Right now, https://ir-datasets.com/ shows everything on the master branch. This is problematic because it can be out-of-sync with the version that's released on pypi. It also means that it's difficult to look up documentation for a previous version of the package.

One option would be to hold off on putting anything into master until it's ready to be pushed to pypi. We could have a "staging" or "working" branch that then gets pushed to master when ready for a release. But this doesn't handle past versions, and it means it wouldn't be possible to check the documentation for the version on staging.

Another would be to store and build up multiple directories representing prior versions. Would look like:

/index.html
/all.html
/antique.html
...
/v0.0.1/index.html
/v0.0.1/all.html
/v0.0.1/antique.html
...
/v0.1.7/index.html
/v0.1.7/all.html
/v0.1.7/antique.html
...
/development/index.html
/development/all.html
/development/antique.html
...

We could instruct search engines to ignore v0.0.1/, v0.1.7/, development/*, etc. so people don't accidentally land on those pages. And put a banner at the top of them warning the user that they are viewing the documentation for a particular version.

The ir_datasets documentation command could be updated to write to docs/development/ by default and allow writing to the base and/or version directory with a certain argument.

There could be a section at the bottom of the main page that gives links to the different versions if somebody is seeking them out.

Should probably add a note at the version lines in setup and init to remind the person to build the documentation in a certain way when preparing a release. Might be able to automate this, but tbh it's not so difficult and probably more hassle than it's worth.