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

Iron out which minimum dependency versions, exactly, are needed #42

Closed
fedarko opened this issue Feb 14, 2019 · 4 comments
Closed

Iron out which minimum dependency versions, exactly, are needed #42

fedarko opened this issue Feb 14, 2019 · 4 comments
Assignees
Labels
administrative Logistical matters that don't have much or anything to do with code

Comments

@fedarko
Copy link
Collaborator

fedarko commented Feb 14, 2019

Current dependencies (for which this is a concern):

  • altair
  • biom-format
  • click
  • pandas
  • pytest (not necessarily required, but I think this is a good idea to require anyway so the user can verify their installation is working if desired)
    • update: this, pytest-cov, flake8, and black can be saved as dev requirements in setup.py
  • scikit-bio
  • numpy

To get context about how each of these libraries are used within rankratioviz, you can navigate to the root directory of the repo and run grep -ri "alt\." * -A 2, where alt is just the name of the module as imported (e.g. skbio for scikit-bio, or pd for pandas). The -A option can be configured to show context after matching occurrences, which helps us figure out what not only what module functions are called but what arguments of these functions are used. This isn't a perfect overview of things -- e.g. if a "from [module] import [thing]" command is used this won't catch that, or if you declare an object of type [module.thing] then this won't show all the ways that object is used -- but it's a solid start.

(also, note that that search command might fail if you somehow invoke a module on one line and then invoke its function on the next line -- is that even doable in python? -- but we're following flake8 on this project so i don't think that'll happen here)

@fedarko fedarko added the administrative Logistical matters that don't have much or anything to do with code label Feb 14, 2019
@fedarko fedarko self-assigned this Feb 14, 2019
@fedarko
Copy link
Collaborator Author

fedarko commented Feb 14, 2019

Altair

  • Vega-Lite output version
  • Chart, X, Y, Color, Scale, value should all be available
  • Should be at least v3.1.0, I think.

biom-format

  • Interoperability with all biom files that could possibly be used here? By specifying the [hdf5] extra functionality, I think that covers it.

click

  • as long as it works this doesn't really matter I guess

pandas

  • Series, (Sparse)DataFrame, Index, merge, read_csv, isna, .testing.assert_frame_equal, .errors.ParserError, to_numeric, creation of a DF from scipy sparse matrix data
  • biom's minimum version of pandas is >= 0.20.0 fyi
  • looks like 0.20.1 should be a reasonable minimum

pytest

  • There was a breaking bug introduced in version 4.1 -- see here. Currently this is set to use pytest<4.1, but eventually we should change that when possible.
  • ok, now set to >= 4.2.

scikit-bio

  • OrdinationResults.read()
  • OrdinationResults features and samples properties
  • looks like some biplot/ordinationresults functionality was added in 0.5.3, which corroborates why DEICODE requires at least this version. So it's probs ok to stick with this.

numpy

  • right now, just need .NaN and .arange. these are present in v1.3 of numpy, but pandas needs v1.12.0 at least. So let's use that.

fedarko added a commit that referenced this issue Feb 14, 2019
Requiring pytest but not flake8 makes sense -- tests passing is
much more important than code style being 100% perfect (and that
should be enforced by travis anyway)

See #42 for additional context and future plans.
@fedarko
Copy link
Collaborator Author

fedarko commented Feb 14, 2019

also, update readme when this is sorted out

@fedarko
Copy link
Collaborator Author

fedarko commented Feb 24, 2019

We don't directly use numpy, but it's needed in order for biom to be installed at all. And it looks like including it in the install_requires field of setup() (even before biom-format) doesn't suffice.

I imagine most users will probably already have numpy installed, but if we can update the readme or any sort of installation instructions about this.

Yeah, so we do need numpy for a few things (in particular, the np.NaN value and np.arange(). But it looks like both of these things should be available as far back as numpy version 1.3 (not that I expect anyone to actually use a version as old as that).

fedarko added a commit that referenced this issue Feb 24, 2019
this seems to have sprung up out of nowhere (seriously, the commit
that broke it updated .gitattributes and nothing else iirc).

I also updated the pandas minimum version to match biom-format's
requirements. don't expect that'll play any sort of role in fixing
this issue but worth noting re: #42
fedarko added a commit that referenced this issue Jun 11, 2019
@fedarko
Copy link
Collaborator Author

fedarko commented Jun 24, 2019

I forgot to mention it in the message, but this is closed by commit fedarko@e94c09b.

@fedarko fedarko closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
administrative Logistical matters that don't have much or anything to do with code
Projects
None yet
Development

No branches or pull requests

1 participant