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

python312Packages.docarray: init at 0.40.0 #296615

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

loicreynier
Copy link
Contributor

@loicreynier loicreynier commented Mar 17, 2024

Description of changes

Add DocArray a Python library for multimodal data.

Currently, pytest collection do not work.

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@loicreynier loicreynier marked this pull request as ready for review March 17, 2024 15:36
@loicreynier
Copy link
Contributor Author

Added optional dependencies but could not find yet why tests are not collected.

@loicreynier
Copy link
Contributor Author

Just realized that tests are not collected because they are not shipped in the Pypi distribution... What is considered best practice in that case? Fetching from GitHub to get the tests or fetching from Pypi to get the official release?

@loicreynier
Copy link
Contributor Author

Squashed commits together, formatted with nixfmtand merged conflicts.

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.

Just realized that tests are not collected because they are not shipped in the Pypi distribution... What is considered best practice in that case? Fetching from GitHub to get the tests or fetching from Pypi to get the official release?

Please fetch the source from GitHub.

pkgs/development/python-modules/docarray/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/docarray/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/docarray/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/docarray/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
@loicreynier loicreynier force-pushed the feat-python3-docarray-init-at-0.40 branch from 0d8d168 to b1c0a0e Compare May 27, 2024 12:58
@onny
Copy link
Contributor

onny commented Jun 4, 2024

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

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

@onny onny self-requested a review June 4, 2024 20:55
@loicreynier
Copy link
Contributor Author

loicreynier commented Sep 6, 2024

Removed LangChain extra dependency following #319079.

pkgs/development/python-modules/docarray/default.nix Outdated Show resolved Hide resolved
};

pythonImportsCheck = [ "docarray" ];

Copy link
Member

Choose a reason for hiding this comment

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

Could you add pytestCheckHook to nativeCheckInputs?

Copy link
Contributor Author

@loicreynier loicreynier Sep 7, 2024

Choose a reason for hiding this comment

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

A lot of tests depend on Python packages that are not available yet in nixpkgs. Even listing the tests names (to list them in disabledTests) is not possible without the dependencies. I can't find a way to disable the problematic tests.

Copy link
Contributor Author

@loicreynier loicreynier Sep 7, 2024

Choose a reason for hiding this comment

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

I have successfully packaged the missing Python packages locally, i.e. mktestdocs and pyepsilla. All the tests work with them. Should I push them to nixpkgs before finishing (and fixing) this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

You could include both into this PR if possible 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pyepsilla depends on #338831 and on the latest version of posthog that should be updated by auto updates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, mktestdocs has been added by #338197.

@loicreynier loicreynier marked this pull request as draft September 8, 2024 13:39
@loicreynier loicreynier force-pushed the feat-python3-docarray-init-at-0.40 branch from 9db41a8 to 19dd6d9 Compare September 8, 2024 13:53
@loicreynier
Copy link
Contributor Author

As mentioned above, DocArray tests fail because test (collection and run) require pyepsilla which is not packaged in nixpkgs yet.

I added pypesilla as separated commit but it depends on #338831 and on the latest version of posthog (which should be auto-updated soon).

@loicreynier loicreynier changed the title python311Packages.docarray: init at 0.40.0 python312Packages.docarray: init at 0.40.0 Sep 8, 2024
@loicreynier loicreynier force-pushed the feat-python3-docarray-init-at-0.40 branch from 4b14d8a to 0612a4c Compare October 25, 2024 22:42
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.

4 participants