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

Update to build docs locally #280

Merged
merged 5 commits into from Oct 31, 2019
Merged

Update to build docs locally #280

merged 5 commits into from Oct 31, 2019

Conversation

znicholls
Copy link
Collaborator

@znicholls znicholls commented Oct 30, 2019

In response to #278 and supercedes #279

closes #278

@znicholls
Copy link
Collaborator Author

thanks @danielhuppmann, I just updated the docs requirements (I think). The setup.py issue seems to come from somewhere else (it's also in https://pyam-iamc.readthedocs.io/en/latest/install.html), @gidden any ideas how to fix that one?

@coveralls
Copy link

coveralls commented Oct 30, 2019

Coverage Status

Coverage decreased (-5.7%) to 85.333% when pulling 7d6b7ef on docs-requirements-makefile into ac7caa0 on master.

@gidden
Copy link
Member

gidden commented Oct 31, 2019

restarted travis, this was an iiasa conneciton issue.

And https://pyam-iamc.readthedocs.io/en/docs-requirements-makefile/ LGTM!!

@gidden
Copy link
Member

gidden commented Oct 31, 2019

I see now the setup.py issue.. let me look

@gidden
Copy link
Member

gidden commented Oct 31, 2019

Maybe we can confirm with something like from setup import REQUIREMENTS. At what point did this break? do we know?

@znicholls
Copy link
Collaborator Author

znicholls commented Oct 31, 2019 via email

@gidden
Copy link
Member

gidden commented Oct 31, 2019

Just talked to @khaeru. His suggestion is that RTD does not guarantee the same locality. We should try to change

.. program-output:: python -c 'import sys; sys.path.append("../.."); import setup; print("\n".join([r for r in setup.REQUIREMENTS]))'

to something like (and this is getting rather long..)

.. program-output:: python -c 'import sys, os; sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../..")); import setup; print("\n".join([r for r in setup.REQUIREMENTS]))'

Basically, we need to make sure the import is relative to this file location. If that doesn't work, I'm not sure what is best to do... also trying this now on iiasa/aneris

@gidden
Copy link
Member

gidden commented Oct 31, 2019

Hi all - this approach has failed for me (there is no __file__ attribute for a subprocess call.

I am testing the setup.py version on aneris: https://readthedocs.org/projects/aneris/builds/9889492/

My work around for the moment is to read directly from ci/environment-conda-default.txt. I have no idea why that approach works but importing setup.py does not..

@gidden
Copy link
Member

gidden commented Oct 31, 2019

I am now uber confused. Reading direct from setup.py on RTD is a success for aneris: https://aneris.readthedocs.io/en/test-read-from-setup/install.html

@znicholls
Copy link
Collaborator Author

znicholls commented Oct 31, 2019 via email

@danielhuppmann
Copy link
Member

see this output when trying to use from setup import REQUIREMENTS: https://pyam-iamc.readthedocs.io/en/docs-test-rtd/install.html

Seems it's looking for setup.py in /home/docs/checkouts/readthedocs.org/user_builds/pyam-iamc/conda/docs-test-rtd/lib/python3.7/site-packages/

@danielhuppmann
Copy link
Member

I guess it's iterating over PATH and taking the first setup.py that it can find?

@danielhuppmann
Copy link
Member

got it in https://github.com/IAMconsortium/pyam/tree/docs-test-rtd (no idea why it's working differently from aneris).

@znicholls, as this branch is on the org repo, I took the liberty of committing the fix directly

@znicholls
Copy link
Collaborator Author

@znicholls, as this branch is on the org repo, I took the liberty of committing the fix directly

perfect that was the hope!

doc/source/install.rst Outdated Show resolved Hide resolved
@danielhuppmann
Copy link
Member

One more question - we have a hard requirement for matplotlib==3.0.2 in the docs, but no version specification in setup.py. There is some indication that unit tests fail with version 3.1.x (but not rigorously tested). Should we add the version specification as part of this PR to be safe for the release?

@gidden
Copy link
Member

gidden commented Oct 31, 2019

we can add matplotlib>3.1?

@danielhuppmann
Copy link
Member

we can add matplotlib>3.1?

It would have to be matplotlib<3.1. See the brand-new #281.

@gidden
Copy link
Member

gidden commented Oct 31, 2019

thanks guys!

@gidden gidden merged commit b30cc62 into master Oct 31, 2019
@gidden gidden deleted the docs-requirements-makefile branch October 31, 2019 16:13
khaeru added a commit to khaeru/message_ix that referenced this pull request Nov 1, 2019
khaeru added a commit to iiasa/message_ix that referenced this pull request Nov 1, 2019
Main changes:

- Add message_ix.models module
- Adjust tools.add_year for ixmp API changes
- Add Scenario._backend, .years_active; delete .remove_solution
- Delete Scenario.clone
- Use Backend.ms_cat_set_elements
- Use Backend.ms_* methods; remove Scenario._jobj shim
- Re-add thin Scenario.clone() wrapper
- Adjust docs cross-reference to ixmp
- Convert Path to str in message_ix.cli
- Provide firstmodelyear using Scenario.cat
- Update RELEASE_NOTES
- Coerce to int in Scenario.firstmodelyear
- Remove Scenario._backend (now handled by ixmp)
- Adjust add_par signature in testing.make_westeros
- Compute years_active in Scenario, rather than using backend
- Update documentation; remove parallel copy of ixmp API docs
- Move CPLEX optfile code to MESSAGE class; adjust docs
- Fix small docs typos
- Further docs improvements; remove _init_scenario (no-op)
- Proofread docs and comments
- Update API docs per @gidden reivew
- Further improve API docs

Tidy CI files per ixmp:

- Fix pip VCS URLs
- Update Travis caching and env.sh
- Update ci/requirements.txt
- Add ci/appveyor-install.ps1 to echo ixmp
- On AppVeyor, update pip using conda
- On Travis, update pip using conda
- Add numpy to explicit requirements
- Add conda info to Travis for debugging
- Travis: install dependencies using conda
- Split requirements.txt
- Give conda --yes
- Add pip to testing conda env
- Install conda-requirements into testing conda env
- Install pip-requirements into testing conda environment
- Update doc/requirements.txt
- Add to conda-requirements
- Move JPype, pint, plotnine from conda-req to pip-req
- Return JPype to conda-req as JPype1
- Append conda-forge to default channels for JPype
- Adjust coveragerc
- Return CI to ixmp@master
- Work around IAMconsortium/pyam#280 / IAMconsortium/pyam#281
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.

inconsisting requirements for building the docs locally
4 participants