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

pythonPackages.missingno: init at 0.4.2 #71717

Closed
wants to merge 1 commit into from

Conversation

melsigl
Copy link
Member

@melsigl melsigl commented Oct 22, 2019

Motivation for this change

missingno is an easy to use Python package for data visualization, especially regarding messy data with missing vlaues.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

pname = "missingno";
version = "0.4.2";

src = fetchPypi {
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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;
  };
}

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Contributor

@doronbehar doronbehar left a 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.

@stale
Copy link

stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2021
@doronbehar
Copy link
Contributor

Too bad we didn't merge it back then, there's merge conflicts now. @melsigl do you still want to get this in?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2021
checkInputs = [ pytest ];

checkPhase = ''
pytest tests/util_tests.py -k 'not cutoff'
Copy link
Contributor

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 .

Suggested change
pytest tests/util_tests.py -k 'not cutoff'
runHook preCheck
pytest tests/util_tests.py -k 'not cutoff'
runHook postCheck

Copy link
Member

Choose a reason for hiding this comment

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

Also pytestCheckHook is prefered.

@melsigl
Copy link
Member Author

melsigl commented Jun 5, 2021

@doronbehar I do not need that particular package anymore. Thus, we can close this pull request

@melsigl melsigl closed this Jun 5, 2021
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.

None yet

5 participants