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

Revert to single-line command for doctr invocation. #3578

Closed
wants to merge 1 commit into from

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Dec 4, 2019

Another go at fixing #3542
Since #3577 seems to have been bugged.

@pp-mo pp-mo added this to the v3.0.0 milestone Dec 4, 2019
@pp-mo pp-mo requested a review from bjlittle December 4, 2019 14:08
@pp-mo pp-mo mentioned this pull request Dec 4, 2019
2 tasks
@@ -171,8 +171,7 @@ script:
# When we merge a change to SciTools/iris, we can push docs to github pages.
# At present, only the Python 3.7 "doctest" job does this.
# Results appear at https://scitools-docs.github.io/iris/<<branchname>>/index.html
- >
if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then
- if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then
Copy link
Member

@lbdreyer lbdreyer Dec 4, 2019

Choose a reason for hiding this comment

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

It seems strange the > doesn't work.
Have you tested that this line would now work?

Copy link
Member Author

@pp-mo pp-mo Dec 4, 2019

Choose a reason for hiding this comment

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

The ">" form seems to leave newlines in it (or possibly carriage-returns, if there is a line-end problem??).
So testing with the yaml package, I get...

>>> with open('.travis.yml') as fo:
...   data = yaml.safe_load(fo)
... 
>>> print(data['script'][-1])
if [[ "${ORG}" == 'SciTools' && "${TRAVIS_EVENT_TYPE}" == 'push' && "${PUSH_BUILT_DOCS}" == 'true' ]]; then
  cd ${INSTALL_DIR};
  pip install doctr;
  doctr deploy --deploy-repo SciTools-docs/iris --built-docs docs/iris/build/html
    --key-path .github/deploy_key.scitools-docs.enc
    --no-require-master
    ${TRAVIS_BRANCH:-${TRAVIS_TAG}};
fi

>>> # definitely newlines ...
>>> print(repr(data['script'][-1]))
'if [[ "${ORG}" == \'SciTools\' && "${TRAVIS_EVENT_TYPE}" == \'push\' && "${PUSH_BUILT_DOCS}" == \'true\' ]]; then\n  cd ${INSTALL_DIR};\n  pip install doctr;\n  doctr deploy --deploy-repo SciTools-docs/iris --built-docs docs/iris/build/html\n    --key-path .github/deploy_key.scitools-docs.enc\n    --no-require-master\n    ${TRAVIS_BRANCH:-${TRAVIS_TAG}};\nfi\n'
>>> 

I don't really get this. The ">" form is supposed to "fold" lines + remove newlines, but here we definitely got embedded newlines.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have you tested that this line would now work?

No. It's hard to do unless it's running in the right repository.
In principle, merging to a feature branch might work (which is what Scitools/iris/pushdocs_test was for). I may try that ...

@pp-mo
Copy link
Member Author

pp-mo commented Dec 4, 2019

Hi @lbdreyer
Restarted build, which crashed for some reason?

Tested on separate "feature" branch : it works at last !! 🚀
See 'pushdocs_trial' branch docs here

@pp-mo pp-mo closed this Dec 4, 2019
@pp-mo pp-mo mentioned this pull request Dec 4, 2019
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.

2 participants