Skip to content

Move config and indices to persistent user data directory#5

Merged
Loyale merged 1 commit intomasterfrom
claude/add-genome-reference-tool-t3h7n
Apr 8, 2026
Merged

Move config and indices to persistent user data directory#5
Loyale merged 1 commit intomasterfrom
claude/add-genome-reference-tool-t3h7n

Conversation

@Loyale
Copy link
Copy Markdown
Contributor

@Loyale Loyale commented Apr 8, 2026

Summary

  • Moves HCRconfig.yaml and Bowtie2 indices from the package directory to a persistent user data directory (~/.hcrprobedesign/), so reference genomes survive pip install -U upgrades
  • Adds automatic migration of existing data from the old package-relative location on first run
  • Supports HCRPROBEDESIGN_DATA_DIR environment variable to override the data directory location
  • Version bump: 0.3.0 → 0.3.1

Test plan

  • All 39 tests pass (10 new _datadir tests + 29 existing, updated for isolation)
  • Verify listReferences shows data directory path and registered species
  • Verify fetchMouseIndex / buildGenomeIndex write to ~/.hcrprobedesign/
  • Verify upgrading from 0.3.0 triggers automatic migration of old indices
  • Verify HCRPROBEDESIGN_DATA_DIR override works

https://claude.ai/code/session_01L9BrYriTeA72fsqqTvgdxy

Reference genomes and HCRconfig.yaml were previously stored inside the
package directory, which meant they were lost on `pip install -U`. This
moves all mutable data to ~/.hcrprobedesign/ (overridable via
HCRPROBEDESIGN_DATA_DIR env var) so indices and configuration persist
across upgrades.

Key changes:
- New _datadir.py module manages the data directory lifecycle
- Auto-migration from old package-relative locations on first run
- All modules (genomeMask, referenceGenome, listReferences) updated
  to read/write from the user data directory
- listReferences now shows the data directory path in output
- Version bump: 0.3.0 -> 0.3.1
- 10 new tests for _datadir, all 39 tests passing

https://claude.ai/code/session_01L9BrYriTeA72fsqqTvgdxy
@Loyale Loyale merged commit e66a5f9 into master Apr 8, 2026
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.

2 participants