Skip to content

Conversation

Pandapip1
Copy link
Member

@Pandapip1 Pandapip1 commented Jul 10, 2024

Description of changes

Updates dendropy to the latest version, revamps the derivation, and adds myself as maintainer.

Please see my comments for explanation about some of the changes I made.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 10, 2024
@Pandapip1 Pandapip1 added 0.kind: package adoption Requests or PRs for adopting packages that have no maintainers and removed 0.kind: package adoption Requests or PRs for adopting packages that have no maintainers labels Jul 10, 2024
@Pandapip1 Pandapip1 requested a review from unode July 10, 2024 21:58
@Pandapip1
Copy link
Member Author

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

4 packages built:
  • python311Packages.dendropy
  • python311Packages.dendropy.dist
  • python312Packages.dendropy
  • python312Packages.dendropy.dist

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 10, 2024
@Pandapip1 Pandapip1 force-pushed the dendropy-update branch 3 times, most recently from 9ba2a70 to 982f067 Compare July 12, 2024 18:54
@Pandapip1 Pandapip1 requested a review from Ericson2314 as a code owner July 12, 2024 18:54
@Pandapip1 Pandapip1 requested a review from natsukium July 12, 2024 18:54
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Jul 12, 2024
@Pandapip1 Pandapip1 force-pushed the dendropy-update branch 2 times, most recently from 5c4347c to 2bd2d34 Compare July 12, 2024 19:03
@Pandapip1
Copy link
Member Author

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

5 packages built:
  • paup
  • python311Packages.dendropy
  • python311Packages.dendropy.dist
  • python312Packages.dendropy
  • python312Packages.dendropy.dist

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jul 12, 2024

pythonImportsCheck = [ "dendropy" ];

meta = with lib; {
env.DENDROPY_PAUP_EXECUTABLE_PATH = if paupIntegration then lib.getExe paup else "NONE";
Copy link
Member

Choose a reason for hiding this comment

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

It's a bit tricky.
It seems reasonable to leave it to upstream to make sure the paup integration works, and we disable it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Annoyingly, upstream doesn't make sure the paup integration works. If you remove this line, you'll get failed tests because it can't find the paup binary.

Copy link
Member

Choose a reason for hiding this comment

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

In any case, paup is marked as unfree, so our CI will not run the test either.

Copy link
Member Author

@Pandapip1 Pandapip1 Jul 15, 2024

Choose a reason for hiding this comment

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

In any case, paup is marked as unfree, so our CI will not run the test either.

There are four tests that test PAUP integration. They are disabled when DENDROPY_PAUP_EXECUTABLE_PATH is set to NONE. They are not disabled when the DENDROPY_PAUP_EXECUTABLE_PATH environment variable is not set. Then, dendropy just assumes that PAUP is in the PATH.

Specifically, those tests are:

"test_basic_split_count_with_incorrect_rootings_raises_error"
"test_basic_split_count_with_incorrect_weight_treatment_raises_error"
"test_basic_split_counting_under_different_rootings"
"test_group1"

These tests used to be disabled. However, I changed this so that those tests can be run if PAUP is enabled.

Also worth noting: the author of PAUP has plans to make it open-source later this year.

Copy link
Member

Choose a reason for hiding this comment

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

The upstream looks like it is running an integration test.
https://github.com/jeetsukumaran/DendroPy/blob/a27a6d46e5a7e1c9573b3022a18f3005cd8b996e/.github/workflows/ci.yaml#L30-L37

I'm not willing to expose checkValidity just for the four tests in this package.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right in regards of just four unit tests being insufficient to expose checkValidity. I meant to additionally figure out a way to make PAUP* integration work for dependents of dendropy.

Also, there are a couple other packages where access to checkValidity is useful (#310138 integration with monado, for example). In fact, any open source project with an optional non-free dependency could really make use of checkValidity.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not very familiar with check-meta, so I can't decide if it should be exposed.
However, I agree that there are a number of useful examples.
How about implementing this suggestion in another PR?
I think it would get more people involved in the discussion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, then I will make it a separate PR.

@Pandapip1 Pandapip1 requested a review from natsukium July 15, 2024 02:31
@Pandapip1 Pandapip1 force-pushed the dendropy-update branch 2 times, most recently from 67a65c8 to 6a3575c Compare September 3, 2024 21:01
@Pandapip1 Pandapip1 changed the title python3Packages.dendropy: 4.5.1 -> 5.0.1 python3Packages.dendropy: 4.5.1 -> 5.0.2 Sep 3, 2024
@Pandapip1
Copy link
Member Author

Updated to 5.0.2

Would really like this to be merged. It's blocking #311463

@Pandapip1
Copy link
Member Author

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

5 packages built:
  • paup
  • python311Packages.dendropy
  • python311Packages.dendropy.dist
  • python312Packages.dendropy
  • python312Packages.dendropy.dist

@Pandapip1
Copy link
Member Author

Had some nixfmt errors. Those are now fixed.

@github-actions github-actions bot removed the 6.topic: stdenv Standard environment label Sep 4, 2024
@Pandapip1 Pandapip1 added the 8.has: package (update) This PR updates a package to a newer version label Sep 4, 2024
@Pandapip1
Copy link
Member Author

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

5 packages built:
  • paup
  • python311Packages.dendropy
  • python311Packages.dendropy.dist
  • python312Packages.dendropy
  • python312Packages.dendropy.dist

@natsukium
Copy link
Member

Result of nixpkgs-review pr 326199 at 0c288176 run on aarch64-darwin 1

2 packages built successfully:
  • python311Packages.dendropy
  • python312Packages.dendropy

Copy link
Member

@natsukium natsukium left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@natsukium natsukium merged commit 455cbe4 into NixOS:master Sep 5, 2024
24 of 26 checks passed
@Pandapip1 Pandapip1 deleted the dendropy-update branch September 5, 2024 02:26
@Pandapip1
Copy link
Member Author

Not backporting because this is a major version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants