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

Fixed okwarning block warning #389

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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: 10 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@

import datetime
import subprocess
import warnings

warnings.filterwarnings(
"ignore",
message="DCDReader currently makes independent timesteps",
category=DeprecationWarning,
module="MDAnalysis.coordinates.DCD",
)

import MDAnalysis as mda

MDAnalysis_version = mda.__version__

Comment on lines +18 to +30
Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain why this is necessary, wasn't the :okwarning: below enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So this part addresses the warning -

/home/runner/micromamba/envs/mda-user-guide/lib/python3.10/site-packages/MDAnalysis/coordinates/DCD.py:165: DeprecationWarning: DCDReader currently makes independent timesteps by copying self.ts while other readers update self.ts inplace. This behavior will be changed in 3.0 to be the same as other readers. Read more at https://github.com/MDAnalysis/mdanalysis/issues/3889 to learn if this change in behavior might affect you.
  warnings.warn("DCDReader currently makes independent timesteps"

For solving this warning changing conf.py file was needed.

Adding :okwarning: helped to solve the other warning related to it.

# -- Project information -----------------------------------------------------

project = "MDAnalysis User Guide"
Expand Down
1 change: 1 addition & 0 deletions doc/source/reading_and_writing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ be attached to the new :class:`MDAnalysis.core.groups.AtomGroup`. If the Univers
with its :class:`MDAnalysis.core.groups.AtomGroup`, they will still be bound together afterwards:

.. ipython:: python
:okwarning:

import pickle
from MDAnalysis.tests.datafiles import PSF, DCD
Expand Down
Loading