Skip to content

Conversation

@d-hage
Copy link
Contributor

@d-hage d-hage commented Jul 18, 2025

Description

This PR fixes an issue where base_config.json was not included in the built wheel since version 3.0.4, causing runtime errors. The file is now moved to within the deduce source directory, ensuring it is present in both sdist and wheel distributions. Simultaneously, this prevents this file to live in the broader site-packages directory in your environment but instead is in site-packages/deduce.

This fixes #151

Similarly, I got the following error when experimenting with the package:

  File "[...]/.venv/lib/python3.11/site-packages/deduce/deduce.py", line 112, in _initialize_config
    with open(_BASE_CONFIG_FILE, "r", encoding="utf-8") as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: [...]/.venv/lib/python3.11/site-packages/base_config.json'

PR checlist

Verify that tests are passing ✅
Verify that tests are updated/added according to changes ✅ (Not needed)
Run the formatters (make format) ✅
Run the linters (make lint) ✅
Add a section to the changelog ✅
Add a description to your PR ✅

@d-hage
Copy link
Contributor Author

d-hage commented Jul 28, 2025

@vmenger Would you have some time to look at this PR?

@d-hage
Copy link
Contributor Author

d-hage commented Aug 8, 2025

@vmenger it would be nice if this could be merged soon, the current ugly workaround is to copy the file and you will get funky "fixes" like this one, which will need to be removed later again: https://github.com/Carmenda-nl/carmenda_pseudonymize_core/pull/40/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R21

It is a very small PR that should take very little time to review, but has a big impact in the usability of the tool!

@vmenger
Copy link
Owner

vmenger commented Aug 8, 2025

@d-hage I just signed in after some absence, it's on my todo list now, and will look into it soon!

@vmenger vmenger merged commit 8ba9af6 into vmenger:main Aug 11, 2025
4 checks passed
@vmenger
Copy link
Owner

vmenger commented Aug 11, 2025

@d-hage Just merged and released 3.0.6, seems to fix it. Still a bit confused why this broke and why the tests in the release pipeline didn't find it. But thanks for helping out anyway!

@vmenger vmenger mentioned this pull request Aug 11, 2025
@d-hage
Copy link
Contributor Author

d-hage commented Aug 11, 2025

Thanks for addressing this so quickly after coming back from your time off!

Still a bit confused why this broke

I think it is because of some update in poetry-core, I don't think it was ever intended to work this way, as this adds the file to site-packages of the environment instead of within the package dir itself. They probably made copying these files more strict or so. At least that is my guess.

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.

3.0.4. config file error

2 participants