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
pythonPackages.missingno: init at 0.4.2 #71717
Conversation
pname = "missingno"; | ||
version = "0.4.2"; | ||
|
||
src = fetchPypi { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind checking out from github so that we can have tests included?
looks like they can be found here: https://github.com/ResidentMario/missingno/blob/master/tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are important to ensure your package wont be broken by upstream dependencies, and I find that most science related packages like to break often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that integrating tests here initiates a snowball effect, where python packages are used for tests that are not (yet) in nixos. Dunno how integrating the tests of this missingno
package will justify this. Thus, we can either ignore those tests, or alternatively, do not merge this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pypi package didn't contain tests, I would do:
{ lib
, buildPythonPackage
, fetchFromGitHub
, matplotlib
, scipy
, seaborn
, pytest
}:
buildPythonPackage rec {
pname = "missingno";
version = "0.4.2";
src = fetchFromGitHub {
owner = "ResidentMario";
repo = pname;
rev = version;
sha256 = "0wxhj7qm2fcaiprdjfrx9p8nikc10qhivf7rzwi04r6mrzyi0i9x";
};
propagatedBuildInputs = [
matplotlib
scipy
seaborn
];
checkInputs = [ pytest ];
checkPhase = ''
pytest tests/util_tests.py -k 'not cutoff'
'';
meta = with lib; {
description = "Missing data visualization module for Python.";
homepage = https://github.com/ResidentMario/missingno;
maintainers = with maintainers; [ msigl ];
license = licenses.mit;
};
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Naively I did assume that we have to run all tests. According to this packages' contributing guidelines there are two types of tests. Namely the visualizing tests tests/viz_tests.py
and utility tests tests/util_tests.py.
For those viz-tests additional data is needed, which is loaded via quilt - a data versioning system for AWS. However, this quilt is not in nixos as some other dependencies of quilt are also not in nixos.
Long story short: sure, we can only do the utility tests as you suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, those looked very involved.
We more or less just want to verify that the package is in a valid state. Util tests should give us some code coverage
0399d6c
to
8be8a5c
Compare
8be8a5c
to
91ebe8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes nixpkgs-review build and diff LGTM.
I marked this as stale due to inactivity. → More info |
Too bad we didn't merge it back then, there's merge conflicts now. @melsigl do you still want to get this in? |
checkInputs = [ pytest ]; | ||
|
||
checkPhase = '' | ||
pytest tests/util_tests.py -k 'not cutoff' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation + missing hooks, see https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/explicit-phases.md .
pytest tests/util_tests.py -k 'not cutoff' | |
runHook preCheck | |
pytest tests/util_tests.py -k 'not cutoff' | |
runHook postCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also pytestCheckHook is prefered.
@doronbehar I do not need that particular package anymore. Thus, we can close this pull request |
Motivation for this change
missingno
is an easy to use Python package for data visualization, especially regarding messy data with missing vlaues.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @