Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ The rules for this file:
??/??/?? IAlibay, orbeckst, marinegor, tylerjereddy, ljwoods2, marinegor,
spyke7, talagayev, tanii1125, BradyAJohnston, hejamu, jeremyleung521,
harshitgajjela-droid, kunjsinha, aygarwal, jauy123, Dreamstick9,
ollyfutur, Amarendra22, charity-g, ParthUppal523
ollyfutur, Amarendra22, charity-g, ParthUppal523,Jatin-Khiyani

* 2.11.0

Fixes
* Standardized logging.getLogger() calls to use \_\_name__ instead of
hardcoded strings across analysis, coordinates, topology,
converters, core, and guesser modules. Some modules had
mismatched or misspelled logger names (e.g. coordinates/PDB.py
used "PBD") which are now also corrected (Issue #5369)
* `MDAnalysis.analysis.nucleicacids.WatsonCrickDist`, `MinorPairDist`,
and `MajorPairDist` now match residue names against the full resname
instead of only the first character, fixing incorrect behaviour with
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
from typing import Dict


logger = logging.getLogger("MDAnalysis.__init__")
logger = logging.getLogger(__name__)

from .version import __version__

Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@

from .base import AnalysisBase

logger = logging.getLogger("MDAnalysis.analysis.align")
logger = logging.getLogger(__name__)


def rotation_matrix(a, b, weights=None):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/atomicdistances.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
import logging
from .base import AnalysisBase, ResultsGroup

logger = logging.getLogger("MDAnalysis.analysis.atomicdistances")
logger = logging.getLogger(__name__)


class AtomicDistances(AnalysisBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def is_any_closer(r, r0, dist=2.5):
from MDAnalysis.core.groups import AtomGroup, UpdatingAtomGroup
from .base import AnalysisBase, ResultsGroup

logger = logging.getLogger("MDAnalysis.analysis.contacts")
logger = logging.getLogger(__name__)


def soft_cut_q(r, r0, beta=5.0, lambda_constant=1.8):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@

import logging

logger = logging.getLogger("MDAnalysis.analysis.density")
logger = logging.getLogger(__name__)


class DensityAnalysis(AnalysisBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/diffusionmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
from .rms import rmsd
from .base import AnalysisBase, ResultsGroup

logger = logging.getLogger("MDAnalysis.analysis.diffusionmap")
logger = logging.getLogger(__name__)


class DistanceMatrix(AnalysisBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
import warnings
import logging

logger = logging.getLogger("MDAnalysis.analysis.distances")
logger = logging.getLogger(__name__)


def contact_matrix(coord, cutoff=15.0, returntype="numpy", box=None):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/gnm.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

from MDAnalysis.analysis.base import Results

logger = logging.getLogger("MDAnalysis.analysis.GNM")
logger = logging.getLogger(__name__)


def _dsq(a, b):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def analysis(current, output, u, **kwargs):

from ..base import AnalysisBase

logger = logging.getLogger("MDAnalysis.analysis.WaterBridgeAnalysis")
logger = logging.getLogger(__name__)


class WaterBridgeAnalysis(AnalysisBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/legacy/x3dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
from MDAnalysis import ApplicationError
from MDAnalysis.lib.util import asiterable, deprecate, realpath, which

logger = logging.getLogger("MDAnalysis.analysis.x3dna")
logger = logging.getLogger(__name__)


@deprecate(
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/msd.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
from ..core import groups
import collections

logger = logging.getLogger("MDAnalysis.analysis.msd")
logger = logging.getLogger(__name__)

due.cite(
Doi("10.21105/joss.00877"),
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/rms.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
from ..lib.util import asiterable, iterable, get_weights


logger = logging.getLogger("MDAnalysis.analysis.rmsd")
logger = logging.getLogger(__name__)


def rmsd(a, b, weights=None, center=False, superposition=False):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/converters/ParmEdParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
)
from ..core.topology import Topology

logger = logging.getLogger("MDAnalysis.converters.ParmEdParser")
logger = logging.getLogger(__name__)


def squash_identical(values):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/converters/RDKitParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
)
from ..topology.base import TopologyReaderBase, change_squash

logger = logging.getLogger("MDAnalysis.converters.RDKitParser")
logger = logging.getLogger(__name__)


def _rdkit_atom_to_RS(atom):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/IMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MockIMDClient:
)
HAS_IMDCLIENT = False

logger = logging.getLogger("MDAnalysis.coordinates.IMDReader")
logger = logging.getLogger(__name__)


class IMDReader(StreamReaderBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/PDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
from ..exceptions import NoDataError


logger = logging.getLogger("MDAnalysis.coordinates.PBD")
logger = logging.getLogger(__name__)

# Pairs of residue name / atom name in use to deduce PDB formatted atom names
Pair = collections.namedtuple("Atom", "resname name")
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/TPR.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

import logging

logger = logging.getLogger("MDAnalysis.coordinates.TPR")
logger = logging.getLogger(__name__)

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/TRC.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

import logging

logger = logging.getLogger("MDAnalysis.coordinates.GROMOS11")
logger = logging.getLogger(__name__)


class TRCReader(base.ReaderBase):
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/coordinates/TRJ.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
from . import base
from ..lib import util
from ..lib.util import store_init_arguments
logger = logging.getLogger("MDAnalysis.coordinates.AMBER")

logger = logging.getLogger(__name__)


try:
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/XYZ.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
import warnings
import logging

logger = logging.getLogger("MDAnalysis.coordinates.XYZ")
logger = logging.getLogger(__name__)

from . import base
from .timestep import Timestep
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/core/universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
from .topologyobjects import TopologyObject
from ..guesser.base import get_guesser

logger = logging.getLogger("MDAnalysis.core.universe")
logger = logging.getLogger(__name__)


def _update_topology_by_ids(universe, atomwise_resids, atomwise_segids):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/guesser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from typing import Dict
import copy

logger = logging.getLogger("MDAnalysis.guesser.base")
logger = logging.getLogger(__name__)


class _GuesserMeta(type):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/LAMMPSParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
from ..guesser.tables import SYMB2Z
from ..guesser.tables import masses as mass_table

logger = logging.getLogger("MDAnalysis.topology.LAMMPS")
logger = logging.getLogger(__name__)


# Sections will all start with one of these words
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/PDBParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
)

# Set up a logger for the PDBParser
logger = logging.getLogger("MDAnalysis.topology.PDBParser")
logger = logging.getLogger(__name__)


def float_or_default(val, default):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/PSFParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
)
from ..core.topology import Topology

logger = logging.getLogger("MDAnalysis.topology.PSF")
logger = logging.getLogger(__name__)


class PSFParser(TopologyReaderBase):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/TOPParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
import warnings
import logging

logger = logging.getLogger("MDAnalysis.topology.TOPParser")
logger = logging.getLogger(__name__)


class TypeIndices(AtomAttr):
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/topology/TPRParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@

import logging

logger = logging.getLogger("MDAnalysis.topology.TPRparser")
logger = logging.getLogger(__name__)


class TPRParser(TopologyReaderBase):
Expand Down
Loading