Skip to content

TST: Fix doctest failures - #10874

Merged
pllim merged 2 commits into
astropy:masterfrom
pllim:fix-moar-ci
Oct 16, 2020
Merged

pllim merged 2 commits into
astropy:masterfrom
pllim:fix-moar-ci

Conversation

@pllim

@pllim pllim commented Oct 15, 2020

Copy link
Copy Markdown
Member

Description

This pull request is to fix doctest failures caused by #10848

@pllim pllim added testing Docs Bug 🔥 Critical Affects-dev PRs and issues that do not impact an existing Astropy release labels Oct 15, 2020
@pllim pllim added this to the v4.0.4 milestone Oct 15, 2020

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, the risk of the very careful [ci skip] that still ran on readthedocs and passed. So, clearly one shouldn't do that. Thanks for noticing and fixing so quickly!!

@mhvk mhvk added the zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now. label Oct 15, 2020
@pllim

pllim commented Oct 15, 2020

Copy link
Copy Markdown
Member Author

The RTD job only confirms that it can render into HTML without errors or warnings. It does not run any doctest. Hope this clarifies the matter!

@pllim

pllim commented Oct 15, 2020

Copy link
Copy Markdown
Member Author

Hmmm! Behavior change in numpy-dev . @mhvk , can you please advise?

122 Numpy array creation functions cannot be used to initialize Quantity
123 --------------------------------------------------------------------
124 Trying the following example will throw an UnitConversionError::
125 
126     >>> my_quantity = u.Quantity(1, u.m)
127     >>> np.full(10, my_quantity)  # doctest: +IGNORE_EXCEPTION_DETAIL
Expected:
    Traceback (most recent call last):
    ...
    UnitConversionError: 'm' (length) and '' (dimensionless) are not convertible
Got:
    array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
/home/travis/build/astropy/astropy/docs/known_issues.rst:127: DocTestFailure

@mhvk

mhvk commented Oct 16, 2020

Copy link
Copy Markdown
Contributor

Wow, that's interesting/weird... I guess little choice but to .. doctest-requires:: numpy<1.20 and adjust the text above, adding "on numpy before version 1.20 and ignore the unit in later versions:"

@mhvk

mhvk commented Oct 16, 2020

Copy link
Copy Markdown
Contributor

Great, thanks so much! Hopefully it will now all pass...

@eteq eteq left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM too! Ready to merge as soon as the rest of the CI passes (just another few min looks like).

@pllim
pllim merged commit 22f516b into astropy:master Oct 16, 2020
@pllim
pllim deleted the fix-moar-ci branch October 16, 2020 16:12
@pllim

pllim commented Oct 16, 2020

Copy link
Copy Markdown
Member Author

All green (even the numpy-dev job)!

eteq pushed a commit to eteq/astropy that referenced this pull request Oct 19, 2020
eteq pushed a commit that referenced this pull request Oct 19, 2020
bsipocz pushed a commit that referenced this pull request Nov 6, 2020
@bsipocz

bsipocz commented Nov 25, 2020 •

Copy link
Copy Markdown
Member

Weirdly it doesn't cause a traceback on 1.16 on the LTS branch with 32bit 3.6, so I just go ahead and ignore the output as a workaround for that branch.

(I suppose I could remove the backport, but this is almost at the bottom of the pile and would be more painful that doing a quick workaround)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects-dev PRs and issues that do not impact an existing Astropy release Bug Docs 🔥 Critical testing zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants