Bugfix alias_map_file not being used for table aliases#1492
Bugfix alias_map_file not being used for table aliases#1492j-bennet merged 5 commits intodbcli:mainfrom
Conversation
j-bennet
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for the fix. 🍒
|
@josh-lynch So looks like our integration tests are currently broken. I merged a PR to temporarily remove them, while I look into that: #1494. You'll have to rebase your PR on top of main to pull in the change. |
The test demonstrates a bug in the PGCompleter class where a configured alias map file is not used to generate aliases.
Fixes a bug where this configuration was ignored.
Clarify the behaviour of generate_alias when an alias_map argument is passed.
Test demonstrates passing an alias_map to generate_alias does not break generation of aliases for tables not covered within the map file.
Credit where credit is due ;)
93cb0c9 to
37f56e3
Compare
|
🙏 Thanks for the review @j-bennet Can I also clarify the process/schedule for new releases of pgcli? I see it's been roughly 12 months since the last one and a few contributions have now built up unreleased. |
There's no schedule. For myself, I usually wait for a few changes (3+) and then release. But I've released before with a single change too. I can release as soon as your PR goes in. |
That would be awesome. Thanks 🙌 |
|
4.2.0 is released. |
Description
PGCLI advertises the ability to configure a custom
alias_map_file, enabling users to override table alias generation with predefined aliases of their choosing.Prior to this change the use of the
alias_map_filewas bugged; the configured file was not used and users would continue to get the auto-generated table aliases.This change plugs the configured
alias_map_fileinto the alias generation process, enabling users to use/see their custom aliases.Checklist
changelog.rst.AUTHORSfile (or it's already there).pip install pre-commit && pre-commit install), and ranblackon my code.