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

Updating pyproject python versioning #454

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

axiomcura
Copy link
Member

@axiomcura axiomcura commented Sep 27, 2024

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?

  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • This change requires a documentation update.

Checklist

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

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #454   +/-   ##
=======================================
  Coverage   94.74%   94.74%           
=======================================
  Files          57       57           
  Lines        3156     3156           
=======================================
  Hits         2990     2990           
  Misses        166      166           
Flag Coverage Δ
unittests 94.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
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.

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.

@axiomcura
Copy link
Member Author

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
Copy link
Member Author

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

@axiomcura axiomcura merged commit 8ee1f17 into cytomining:main Sep 30, 2024
12 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.

Bug: Constrain python versioning within the pyproject file to match with CI
3 participants