Skip to content

compute_log_prior: make subsequent arguments keyword only#8123

Merged
aloctavodia merged 1 commit intopymc-devs:mainfrom
vkverma9534:logden
Feb 28, 2026
Merged

compute_log_prior: make subsequent arguments keyword only#8123
aloctavodia merged 1 commit intopymc-devs:mainfrom
vkverma9534:logden

Conversation

@vkverma9534
Copy link
Contributor

I closed the previous PR (#8122) prematurely while trying to resolve pre-commit autofix failures, which ended up being a distraction from the actual change.

This PR keeps things minimal and focused: it enforces keyword-only arguments for compute_log_prior, aligning its signature with compute_log_likelihood and preventing accidental positional argument usage.

As requested in the earlier discussion, the test case has been removed and only the signature fix remains.

@read-the-docs-community
Copy link

Documentation build overview

📚 pymc | 🛠️ Build #31568627 | 📁 Comparing be882c3 against latest (9d6f6c1)


🔍 Preview build

Show files changed (4 files in total): 📝 4 modified | ➕ 0 added | ➖ 0 deleted
File Status
glossary.html 📝 modified
api/misc.html 📝 modified
api/generated/pymc.compute_log_prior.html 📝 modified
_modules/pymc/stats/log_density.html 📝 modified

@vkverma9534
Copy link
Contributor Author

Although by the test (in #8122 ) it was evident that compute_log_prior was not enforcing keyword-only arguments, the test failed prior to the signature fix and passed once the arguments were made keyword-only.

@ricardoV94 ricardoV94 changed the title Fix compute_log_prior argument handling compute_log_prior: make subsequent arguments keyword only Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.50%. Comparing base (9d6f6c1) to head (be882c3).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8123   +/-   ##
=======================================
  Coverage   91.50%   91.50%           
=======================================
  Files         123      123           
  Lines       19821    19821           
=======================================
  Hits        18137    18137           
  Misses       1684     1684           
Files with missing lines Coverage Δ
pymc/stats/log_density.py 97.36% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aloctavodia aloctavodia merged commit 3a1a14b into pymc-devs:main Feb 28, 2026
42 checks passed
@welcome
Copy link

welcome bot commented Feb 28, 2026

Congratulations Banner]
Congrats on merging your first pull request! 🎉 We here at PyMC are proud of you! 💖 Thank you so much for your contribution 🎁

@vkverma9534
Copy link
Contributor Author

Thanks @aloctavodia @ricardoV94

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.

3 participants