Skip to content

MAINT: Log init start/stop#819

Merged
larsoner merged 2 commits intopyvista:masterfrom
larsoner:log
Jul 1, 2020
Merged

MAINT: Log init start/stop#819
larsoner merged 2 commits intopyvista:masterfrom
larsoner:log

Conversation

@larsoner
Copy link
Copy Markdown
Contributor

Overview

  1. Add a default streamhandler so that you can just do pyvista.plotting.log.setLevel(10) for example if you want the output to be printed. Does nothing by default because logging.CRITICAL is the default level
  2. Add init start/stop debug-level messages

@larsoner
Copy link
Copy Markdown
Contributor Author

larsoner commented Jul 1, 2020

Pushed a commit to improve the stacklevel of a warning so it's easier to find in the end-user code. Since _from_arrays is only called from __init__, it should be safe to use stacklevel=3 to get to the line that instantiated the instance of UnstructuredArrays.

Copy link
Copy Markdown
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

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

Thanks! We need to improve logging (especially for debug) on pyvista. I'm approving this, but some docs about setting the log level would be helpful. Maybe a misc.rst page in our current docs?

@akaszynski
Copy link
Copy Markdown
Member

Also, since you've been adding quite a bit lately, I've invited you to be a developer at pyvista. You should be able to push branches directly to the repo and merge once approved. Thanks for all your hard work!

@larsoner larsoner merged commit a6630a7 into pyvista:master Jul 1, 2020
@larsoner
Copy link
Copy Markdown
Contributor Author

larsoner commented Jul 1, 2020

Indeed I can merge here, so probably you just need to give the pyvista-org team I'm in access to the pyvistaqt project with the same permissions as the pyvista project

@akaszynski
Copy link
Copy Markdown
Member

@larsoner, that's exactly it. Just added pyvistaqt to the team. Thanks for helping me with this!

@larsoner
Copy link
Copy Markdown
Contributor Author

larsoner commented Jul 1, 2020

Thanks for helping me with this!

No problem, I experienced a similar problem a couple of months ago and it was a pain to find ...

adeak added a commit to adeak/pyvista that referenced this pull request Nov 9, 2020
* upstream/master: (37 commits)
  🔧 Fix unused variables (pyvista#847)
  Add better Unstructured Grid Documentation (pyvista#845)
  Fix typo in plotting.py (pyvista#846)
  Feat: Implement compute_derivative (pyvista#837)
  New probe filter and massively improve interpolate filter (pyvista#842)
  Clarify clip filter docstring (pyvista#840)
  Update create-structured-surface.py (pyvista#844)
  Update topo-map.py (pyvista#841)
  Add release suffix to version string (pyvista#817)
  Add pathlib Support (pyvista#836)
  Add tolerance argument to sample_over_line (pyvista#828)
  vector slice from pyvista/pyvista-support#134 (pyvista#808)
  Fix is_all_triangles (pyvista#832)
  Misc. documentation fixes (pyvista#829)
  Follow up pyvista#793: fix get_data_range (pyvista#818)
  Fix GPU info in scooby report (pyvista#825)
  Patch for auto_close warning (pyvista#798)
  Add texture demo with scalar data (pyvista#821)
  MAINT: Log init start/stop (pyvista#819)
  Add PolyData strip filter (pyvista#807)
  ...
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.

2 participants