cytomining / pycytominer

Python package for processing image-based profiling data
https://pycytominer.readthedocs.io
BSD 3-Clause "New" or "Revised" License
81 stars 36 forks source link

Updating pyproject python versioning #454

Closed axiomcura closed 1 month ago

axiomcura commented 2 months ago

Description

Thank you for your contribution to pycytominer! Please succinctly summarize your proposed change. What motivated you to make this change?

This PR closes #450, where Python 3.12 faces compatibility issues with downgrading to NumPy 1.24. Additionally, Python 3.12 is currently not supported by Pycytominer, as there are no tests involving Pycytominer with Python 3.12. This change will prevent users with Python 3.12 from installing Pycytominer.

Here's the test log below:

(pycytominer) (base) erikserrano@mahogany:~/Development/pycytominer$ poetry run pytest
=================================================================================== test session starts ===================================================================================
platform linux -- Python 3.11.10, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/erikserrano/Development/pycytominer
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0
collected 158 items                                                                                                                                                                       

tests/test_aggregate.py ..........                                                                                                                                                  [  6%]
tests/test_annotate.py .......                                                                                                                                                      [ 10%]
tests/test_consensus.py ...                                                                                                                                                         [ 12%]
tests/test_cyto_utils/test_DeepProfiler_processing.py ....                                                                                                                          [ 15%]
tests/test_cyto_utils/test_annotate_custom.py ......                                                                                                                                [ 18%]
tests/test_cyto_utils/test_cell_locations.py ......                                                                                                                                 [ 22%]
tests/test_cyto_utils/test_cells.py .......s...............                                                                                                                         [ 37%]
tests/test_cyto_utils/test_collate.py ....                                                                                                                                          [ 39%]
tests/test_cyto_utils/test_cp_image_features.py ..                                                                                                                                  [ 41%]
tests/test_cyto_utils/test_feature_blocklist.py ..                                                                                                                                  [ 42%]
tests/test_cyto_utils/test_feature_drop_outlier.py ....                                                                                                                             [ 44%]
tests/test_cyto_utils/test_feature_infer.py .....                                                                                                                                   [ 48%]
tests/test_cyto_utils/test_features_count_na.py .                                                                                                                                   [ 48%]
tests/test_cyto_utils/test_features_util.py .                                                                                                                                       [ 49%]
tests/test_cyto_utils/test_load.py ......                                                                                                                                           [ 53%]
tests/test_cyto_utils/test_modz.py .......                                                                                                                                          [ 57%]
tests/test_cyto_utils/test_output.py .......                                                                                                                                        [ 62%]
tests/test_cyto_utils/test_single_cell_ingest_utils.py ...                                                                                                                          [ 63%]
tests/test_cyto_utils/test_util.py ................                                                                                                                                 [ 74%]
tests/test_cyto_utils/test_write_gct.py ....                                                                                                                                        [ 76%]
tests/test_feature_select.py ..........                                                                                                                                             [ 82%]
tests/test_normalize.py ............                                                                                                                                                [ 90%]
tests/test_operations/test_correlation_threshold.py ....                                                                                                                            [ 93%]
tests/test_operations/test_get_na_columns.py ...                                                                                                                                    [ 94%]
tests/test_operations/test_transform.py ....                                                                                                                                        [ 97%]
tests/test_operations/test_variance_threshold.py ....                                                                                                                               [100%]

==================================================================================== warnings summary =====================================================================================
tests/test_cyto_utils/test_cells.py::test_load_compartment
  /home/erikserrano/Development/pycytominer/pycytominer/cyto_utils/cells.py:423: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    (num_rows,) = next(self.conn.execute(f"SELECT COUNT(*) FROM {table}"))

tests/test_cyto_utils/test_collate.py::test_base_case
  /home/erikserrano/Programs/miniconda3/envs/pycytominer/lib/python3.11/site-packages/cytominer_database/utils.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

tests/test_cyto_utils/test_collate.py::test_base_case
tests/test_cyto_utils/test_collate.py::test_base_case
tests/test_cyto_utils/test_collate.py::test_base_case
tests/test_cyto_utils/test_collate.py::test_base_case
  /home/erikserrano/Programs/miniconda3/envs/pycytominer/lib/python3.11/site-packages/pkg_resources/__init__.py:2825: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_cyto_utils/test_util.py::test_check_compartments
  /home/erikserrano/Development/pycytominer/pycytominer/cyto_utils/util.py:59: UserWarning: Non-canonical compartment detected: CeLLs
    warnings.warn(warn_str)

tests/test_cyto_utils/test_util.py::test_check_compartments
  /home/erikserrano/Development/pycytominer/pycytominer/cyto_utils/util.py:59: UserWarning: Non-canonical compartment detected: CeLLs, nucLEI, CYTOplasm
    warnings.warn(warn_str)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================= 157 passed, 1 skipped, 8 warnings in 555.20s (0:09:15) ==================================================================

Please also link to any relevant issues that your code is associated with.

What is the nature of your change?

Checklist

Please ensure that all boxes are checked before indicating that a pull request is ready for review.


📚 Documentation preview 📚: https://pycytominer--454.org.readthedocs.build/en/454/

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.74%. Comparing base (af07d49) to head (580eae0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #454 +/- ## ======================================= Coverage 94.74% 94.74% ======================================= Files 57 57 Lines 3156 3156 ======================================= Hits 2990 2990 Misses 166 166 ``` | [Flag](https://app.codecov.io/gh/cytomining/pycytominer/pull/454/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cytomining) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/cytomining/pycytominer/pull/454/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cytomining) | `94.74% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cytomining#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

axiomcura commented 1 month ago

LGTM - feel free to merge this in after tests pass!

Aside, if you'd like to automatically close an issue after a PR gets merged, you can use the keyword "closes", for example: closes #<issue number> (it will also display with a dotted line and hint when rendered by GitHub). Consider adding this to the PR description to help close out the issue once ready to merge.

Oh I didn't know that! thanks! Now merging !

axiomcura commented 1 month ago

Thanks, @d33bs! I'll merge once the tests are complete. I had to resolve merge conflicts and update this branch accordingly.