Skip to content

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Sep 19, 2025

Scope and purpose

Fixes #458

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

@hmpf hmpf self-assigned this Sep 19, 2025
@hmpf hmpf requested a review from johannaengland September 19, 2025 12:30
@hmpf hmpf force-pushed the fix-missing-config-file branch from 33ea83f to 3edcf69 Compare September 19, 2025 12:32
Copy link

github-actions bot commented Sep 19, 2025

Test results

666 tests   665 ✅  28s ⏱️
  1 suites    0 💤
  1 files      1 ❌

For more details on these failures, see this check.

Results for commit ddb3060.

♻️ This comment has been updated with latest results.

@hmpf hmpf force-pushed the fix-missing-config-file branch from 3edcf69 to e080251 Compare September 19, 2025 12:34
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.79%. Comparing base (e2efbcd) to head (ddb3060).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #461      +/-   ##
==========================================
+ Coverage   98.71%   98.79%   +0.08%     
==========================================
  Files          83       83              
  Lines       10092    10093       +1     
==========================================
+ Hits         9962     9971       +9     
+ Misses        130      122       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hmpf hmpf force-pushed the fix-missing-config-file branch from e080251 to ddb3060 Compare September 19, 2025 12:50
@hmpf hmpf requested a review from a team September 19, 2025 12:50
Copy link

@hmpf hmpf added the bug Something isn't working label Sep 19, 2025
@hmpf
Copy link
Contributor Author

hmpf commented Sep 19, 2025

NTS: this is harder than I thought. Move validate_file_can_be_opened() and use it outside of the config models.

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really, this is just a lot of faffing about. The code was already designed to run without a config file, but the main() method used an incorrect reference to the running config.

#466 is my suggestion for an alternative to this PR.

config_dict["polling"]["file"] = poll_file_name

config = Configuration.model_validate(obj=config_dict, strict=True)
config = Configuration().model_validate(obj=config_dict, strict=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model_validate() is a classmethod. Why did you change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error when running tests.

@hmpf hmpf marked this pull request as draft September 22, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zino cannot run without zino.toml file

2 participants