Skip to content

Conversation

@mfisher87
Copy link
Member

@mfisher87 mfisher87 commented Jul 25, 2025

Description

Console calls, IMO, should be for debugging only. They're useful for users facing bugs to share information about any unexpected events. Instead of using console.log as a catch-all, I'd like to think more carefully about the purpose of each message, and either omit or log it as an error, warning, or debug message.

What do you all think?

If I've removed any calls that you all feel are important, let's change them to console.debug calls?

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--835.org.readthedocs.build/en/835/
💡 JupyterLite preview: https://jupytergis--835.org.readthedocs.build/en/835/lite

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch mfisher87/jupytergis/forbid-console-log

@mfisher87 mfisher87 changed the title Forbid console.log and console.info Forbid console.log and console.info Jul 25, 2025
@mfisher87 mfisher87 force-pushed the forbid-console-log branch from 1b70c8e to af6807f Compare July 25, 2025 18:18
@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2025

Integration tests report: appsharing.space

Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Hi @mfisher87 Sorry that that fell through the cracks. Can we push it across the line? There are some conflicts to be resolved

Console calls, IMO, should be for debugging only. They're useful
for users facing bugs to share information about any unexpected events.
Instead of using `console.log` as a catch-all, I'd like to think more
carefully about the purpose of each message, and either omit or
log it as an error, warning, or debug message.
Remove log and info calls or convert them to other calls. Clean up some
messages.
@mfisher87
Copy link
Member Author

I think it's ready to go now!

@mfisher87 mfisher87 requested a review from arjxn-py November 25, 2025 17:48
@arjxn-py
Copy link
Member

arjxn-py commented Nov 26, 2025

I think it's ready to go now!

Thanks @mfisher87, do you think it'd be wiser to add a short pointer in contributing guide as well? Otherwise I'll be happy to merge it as is.

@mfisher87
Copy link
Member Author

I think it's OK to just have this only expressed in the linter rules since it's easy to fix. I think the things that should go in the contributor docs are standards or conventions that are more nuanced, need some supplementary explanation, and/or can't be checked/fixed by a linter. I don't want the contributor docs to be hard to maintain!

Though I'd be happy to add something to the contributor docs if you feel it would be valuable!

@arjxn-py
Copy link
Member

Ahh I think it's ok then 👍, let's go ahead with this

@mfisher87 mfisher87 merged commit 88c3a7f into geojupyter:main Nov 26, 2025
13 of 14 checks passed
@mfisher87 mfisher87 deleted the forbid-console-log branch November 26, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants