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

moved logic from cli to loader to clean up interface when used as a p… #17

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

chrisantonellis
Copy link
Contributor

moved configuration loading logic out of CLI module to isolate concerns, and to clean up interface when little-cheesemonger is used as a python package instead of a CLI

fixed associated tests and wrote some more

90% coverage enforcement has been disabled to allow integration tests to pass until a clean workaround is found (suggestions welcome)

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #17 (b74fd9f) into main (824e3e6) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #17   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          188       189    +1     
  Branches        16        16           
=========================================
+ Hits           188       189    +1     
Impacted Files Coverage Δ
little_cheesemonger/_cli.py 100.00% <100.00%> (ø)
little_cheesemonger/_loader.py 100.00% <100.00%> (ø)
little_cheesemonger/_run.py 100.00% <100.00%> (ø)

@jamescurtin
Copy link
Contributor

90% coverage enforcement has been disabled to allow integration tests to pass until a clean workaround is found (suggestions welcome)

This only affects running integration tests locally, as codecov automatically combines all coverage reports and evaluates the combined coverage against the minimum defined in .github/codecov.yml, right?

Two possible options I see for maintaining minimum coverage when running local integration tests (first would be the easiest, I think):

  1. Create a .coveragerc-integration config file (or something like that) and add the --cov-config argument to pytest when running the integration tests. This would allow you to have different minimum levels of coverage for unit and integration tests.
  2. If you can run the unit tests in the same container as the integration tests, you could use coverage combine (or the --cov-append argument in pytest-cov) to generate a combined coverage report that is evaluated at the end.

"""Run build environment setup per configuration."""

logging.basicConfig()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this line should be moved back to the _cli.py. When being used as a library, it should be the caller's responsibility to configure logging outputs. This would make run() only concerned with out little_cheesemonger loggers operate.

@@ -7,4 +7,4 @@ branch = True
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
fail_under = 90
# fail_under = 90
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could use a different configuration file for the integration test. That would allow you to have a different required value.

@chrisantonellis chrisantonellis merged commit b6191bd into main Feb 17, 2021
@jamescurtin jamescurtin deleted the cantonellis_move_logic_to_loader_module branch October 25, 2021 14:02
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