Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Documentation: Pip installable environment and build instructions #498

Merged
merged 13 commits into from May 5, 2022

Conversation

h-mayorquin
Copy link
Collaborator

@h-mayorquin h-mayorquin commented May 4, 2022

As we did for the testing, I am adding a pip installable environment for the documentation. Also, adding instructions in how to build the documentation locally to the readme file.

Edit:
This is failing the build in read the docs. @CodyCBakerPhD, @bendichter can I get admin rights over there to check and understand the build process? This will also be useful for #495 .

@h-mayorquin h-mayorquin self-assigned this May 4, 2022
@h-mayorquin h-mayorquin added documentation Improvements or additions to documentation high priority currently blocking an issue in another project. That issue should be referenced dependencies Pull requests that update a dependency file labels May 4, 2022
bendichter
bendichter previously approved these changes May 4, 2022
Copy link
Collaborator

@bendichter bendichter left a comment

Choose a reason for hiding this comment

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

looks great

@CodyCBakerPhD
Copy link
Member

The traceback at https://readthedocs.org/projects/nwb-conversion-tools/builds/16820312/ has the entire collection of workflow actions and outputs, which cannot be altered.

The only thing we can control as far as dependencies is what goes into the requirement-rtd.txt folder, which it uses when calling pip install -r requirements-rtd.txt right before pip install .

We can technically allow access to the 'global site-packages' on readthedocs, which is essentially all of the most recent versions of the most common deps, but I advise against this since it can cause many dependency conflicts. We can also disable the installation of the package altogether, but that seems the opposite of what we want to do here.

@CodyCBakerPhD
Copy link
Member

@h-mayorquin So basically, if you want to fix the docs build (necessary before merging), I'd suggest restoring the state of the requirements-rtd.txt, which has been configured to what the readthedocs CI currently requires.

Note that as of today the ephy testing data issued a new hash which triggered cache updates, which triggered an issue with the MacOS latest version of git-annex. Some basic attempts to fix it have failed so I'll just raise an issue and work on it elsewhere - temporarily disabling full tests on Mac until then.

@h-mayorquin
Copy link
Collaborator Author

The traceback at https://readthedocs.org/projects/nwb-conversion-tools/builds/16820312/ has the entire collection of workflow actions and outputs, which cannot be altered.

Yup, I am aware of this.

The only thing we can control as far as dependencies is what goes into the requirement-rtd.txt folder, which it uses when calling pip install -r requirements-rtd.txt right before pip install .

We can technically allow access to the 'global site-packages' on readthedocs, which is essentially all of the most recent versions of the most common deps, but I advise against this since it can cause many dependency conflicts. We can also disable the installation of the package altogether, but that seems the opposite of what we want to do here.

So in the advanced seetings, we have requirements file pointed to requirements-rdt.txt. Do we have the install project option activated?
image

By looking at the trace it seems that we do.

@h-mayorquin
Copy link
Collaborator Author

h-mayorquin commented May 5, 2022

@h-mayorquin So basically, if you want to fix the docs build (necessary before merging), I'd suggest restoring the state of the requirements-rtd.txt, which has been configured to what the readthedocs CI currently requires.

Check out the configuration file that I added.

python:
install:
- requirements: requirements-minimal.txt
- method: pip
path: .
extra_requirements:
- docs

It seems that it gives us enough control of the build so we can reproduce what we do locally. This does not require access to the global site-packages which is what you wanted to avoid.

I think this is good because it allows us to eliminate the hard-coded duplication of dependencies that we had in requirements-rdt.txt. That is, we only need to specify the dependencies in the requirements-minimal.txt avoiding duplication.

Note that as of today the ephy testing data issued a new hash which triggered cache updates, which triggered an issue with the MacOS latest version of git-annex. Some basic attempts to fix it have failed so I'll just raise an issue and work on it elsewhere - temporarily disabling full tests on Mac until then.

Is always the MacOS, eh?

@CodyCBakerPhD CodyCBakerPhD merged commit 543c089 into main May 5, 2022
@CodyCBakerPhD CodyCBakerPhD deleted the add_documentation_installing_model branch May 5, 2022 15:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation high priority currently blocking an issue in another project. That issue should be referenced
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants