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

chore: logging 3 - remove prints from tools directory #177

Merged
merged 16 commits into from
Mar 21, 2024

Conversation

hollandjg
Copy link
Member

No description provided.

@hollandjg hollandjg changed the base branch from main to feat-logger/2-replace-print-logger-analysis_db March 4, 2024 23:21
@hollandjg hollandjg requested review from mochell, cpaniaguam and kmilo9999 and removed request for mochell March 4, 2024 23:33
@hollandjg hollandjg marked this pull request as ready for review March 4, 2024 23:39
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

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

Some suggested cleanups here.

src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/filter_regrid.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/generalized_FT.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/iotools.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/iotools.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/iotools.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/spectral_estimates.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/spicke_remover.py Outdated Show resolved Hide resolved
src/icesat2_tracks/ICEsat2_SI_tools/spicke_remover.py Outdated Show resolved Hide resolved
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

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

One more change here.

src/icesat2_tracks/ICEsat2_SI_tools/spectral_estimates.py Outdated Show resolved Hide resolved
cpaniaguam
cpaniaguam previously approved these changes Mar 5, 2024
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

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

All good!

…at-logger/3-replace-print-logger-tools

# Conflicts:
#	src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py
#	src/icesat2_tracks/ICEsat2_SI_tools/filter_regrid.py
#	src/icesat2_tracks/ICEsat2_SI_tools/spectral_estimates.py
#	src/icesat2_tracks/ICEsat2_SI_tools/spicke_remover.py
#	src/icesat2waves/tools/iotools.py
#	src/icesat2waves/tools/sliderule_converter_tools.py
kmilo9999
kmilo9999 previously approved these changes Mar 18, 2024
Base automatically changed from feat-logger/2-replace-print-logger-analysis_db to main March 20, 2024 17:03
@hollandjg hollandjg dismissed stale reviews from kmilo9999 and cpaniaguam March 20, 2024 17:03

The base branch was changed.

Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

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

See what you think of these.

src/icesat2waves/tools/iotools.py Outdated Show resolved Hide resolved
@@ -328,7 +332,7 @@ def ATL03_download(username, password, dpath, product_directory, sd, file_name):
"""

HOST = ["https://n5eil01u.ecs.nsidc.org", "ATLAS", product_directory, sd, file_name]
print("download to:", dpath + "/" + HOST[-1])
_logger.debug("download to: %s", dpath + "/" + HOST[-1])
Copy link
Member

Choose a reason for hiding this comment

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

Fewer characters, same result. Thoughts?

Suggested change
_logger.debug("download to: %s", dpath + "/" + HOST[-1])
_logger.debug("download to: %s", dpath"/"HOST[-1])

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow, that works? It looks like a syntax error to me. I didn't know you could concatenate strings that way. How does Black reformat it? I'm not super keen – I don't think the suggestion makes the syntax any clearer.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it doesn't work. I guess it only works with literals.

@hollandjg hollandjg merged commit a10364c into main Mar 21, 2024
2 checks passed
@hollandjg hollandjg deleted the feat-logger/3-replace-print-logger-tools branch March 21, 2024 14:58
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