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

Fix config file warnings when file is missing #931

Merged
merged 1 commit into from Sep 1, 2021
Merged

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Sep 1, 2021

Closes #930.

If config loading provides any warnings, then show them.

@ml-evs ml-evs added the bug Something isn't working label Sep 1, 2021
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #931 (f43983c) into master (4adbaa6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #931   +/-   ##
=======================================
  Coverage   92.78%   92.78%           
=======================================
  Files          67       67           
  Lines        3783     3783           
=======================================
  Hits         3510     3510           
  Misses        273      273           
Flag Coverage Δ
project 92.78% <100.00%> (ø)
validator 92.78% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
optimade/server/main.py 94.33% <100.00%> (ø)
optimade/server/main_index.py 94.73% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4adbaa6...f43983c. Read the comment docs.

Copy link
Contributor

@JPBergsma JPBergsma left a comment

Choose a reason for hiding this comment

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

I do not have any remarks about the changes you made.
There is however quite some duplicate code in these files and I am wondering whether it would be possible to reduce this somehow.

@ml-evs
Copy link
Member Author

ml-evs commented Sep 1, 2021

There is however quite some duplicate code in these files and I am wondering whether it would be possible to reduce this somehow.

The main/main_index servers are meant to be individually "standalone" so I'm not sure if its worth wrapping this logging into a function.

@ml-evs ml-evs merged commit 79d932a into master Sep 1, 2021
@ml-evs ml-evs deleted the ml-evs/close_930 branch September 1, 2021 14:23
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.

No error/warning when specifying a config file that does not exist
2 participants