Skip to content

Prepare Buscar for pip and conda packaging#87

Open
axiomcura wants to merge 12 commits intoWayScience:mainfrom
axiomcura:buscar-pip-packaging
Open

Prepare Buscar for pip and conda packaging#87
axiomcura wants to merge 12 commits intoWayScience:mainfrom
axiomcura:buscar-pip-packaging

Conversation

@axiomcura
Copy link
Copy Markdown
Member

@axiomcura axiomcura commented Mar 22, 2026

This PR prepares Buscar for distribution through standard Python packaging workflows, with updates aimed at making the project ready for both pip/PyPI installation and conda-based installation through the existing recipe/meta.yaml recipe. It also refreshes the project documentation so users and contributors can clearly see package status, supported Python versions, test status, and coverage outputs.

In this PR:

  • Updated packaging metadata in pyproject.toml for pip-installable distribution.
  • Added and refreshed uv.lock for reproducible uv-managed environments.
  • Removed the old Poetry lockfile in favor of uv-based dependency locking.
  • Updated recipe/meta.yaml so the conda recipe matches the package dependencies and supported Python range.
  • Added README badges for DOI, tests, supported Python versions, and coverage artifacts.
  • Documented local development and coverage commands using uv.
  • Updated CI coverage reporting to generate XML and HTML reports.
  • Added CI artifact uploads for coverage reports.
  • Verified that the package builds into a source distribution and wheel.
  • Verified package metadata with twine check

This closes #78 and #88

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

axiomcura and others added 5 commits March 31, 2026 14:03
* removed cluster refinement module

* removed heterogeneity

* updated metrics

* created buscar module (separated notebook utils and buscar software)

* updated test module

* updated imports to reflect module changs

* ignore vscode cached files

* updated metrics

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update buscar/metrics.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/4.cpjump1-analysis/nbconverted/4.run_buscar_rankings_base_on_moa.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/nbconverted/1.cfret-pilot-buscar-analysis.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update buscar/metrics.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/1.compound-prioritization/nbconverted/4.measure-phenotypic-activity.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/4.cpjump1-analysis/nbconverted/3.calculate-on-off-scores.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* applied copilot's changes

* update processing module

* reran buscar on cfret data

* reran nbconvert

* removed pdf

* update cpjump1 analysis module

* updates

* added mitocheck analysis module

* added label shuffling method

* mitocheck buscar ranking analysis

* removed cpjump analysis folder, this should be in another PR

* fixed bugs

* fix bugs and updates

* updated plots

* fixes and updates

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* updated all plots

* updated plots

* name changes on axis update

* update

* Update notebooks/2.cfret-analysis/plots/nbconverted/1.on-and-off-pca-and-umap-plots.r

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/plots/nbconverted/3.cfret-signature-effect-size-vs-sig-plot.r

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/plots/nbconverted/1.on-and-off-pca-and-umap-plots.r

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update notebooks/2.cfret-analysis/plots/nbconverted/4.cfret-compound-scores-plot.r

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update r_buscar_env.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* updated plots and comments

* update

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@axiomcura axiomcura marked this pull request as ready for review May 5, 2026 20:05
@axiomcura axiomcura requested review from d33bs May 5, 2026 20:18
@axiomcura axiomcura changed the title Buscar pip packaging Prepare Buscar for pip and conda packaging May 5, 2026
Copy link
Copy Markdown
Member

@d33bs d33bs left a comment

Choose a reason for hiding this comment

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

Great job! I left a few comments. I'm requesting changes because I'm concerned mostly about the environment management and how you're planning to publish to PyPI. Please don't hesitate to let me know if you have any questions.

Comment thread recipe/meta.yaml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suggest a follow up PR which focuses on the conda universe, abiding a separation of concerns. There could be, for instance, completely different needs with this.

Comment thread pyproject.toml

[project]
name = "buscar"
version = "0.1.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider using a dynamic version so you don't need to use static references. This would free you up to use git tags for the versioning, making for a more flexible release process. Reference this file for an example of how to do this with poetry.

Comment thread src/buscar/__init__.py
Comment on lines +13 to +18
__all__ = [
"add_cell_id_hash",
"compute_earth_movers_distance",
"identify_signatures",
"score_compounds",
]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you really need this block? Consider removing it.

Comment thread src/buscar/data_utils.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like it's related to a change outside of just pip and conda. Consider moving this to another PR.

Comment thread .github/workflows/ci.yml
Comment on lines +80 to +82
- name: Run tests
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
run: poetry run pytest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider splitting tests from the build process, which is distinct from software testing. You could make the build a separate job which depends on the tests to succeed.

Comment thread buscar/preprocess.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file looks important. What happened to it? Consider keeping it in place and focusing on only pip + conda installation for this PR.

Comment thread recipe/meta.yaml

about:
home: https://github.com/WayScience/buscar
summary: A framework for prioritizing compounds in high-content imaging screens using single-cell profiles.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This differs from the description in the pyproject file. Consider keeping this in alignment. Also, consider keeping this description in the github description for the repo (and keeping all 3 in alignment).

Comment thread tests/conftest.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This and other changes don't directly pertain to the pip and conda packaging focus, distracting from the goals. I suggest avoiding this pattern in the future, it complicates review, maintenance, and history for the project.

Comment thread uv.lock
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be a poetry lockfile instead of uv?

Comment thread tests/conftest.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When I checked out the code in this PR, installed, and ran tests I found there were failures: ERROR collecting tests/test_checks.py. I specifically used poetry, abiding the current pyproject.toml designations.

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.

Make buscar pip installable

2 participants