Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates settings pattern #83

Merged
merged 19 commits into from
Feb 20, 2025
Merged

Updates settings pattern #83

merged 19 commits into from
Feb 20, 2025

Conversation

AndyRae
Copy link
Member

@AndyRae AndyRae commented Feb 15, 2025

Pull Request Contents

♻️ Refactor

Description

Refactors settings configuration, made less brittle and clearer.

  • Configuring hasn't changed - all environment variables.
  • Adds Pydantic settings as the model
  • Updates tests

With the introduction of Pydantic - devs will need to run uv sync on their environment.

Related Issues or other material

✅ Added/updated tests?

  • This PR contains relevant tests
    • Or doesn't need to per the below explanation
  • I've completed all actions and tasks detailed in the PR Template

Copy link

github-actions bot commented Feb 17, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/hutch_bunny
   cli.py34340%1–63
   daemon.py46460%1–86
src/hutch_bunny/core
   db_manager.py723847%35, 49, 60, 71, 87, 89, 91, 93, 95, 109, 121–126, 129–132, 163–182, 194–199, 208–211, 219
   enums.py8188%23
   execute_query.py28280%1–66
   obfuscation.py15193%62
   parser.py550%1–22
   results_modifiers.py13130%1–45
   setting_database.py271737%17, 20, 28–63
   settings.py43295%64, 85
   task_api_client.py32320%1–92
src/hutch_bunny/core/rquest_dto
   activity_job.py12120%1–36
   base_dto.py6267%3, 7
   cohort.py14471%17, 32–34
   file.py12192%24
   group.py14471%19, 34–36
   query.py381463%32, 51–52, 79, 102–116
   result.py15193%38
   rule.py503236%28–31, 41–52, 64–72, 85–101
src/hutch_bunny/core/solvers
   availability_solver.py1807757%148–149, 154, 181, 197–223, 231, 255–275, 291–300, 324–330, 337–409, 419–426, 433–473, 492–508, 522–528
   query_solvers.py1502186%35, 141, 156–181, 252
TOTAL97138560% 

Tests Skipped Failures Errors Time
25 0 💤 4 ❌ 0 🔥 1.078s ⏱️

@AndyRae AndyRae marked this pull request as ready for review February 17, 2025 18:48
@AndyRae AndyRae requested a review from vpnu February 20, 2025 16:30
@AndyRae AndyRae merged commit 96bbdf4 into main Feb 20, 2025
5 checks passed
@AndyRae AndyRae deleted the feat/60/sugar-bunny branch February 20, 2025 17:03
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.

Configuration management
2 participants