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

[no ticket] Initializes logs for db-migrate entry point #3136

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions analytics/src/analytics/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,14 @@
app.add_typer(etl_app, name="etl", help="Transform and load local file")


def init() -> None:
"""Shared init function for all scripts."""
# Setup logging
init_logging(__package__)
init_app(logging.root)
# Setup logging
init_logging(__package__)
init_app(logging.root)
Comment on lines +64 to +66
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is potentially going to make local dev / testing more difficult if you always enable logging as soon as the module loads.

What is the context for this change / where do you want logging that you currently don't have it?



@app.callback()
def callback() -> None:
"""Analyze data about the Simpler.Grants.gov project."""
# If you override this callback, remember to call init()
init()


# ===========================================================
Expand Down
Loading