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

plover: move into pythonPackages and add plugins #347354

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Twey
Copy link
Contributor

@Twey Twey commented Oct 8, 2024

Fixes #89341.

  • updates plover from 4.0.0.dev10 to the more recent 4.0.0rc2
  • adds a couple of new dependencies to pythonPackages
  • moves plover from applications/misc to development/python-modules to allow using it as a dependency
  • adds a withPlugins function to plover
  • adds the plover-lapwing-aio plugin and its dependencies

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.

@AndersonTorres
Copy link
Member

to allow using it as a dependency

I didn't understand.

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.

Please don't add an application to python-modules. If you want to add a plugin system, take a look at poetry and nbqa.

We also recommend that you read the python packaging guide carefully and submit several small PRs, rather than putting a lot of changes into a single PR. This makes it easier for us to review and fix.
Thanks.

@nix-owners nix-owners bot requested a review from natsukium October 9, 2024 10:47
@Twey
Copy link
Contributor Author

Twey commented Oct 9, 2024

to allow using it as a dependency

I didn't understand.

Please don't add an application to python-modules.

plover is both a library and an application. Previously it lived in applications, because we were only using it as an application; however, Plover plugins require plover as a library, so I moved it to python-modules.

If you want to add a plugin system, take a look at poetry and nbqa.

My approach here is very similar to nbqa's, with the main difference that Plover plugins depend on plover as a library, so can't be dependencies of plover itself without causing a dependency cycle. Instead, after building Plover, I build a Python environment with both Plover and the plugins available.

We also recommend that you read the python packaging guide carefully

Could you be more specific? I think this adheres to most of those points. I'll add pyproject support.

and submit several small PRs, rather than putting a lot of changes into a single PR

I didn't think this was a lot of changes — it's just a few small packages and they're mostly interdependent 😅 I can break it down into some smaller PRs but they'll need to be merged in a specific order.

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.

Add Plover plugins
3 participants