Skip to content

Package infrastructure cleanup #87

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

Merged
merged 23 commits into from
Jan 26, 2020

Conversation

astrofrog
Copy link
Collaborator

@astrofrog astrofrog commented Jan 17, 2020

This PR does the following:

  • Switches to using setup.cfg to declare most package metadata
  • Improves the tox configuration
  • Switches to the CI to Travis-only for all platforms
  • Switches the CI to use tox
  • Removes Matplotlib and Pillow as required dependencies for the plugin - there are cases where one might want to install the plugin without necessarily pulling in Matplotlib and Pillow too.
  • Remove nose dependency - this is only needed for old Matplotlib versions (<2.1). I don't think we need to explicitly disallow those versions, but people using those can always install nose manually if needed

For now I haven't dropped Python 2.7 support but we could technically do that too (though at this point it wouldn't provide many benefits)

@astrofrog astrofrog force-pushed the refactor-infrastructure branch 2 times, most recently from bfc69ba to b0eef48 Compare January 17, 2020 11:11
@astrofrog astrofrog force-pushed the refactor-infrastructure branch from b0eef48 to c19f5bf Compare January 17, 2020 11:12
@dopplershift
Copy link
Contributor

I’m curious: how does one use this plugin without matplotlib?

@bsipocz
Copy link
Contributor

bsipocz commented Jan 17, 2020

@dopplershift - one doesn't, but I think the ideas is to be able to install this plugin no matter whether mpl is around or not rather than to use the plugin (e.g. this could be added to the pytest-astropy metapackage, but we can keep on testing astropy without mpl (which is an optional dependency).

Copy link
Contributor

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Looks good, except that I think python2 can be dropped now

.travis.yml Outdated
# Test the oldest and newest configuration on Mac and Windows
- os: osx
language: c
env: PYTHON_VERSION=2.7 TOXENV=py27-test-mpl15
Copy link
Contributor

Choose a reason for hiding this comment

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

can we just drop it now?

@dopplershift
Copy link
Contributor

I’m still missing something. This feels like solving what is a downstream packaging issue by breaking pytest-mpl’s packaging. Here’s what I see:

  1. Pytest-mpl is a “plugin to facilitate image comparison for Matplotlib figures in pytest.”
  2. This PR proposes no longer requiring matplotlib
  3. User installs pytest-mpl, but gets no functionality whatsoever

I’m open to tweaking the dependencies if there are gains for our users. All I’m hearing is this makes it easier for pytest-astropy to depend on it unconditionally. I’m not seeing an argument for how our users benefit from this change—in fact, all I see is a path to where users can get non-functional environments and us getting increased support questions. So, what functionality does pytest-mpl give users if matplotlib is not installed?

@dopplershift
Copy link
Contributor

My point here is that if you don’t have functionality without matplotlib, I cease to see a reasonable argument for why matplotlib should not be listed as a dependency. I get why this might make life nice for pytest-astropy; I don’t see why it’s sound software engineering or kind to non-astropy users.

@bsipocz
Copy link
Contributor

bsipocz commented Jan 18, 2020

I agree that this is not a clear cut, but @astrofrog might have better arguments than me. For pytest-mpl I see that the users are developers, and in many cases, developers of packages that have mpl as an optional dependency. Their life would be easier if they could just list pytest-mpl as a test dependency for their packages, as keep the mpl dependency optional, also in their testing framework and CI rather than keep mpl and pytest-mpl as optional dependency for testing.

@astrofrog
Copy link
Collaborator Author

astrofrog commented Jan 20, 2020

I can see arguments both ways, but in the interest of getting the infrastructure cleanup merged in I've added back Matplotlib as a required dependency for now. Do the rest of the changes seem ok?

@bsipocz
Copy link
Contributor

bsipocz commented Jan 21, 2020

My only comment is to drop python2, as part of the cleanup.

@astrofrog
Copy link
Collaborator Author

I've dropped Python 2.7 and 3.5, as well as Matplotlib 1.5.

Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Looks good. Merge if you think this is done.

@astrofrog
Copy link
Collaborator Author

@dopplershift - thanks! I'm happy with it as-is, so will merge now.

@astrofrog astrofrog merged commit b0783eb into matplotlib:master Jan 26, 2020
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.

3 participants