feat(config): default generated CVs outside the hidden config directory - #53
Merged
Conversation
`output_dir` defaulted to ~/.applyr/cv, so a normal file browser never showed generated CVs — a user had to unhide dotfiles to find the PDF they need to attach to a job application. Config/db/cv-master.md stay in ~/.applyr (internal state), but the new CV_HOME default (~/Documents/applyr, overridable via APPLYR_CV_HOME) puts the deliverable somewhere a file browser shows by default.
Both hardcoded `APPLYR_DIR / "cv"` instead of reading the configured output_dir, so they silently stopped finding/writing CVs the moment CV_HOME diverged from APPLYR_DIR — which the previous commit just made the default. Route both through the existing get_output_dir() helper, the same one `cv generate` already uses.
…over-letter Both hardcoded APPLYR_DIR / "cv-master.md" instead of reading the configured cv_master path, the same import-time-binding gotcha already fixed for output_dir in this branch. Invisible locally because a real cv-master.md happens to sit at the real APPLYR_DIR on this machine; exposed on CI where no such file exists, by the first test to ever exercise cmd_cv_cover_letter end to end. Fixed via the existing get_cv_master_path() helper, matching cv generate's own lookup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output_dirdefaulted to~/.applyr/cv, so a normal file browser never showed generated CVs — a user had to unhide dotfiles to find the PDF they need to attach to a job applicationCV_HOMEdefault (~/Documents/applyr, overridable viaAPPLYR_CV_HOME) puts the deliverable somewhere a file browser shows by default; config/db/cv-master.md stay in~/.applyr(internal state)cv keywordsandcv cover-letterboth hardcodedAPPLYR_DIR / "cv"instead of reading the configuredoutput_dir, so they silently stopped finding/writing CVs the momentCV_HOMEdiverged fromAPPLYR_DIR— fixed in the same PR since it's the direct consequence of the default changeChanges
applyr/config.pyCV_HOMEconstant;TOML_TEMPLATE,_build_defaults(),create_default_config()routeoutput_dirthrough itapplyr/cv.pycmd_cv_keywords/cmd_cv_cover_letteruseget_output_dir()instead of hardcodedAPPLYR_DIR / "cv"tests/conftest.pytmp_applyrfixture also patchesCV_HOMEso tests stay isolatedtests/test_config.py,tests/test_cv.pyTest Plan
~/.applyr)Checklist