Skip to content

WIP: testing module importability without optional dependencies#7952

Closed
bsipocz wants to merge 1 commit intoastropy:masterfrom
bsipocz:travis_test_import
Closed

WIP: testing module importability without optional dependencies#7952
bsipocz wants to merge 1 commit intoastropy:masterfrom
bsipocz:travis_test_import

Conversation

@bsipocz
Copy link
Member

@bsipocz bsipocz commented Oct 23, 2018

DO NOT MERGE

To close #7939

Locally it doesn't pass, but we can discuss what is OK to be skipped for these tests and what needs fixing.

@astropy-bot
Copy link

astropy-bot bot commented Oct 23, 2018

Hi there @bsipocz 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

I see this is a work in progress pull request. I'll report back on the checks once the PR is ready for review.

If there are any issues with this message, please report them here.

@pllim pllim changed the title WIP: testing the testing infrastucture WIP: testing the testing infrastructure Oct 23, 2018
@pllim
Copy link
Member

pllim commented Oct 23, 2018

Is it just me, or Travis CI not showing up?

@bsipocz
Copy link
Member Author

bsipocz commented Oct 23, 2018

the yaml file is messed up atm, I'm trying to multitask fix it. Also note that this points to my fork ci-helpers, so do not merge in any case.

@bsipocz
Copy link
Member Author

bsipocz commented Oct 23, 2018

this is failing horridly due to all kind of unrelated numpy issues, but if you into the travis details this build is the only relevant here:

https://travis-ci.org/astropy/astropy/jobs/445288366

@bsipocz bsipocz force-pushed the travis_test_import branch 3 times, most recently from 543e50d to 22ccc3a Compare October 24, 2018 06:26
@bsipocz bsipocz force-pushed the travis_test_import branch 8 times, most recently from d856ab6 to 2344e5f Compare November 1, 2018 00:10
@bsipocz bsipocz changed the title WIP: testing the testing infrastructure WIP: testing module importability without optional dependencies Nov 1, 2018
@bsipocz bsipocz force-pushed the travis_test_import branch 2 times, most recently from 4b903b7 to 853df54 Compare November 1, 2018 00:33
@bsipocz
Copy link
Member Author

bsipocz commented Nov 2, 2018

Can I have feedbacks on this (mainly the infrastructure, do we want to have other ways to specify what not to try to import, etc.), so we can move forward and see whether there is any modules that need some extra fixing before the RC.

@pllim
Copy link
Member

pllim commented Nov 2, 2018

https://travis-ci.org/astropy/astropy/builds/449134809 reported ImportError on 18 modules but it is unclear why. Some of those don't look like they have pytest dependencies...?

@pllim
Copy link
Member

pllim commented Nov 2, 2018

Looks like the error messages are collected but not reported:

https://github.com/bsipocz/ci-helpers/blob/e89474b49305123ebdddb994d45aeeb65b8619dd/utils/import_submodules.py#L61

@bsipocz
Copy link
Member Author

bsipocz commented Nov 2, 2018

@pllim - I tried the other way, but there are so many that it seemed a bit useless to print all as an error, but it's not at all a preference, I'm happy to change the script.

Also, I'm not exactly sure why numpy is picked up from the compatibility module, the stuff it reports is not even in there.

@pllim
Copy link
Member

pllim commented Nov 2, 2018

I think the recursive import is too recursive? For example, maybe when the module does from numpy import ..., it goes into numpy and so on.

@pllim
Copy link
Member

pllim commented Nov 2, 2018

p.s. Can probably exclude things like setup_package.py from import test. Not sure why wcsaxes failed though.

@bsipocz bsipocz force-pushed the travis_test_import branch from 8f497f4 to 63c0299 Compare November 4, 2018 06:40
@bsipocz bsipocz added this to the v3.2.2 milestone Jun 15, 2019
@bsipocz bsipocz modified the milestones: v3.2.2, v4.0 Sep 27, 2019
@bsipocz bsipocz modified the milestones: v4.0, v4.0.1 Oct 24, 2019
@astropy-bot
Copy link

astropy-bot bot commented Nov 17, 2019

Hi humans 👋 - this pull request hasn't had any new commits for approximately 5 months. I plan to close this in a month if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@bsipocz
Copy link
Member Author

bsipocz commented Mar 27, 2020

OK, so I suppose this now needs to be added to one of the pipelines, e.g. on circleCI. What do you think @astrofrog?

(as well as fix the remaining failures)

@bsipocz bsipocz modified the milestones: v4.0.2, v4.1 Mar 27, 2020
@astrofrog
Copy link
Member

I would add this to Travis unless there is a good reason to add it to CircleCI. Instead of using wget, could you use urlretrieve in a python -c call so that it works on all platforms?

@bsipocz
Copy link
Member Author

bsipocz commented Mar 27, 2020

My only reason for circleCI was that this ideally could live in a pipeline. First run this, then install the test dependencies without the need to rebuild astropy.

I can certainly factor out wget, but didn't think we want to run it in other platforms. Arguably the script would work, but I haven't tested it on windows.

@astrofrog
Copy link
Member

So coming back to this, I wonder whether actually having #10358 is sufficient? Essentially the doctest collection triggers an import of every module and will complain if an import doesn't work, and also is able to take into account special cases as specified in the setup.cfg. So maybe we have accidentally solved this issue and don't need an additional set of tests?

@astropy-bot
Copy link

astropy-bot bot commented Aug 29, 2020

Hi humans 👋 - this pull request hasn't had any new commits for approximately 5 months. I plan to close this in a month if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@astropy-bot astropy-bot bot added the closed-by-bot Closed by stale bot label Sep 30, 2020
@astropy-bot
Copy link

astropy-bot bot commented Sep 30, 2020

I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks!

If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here.

@astropy-bot astropy-bot bot closed this Sep 30, 2020
@bsipocz bsipocz modified the milestones: v4.1.1, v4.2 Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an import-only test matrix entry

4 participants