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

Add annsel #227

Merged
merged 4 commits into from
Feb 18, 2025
Merged

Add annsel #227

merged 4 commits into from
Feb 18, 2025

Conversation

srivarra
Copy link
Contributor

@srivarra srivarra commented Feb 14, 2025

Checklist for adding packages

Mandatory

Name of the tool: annsel

Short description: Annsel is a user-friendly library that brings familiar dataframe-style operations to AnnData objects such as filter, select, and group by's.

How does the package use scverse data structures (please describe in a few sentences):

It uses AnnData's obs, var, X, obs_names. and var_names attributes to filter, select and run "group bys" in order to partition and subset the AnnData object as a whole. For example, a user can filter their AnnData object based on a "Cell Type" column in obs.

  • The code is publicly available under an OSI-approved license
  • The package provides versioned releases
  • The package can be installed from a standard registry (e.g. PyPI, conda-forge, bioconda)
  • Automated tests cover essential functions of the package and a reasonable range of inputs and conditions [^1]
  • Continuous integration (CI) automatically executes these tests on each push or pull request [^2]
  • The package provides API documentation via a website or README[^3]
  • The package uses scverse datastructures where appropriate (i.e. AnnData, MuData or SpatialData and their modality-specific extensions)
  • I am an author or maintainer of the tool and agree on listing the package on the scverse website

Recommended

  • Please announce this package on scverse communication channels (zulip, discourse, twitter)

Zulip link

  • Please tag the author(s) these announcements. Handles (e.g. @scverse_team) to include are:
    • Zulip:
    • Discourse:
    • Mastodon:
    • Bluesky:
    • Twitter:
  • The package provides tutorials (or "vignettes") that help getting users started quickly
  • The package uses the scverse cookiecutter template.

@srivarra srivarra changed the title added annsel Add annsel Feb 14, 2025
Copy link

@ilan-gold ilan-gold left a comment

Choose a reason for hiding this comment

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

Looks good to me other than the comment, but not sure about that

- accessor
- utilities
test_command: |
uv pip install .[test] && uv run pytest -n auto

Choose a reason for hiding this comment

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

@grst This won't work out-of-the-box since there is no env created - how do we handle this command? By contrast, pip install xxxx will work because you don't need a virtual env for that

Copy link
Contributor

Choose a reason for hiding this comment

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

uv run pytest should work without pip install?
This test command is anyway more to prove there are tests, as we don't execute it (for now).

Choose a reason for hiding this comment

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

uv pip install won't work though, no?

Choose a reason for hiding this comment

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

@srivarra so perhaps just use pip here for now?

Copy link
Contributor Author

@srivarra srivarra Feb 17, 2025

Choose a reason for hiding this comment

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

@ilan-gold Just replaced it with only pip!

Copy link
Member

@flying-sheep flying-sheep Feb 18, 2025

Choose a reason for hiding this comment

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

pip install xxxx will work because you don't need a virtual env for that

not on modern systems:
$ pip install httpx
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

But hatch test (or uvx hatch test or pipx hatch test) will work if the respective tools are installed.

Copy link
Contributor

Choose a reason for hiding this comment

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

but it should work in a CI context with sudo rights?

Copy link
Member

@flying-sheep flying-sheep Feb 18, 2025

Choose a reason for hiding this comment

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

probably, yeah. uv pip install --system too.

(sorry @srivarra for using your PR as a discussion platform for this, but we should probably improve our guidance on what the test command should be)

@srivarra srivarra requested a review from ilan-gold February 17, 2025 19:05
@grst
Copy link
Contributor

grst commented Feb 18, 2025

Thanks @srivarra!

@grst grst merged commit 48515a2 into scverse:main Feb 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants