-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Move CustomDist logic to dedicated module and docs section #7363
Move CustomDist logic to dedicated module and docs section #7363
Conversation
] |
Hi @ricardoV94 thank you for all the comments :) I think this PR should be ready for review now, happy for me to change the status? |
e365f4c
to
2333e5e
Compare
I rebased the PR on top of main to solve the conflicts with #7370 |
2333e5e
to
5935250
Compare
bcfc020
to
dc8b2d4
Compare
Co-authored-by: Giuseppe Cunsolo <markgreene74@users.noreply.github.com> Co-authored-by: markgreene74@users.noreply.github.com Co-authored-by: "Hemant19870601" <hemant.thakare01@gmail.com>
Co-authored-by: Giuseppe Cunsolo <markgreene74@users.noreply.github.com> Co-authored-by: markgreene74@users.noreply.github.com Co-authored-by: "Hemant19870601" <hemant.thakare01@gmail.com>
dc8b2d4
to
9da36c3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7363 +/- ##
=======================================
Coverage 92.18% 92.19%
=======================================
Files 102 103 +1
Lines 17199 17214 +15
=======================================
+ Hits 15855 15870 +15
Misses 1344 1344
|
@Hemant19870601 and I worked on this PR during the PyMC Hackathon at PyData London 2024.
Description
With this PR
CustomDist
is moved to a separate file (custom_distribution.py
) along with related classes (CustomDistRV
,CustomDistRV
,CustomSymbolicDistRV
,_CustomSymbolicDist
) and helper functions (default_not_implemented
,default_support_point
).The imports in
distribution.py
and__init__.py
have been updated to reflect the changes.DensityDist
has been moved to the new file as well.Note that in
distribution.py
the import ofCustomSymbolicDistRV
has been added close to where the class is used to avoid circular import. Anoqa
has been added on the same line to avoid aruff
error for the misplaced import (E402
).Similarly, the
CustomDist
tests have been moved to their own file (test_custom_distribution.py
) and are passing.Test results (before/after):
main
branch)test_distribution.py
test_custom_distribution.py
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7363.org.readthedocs.build/en/7363/