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(logging): initialize logging in logger file and move version log #131

Merged
merged 2 commits into from
Mar 26, 2023

Conversation

Lordmau5
Copy link
Collaborator

@Lordmau5 Lordmau5 commented Mar 26, 2023

Another attempt at #104

I've moved the logging intialisation into it's own file logger.py
Then inside __init__.py I'm importing it and calling the method

I had to move out the version and debug prints into the main file or otherwise they would be printed on every sub-process creation

Running the following 2 commands yields these results:

python -c "import so_vits_svc_fork.__main__;from logging import getLogger;getLogger().info('hello')"
python -c "import so_vits_svc_fork.train;from logging import getLogger;getLogger().info('hello')"

image

@Lordmau5
Copy link
Collaborator Author

Local test of poetry run pytest shows this:
image
image

I think the force-push messed up the CI test, can you re-run it?

@codecov-commenter
Copy link

Codecov Report

Merging #131 (22a6e08) into main (7b9ee0e) will increase coverage by 0.37%.
The diff coverage is 59.09%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   16.36%   16.74%   +0.37%     
==========================================
  Files          30       31       +1     
  Lines        3482     3488       +6     
  Branches      371      406      +35     
==========================================
+ Hits          570      584      +14     
+ Misses       2905     2889      -16     
- Partials        7       15       +8     
Impacted Files Coverage Δ
src/so_vits_svc_fork/__main__.py 0.00% <0.00%> (ø)
src/so_vits_svc_fork/gui.py 0.00% <ø> (ø)
src/so_vits_svc_fork/utils.py 17.91% <0.00%> (ø)
src/so_vits_svc_fork/logger.py 84.61% <84.61%> (ø)
src/so_vits_svc_fork/__init__.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@34j 34j merged commit 441d51f into voicepaw:main Mar 26, 2023
@Lordmau5 Lordmau5 deleted the fix-logging branch March 26, 2023 10:31
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.

3 participants