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

pyproject.toml: add optional dependencies #763

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

dulmandakh
Copy link
Contributor

@dulmandakh dulmandakh commented Aug 31, 2024

This PR adds support for installing with optional dependencies. Fixes #684

Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.44%. Comparing base (f00421d) to head (56ac5da).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #763      +/-   ##
==========================================
- Coverage   73.79%   70.44%   -3.36%     
==========================================
  Files          26       26              
  Lines        1675     1678       +3     
==========================================
- Hits         1236     1182      -54     
- Misses        439      496      +57     

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

@claudep
Copy link
Contributor

claudep commented Aug 31, 2024

Looks good, however I think this deserves a note somewhere in the documentation, probably in installation.rst.

@dulmandakh
Copy link
Contributor Author

Looks good, however I think this deserves a note somewhere in the documentation, probably in installation.rst.

I tried to write some, but couldn't finish due to my language skills.

@dulmandakh
Copy link
Contributor Author

@claudep could you please help with the documentation

@claudep
Copy link
Contributor

claudep commented Sep 5, 2024

I did not forget you and will return to this as soon as time permits, thanks for your patience!

@claudep
Copy link
Contributor

claudep commented Sep 15, 2024

I suggest installing this patch:

diff --git a/docs/installation.rst b/docs/installation.rst
index 9402faa..4f87538 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -5,11 +5,15 @@ Installation & Setup
 Installation
 ============
 First you need to make sure to read the :doc:`requirements`. To install
-sorl-thumbnail is easy::
+sorl-thumbnail::
 
     pip install sorl-thumbnail
 
-Or you can go to `the github page <https://github.com/sorl/sorl-thumbnail>`_
+Depending of the chosen image backend, you may also use one of::
+
+    pip install sorl-thumbnail[pil]
+    pip install sorl-thumbnail[wand]
+    pip install sorl-thumbnail[pgmagick]
 
 Setup
 =====

@dulmandakh
Copy link
Contributor Author

I suggest installing this patch:

diff --git a/docs/installation.rst b/docs/installation.rst
index 9402faa..4f87538 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -5,11 +5,15 @@ Installation & Setup
 Installation
 ============
 First you need to make sure to read the :doc:`requirements`. To install
-sorl-thumbnail is easy::
+sorl-thumbnail::
 
     pip install sorl-thumbnail
 
-Or you can go to `the github page <https://github.com/sorl/sorl-thumbnail>`_
+Depending of the chosen image backend, you may also use one of::
+
+    pip install sorl-thumbnail[pil]
+    pip install sorl-thumbnail[wand]
+    pip install sorl-thumbnail[pgmagick]
 
 Setup
 =====

done, thank you

@dulmandakh
Copy link
Contributor Author

@claudep added documentation changes per your suggestion. thank you

@claudep
Copy link
Contributor

claudep commented Sep 18, 2024

Thanks great! I have still one question. Shouldn't we name the optional dependency imgmagick or imagemagick instead of wand? Of course, behind the scene, we're still installing the wand lib.

@dulmandakh
Copy link
Contributor Author

IIRC, there is another backend for imagemagick.

@claudep
Copy link
Contributor

claudep commented Sep 18, 2024

Ah yes, you're right.

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

👍

@claudep claudep merged commit 6b1c0e8 into jazzband:master Sep 18, 2024
32 checks passed
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.

Use extras_require for optional dependencies.
2 participants