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.pymc3 init at 3.2 #39660

Closed
wants to merge 8 commits into from

Conversation

1pakch
Copy link
Contributor

@1pakch 1pakch commented Apr 28, 2018

This is an updated version of #32416 rebased onto release-18.03 branch.

Motivation for this change

Adds the latest stable version of pymc3 to Python packages and update patsy (required by it) from 0.3.0 to 0.5.0. pymc3 of the major Bayesian inference libraries (along with stan, BUGS, JAGS and, to a lesser extent, edward).

Things done
  • Tested using sandboxing
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested the library
  • Fits [CONTRIBUTING.md]

sha256 = "0fw888zd2s7f5zxm9f98ss93qhwv0sqnbdy21ipj33ccqgakhpz0";
};

doCheck = true;
Copy link
Member

Choose a reason for hiding this comment

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

no need for this, it is set automatically

install_reqs.append('enum34')

-test_reqs = ['pytest', 'pytest-cov']
+test_reqs = ['pytest'] # no need for test coverage info in Nix builds
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer using substituteInPlace in postPatch, because a patch generally requires more maintenance work.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.patsy python3.pkgs.patsy

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.patsy, python3.pkgs.patsy

Partial log (click to expand)

patsy.test_state.test_Center ... ok
patsy.test_state.test_stateful_transform_wrapper ... ok
patsy.test_state.test_Standardize ... ok

----------------------------------------------------------------------
Ran 39 tests in 33.753s

OK
/nix/store/x6r0qj5rscq34c376n7hdf1yx57v6ii9-python2.7-patsy-0.5.0
/nix/store/yrvb6iqlk8n8kjc6pc4hdybhmmcz2prc-python3.6-patsy-0.5.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.patsy, python3.pkgs.patsy

Partial log (click to expand)

patsy.test_state.test_Center ... ok
patsy.test_state.test_stateful_transform_wrapper ... ok
patsy.test_state.test_Standardize ... ok

----------------------------------------------------------------------
Ran 39 tests in 288.422s

OK
/nix/store/jm12dwf2c6qlk80w8xnfwnp0gw136h6w-python2.7-patsy-0.5.0
/nix/store/bdqklw1sv1rvisahhx5gb5dn7l8c7cs7-python3.6-patsy-0.5.0

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pymc3 python3.pkgs.pymc3

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: python2.pkgs.pymc3, python3.pkgs.pymc3

Partial log (click to expand)

Installing collected packages: pymc3
Successfully installed pymc3-3.2
/build/pymc3-3.2
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4nvjvgb3sphyvilgzyvnv5gin9ck4g6m-python3.6-pymc3-3.2
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/4nvjvgb3sphyvilgzyvnv5gin9ck4g6m-python3.6-pymc3-3.2/lib
patching script interpreter paths in /nix/store/4nvjvgb3sphyvilgzyvnv5gin9ck4g6m-python3.6-pymc3-3.2
checking for references to /build in /nix/store/4nvjvgb3sphyvilgzyvnv5gin9ck4g6m-python3.6-pymc3-3.2...
error: build of '/nix/store/9qd72anisb68aa83gqkz60aj8mpb080q-python2.7-pymc3-3.2.drv' failed

postPatch = ''
substituteInPlace setup.py --replace \
"test_reqs = ['pytest', 'pytest-cov']" \
"test_reqs = ['pytest']"
Copy link
Member

Choose a reason for hiding this comment

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

It will require even less maintenance if using

substituteInPlace setup.py --replace ", 'pytest-cov'" ""

@@ -10135,7 +10135,9 @@ in {

pygraphviz = callPackage ../development/python-modules/pygraphviz { };

pymc3 = callPackage ../development/python-modules/pymc3 { };
pymc3 = if pythonAtLeast "3.5"
Copy link
Member

Choose a reason for hiding this comment

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

Please use disabled = pythonOlder "3.5" instead.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

You should

  • base your PR on master instead
  • turn your 6 commits into 2 (one for each package)

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python2.pkgs.pymc3, python3.pkgs.pymc3

Partial log (click to expand)

../../nix/store/ky7ygianva07b30vg7vp4n2i398msaf2-python2.7-pandas-0.22.0/lib/python2.7/site-packages/pandas/tests/indexing/test_partial.py . [ 56%]
..........                                                               [ 56%]
../../nix/store/ky7ygianva07b30vg7vp4n2i398msaf2-python2.7-pandas-0.22.0/lib/python2.7/site-packages/pandas/tests/indexing/test_scalar.py . [ 56%]
......                                                                   [ 56%]
../../nix/store/ky7ygianva07b30vg7vp4n2i398msaf2-python2.7-pandas-0.22.0/lib/python2.7/site-packages/pandas/tests/indexing/test_timedelta.py . [ 56%]
building of '/nix/store/r3z8101j41yiia5b6iaddapips5h4l1h-python2.7-pandas-0.22.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/dx0r3fqkqlk4755cckrfvlp232mwp7cj-python2.7-pymc3-3.2.drv': 2 dependencies couldn't be built
building of '/nix/store/xkvpfql5vfpyfijz4vsr1yccw7k2wnwv-python3.6-pandas-0.22.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/fhd7hsh98fpbrzj71306pwdp2f5a4pyh-python3.6-pymc3-3.2.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/dx0r3fqkqlk4755cckrfvlp232mwp7cj-python2.7-pymc3-3.2.drv', '/nix/store/fhd7hsh98fpbrzj71306pwdp2f5a4pyh-python3.6-pymc3-3.2.drv' failed

@1pakch
Copy link
Contributor Author

1pakch commented Apr 28, 2018

The manual here should be updated as it explicitly asks not to work with the master branch (contradicting what is written in the repo's README).

Speaking of commits granularity, isn't it easy for a reviewer to squash when accepting? I thought it is easier to see how the review comments are acted upon when one add commits on top instead of force pushing.

I guess I should make another PR based on master then.

@dotlambda
Copy link
Member

The last bullet point in the manual section you linked to clearly states

Rebase you branch against current master.

@1pakch 1pakch mentioned this pull request Apr 28, 2018
6 tasks
@1pakch
Copy link
Contributor Author

1pakch commented Apr 28, 2018

Indeed, TLDR on my side. Rebased and collapsed PR is at #39662

@1pakch 1pakch closed this Apr 28, 2018
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

3 participants