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

openbabel: 2.4 -> 3.1.1 #107845

Merged
merged 4 commits into from Jan 17, 2021
Merged

openbabel: 2.4 -> 3.1.1 #107845

merged 4 commits into from Jan 17, 2021

Conversation

danielbarter
Copy link
Contributor

@danielbarter danielbarter commented Dec 28, 2020

Motivation for this change

In my current job, openbabel is used quite heavily. The current nixpkgs version is out of date, and doesn't include the python bindings which are heavily used in theoretical chemistry (in pymatgen, for example). I felt like my openbabel nix expressions might be useful for others.

Things done
  • Bumped openbabel to latest version (3.1.1)
  • Build the python bindings. It would be relatively easy to include an argument pythonBindings ? True, but as far as I am aware, openbabel is predominantly used as a python module these days. Moreover, there is no appreciable difference in compile time.
  • from openbabel import openbabel is working correctly, but from openbabel import pybel needs some environment variables to be set as in openbabel-bindings/default.nix. I have been working around this by setting them explicitly in my working shell.nix. Fixing this would probably require a patch to openbabel itself.

This is my first PR to nixpkgs, so any feedback and suggestions would be be greatly appreciated!

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

@danielbarter danielbarter changed the title Openbabel3 Openbabel 2.4 -> Openbabel 3.1.1 Dec 28, 2020
@danielbarter danielbarter changed the title Openbabel 2.4 -> Openbabel 3.1.1 Openbabel 2.4 -> 3.1.1 Dec 28, 2020
@danielbarter danielbarter changed the title Openbabel 2.4 -> 3.1.1 openbabel 2.4 -> 3.1.1 Dec 28, 2020
@danielbarter danielbarter changed the title openbabel 2.4 -> 3.1.1 openbabel: 2.4 -> 3.1.1 Dec 28, 2020
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Please squash the commits into one named openbabel: 2.4 -> 3.1.1.

pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
@danielbarter danielbarter force-pushed the openbabel3 branch 6 times, most recently from eaa462c to 090a1ec Compare December 29, 2020 18:30
@danielbarter
Copy link
Contributor Author

OK, all the changes suggested by @SuperSandro2000 have been made. Thanks for the feedback :D

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Please orient your formatting on other packages in nixpkgs. It is not optional and makes reviewing packages easier if they all follow a somewhat uniform style.

pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
@danielbarter
Copy link
Contributor Author

danielbarter commented Jan 1, 2021

All second round of changes have been made! I'll rebase once there are no further suggestions

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107845 run on x86_64-darwin 1

1 package marked as broken and skipped:
  • avogadro
4 packages built:
  • openbabel
  • python37Packages.openbabel-bindings
  • python38Packages.openbabel-bindings
  • python39Packages.openbabel-bindings

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107845 run on x86_64-linux 1

1 package failed to build and are new build failure:
7 packages built:
  • libsForQt5.kalzium (kdeApplications.kalzium ,libsForQt515.kalzium)
  • libsForQt512.kalzium
  • libsForQt514.kalzium
  • openbabel
  • python37Packages.openbabel-bindings
  • python38Packages.openbabel-bindings
  • python39Packages.openbabel-bindings

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

@danielbarter danielbarter force-pushed the openbabel3 branch 2 times, most recently from c17c9c4 to 23683e2 Compare January 15, 2021 23:37
@danielbarter
Copy link
Contributor Author

seems like avogadro is no longer being maintained and has openbabel2 as a dependency. I revived the old openbabel nix expression and called it openbabel2 to feed into avogadro. Let me know what you think

@jonringer
Copy link
Contributor

please fix conflicts :(

@danielbarter
Copy link
Contributor Author

danielbarter commented Jan 16, 2021

Working on conflicts now 👍

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Sorry that this takes so long. I hope this is the final around after which we can finally merge.

We are currently doing several treewide changes which sadly delay this PR a bit again. Sorry about that.

pkgs/applications/science/chemistry/avogadro/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel2/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel2/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/openbabel2/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@danielbarter
Copy link
Contributor Author

No need to apologize @SuperSandro2000, you are doing an amazing job! keep up the good work 👍. All changes have been made

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Sorry I found another nit but after that LGTM

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107845 run on x86_64-darwin 1

4 packages built:
  • openbabel2
  • python37Packages.openbabel-bindings
  • python38Packages.openbabel-bindings
  • python39Packages.openbabel-bindings

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.openbabel-bindings:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

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

4 participants