for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
#! /usr/bin/env python
#
# Copyright (C) 2007-2009 Rich Lewis <[email protected]>
# License: 3-clause BSD
"""
skchem.core.point
Defining points in scikit-chem.
# the functionality here perhaps should be replaced by numpy arrays to get closer
# integration with the scientific python stack.
import rdkit.Geometry.rdGeometry
rdkit.Geometry.rdGeometry
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
from skchem.core import ChemicalObject
class Point3D(rdkit.Geometry.rdGeometry.Point3D, ChemicalObject):
""" Class representing a point in scikit-chem """
def to_dict(self, two_d=True):
""" Return a dictionary representation of the point """
if two_d:
return {"x": round(self.x), "y": round(self.y)}
Point3D
x
This check looks for calls to members that are non-existent. These calls will fail.
The member could have been renamed or removed.
y
else:
return {"x": round(self.x), "y": round(self.y), "z": round(self.z)}
z
def __repr__(self):
return '<{klass} coords="({x:.2f}, {y:.2f}, {z:.2f})" at {address}>'.format(
klass=self.__class__.__name__, \
x=self.x, \
y=self.y, \
z=self.z, \
address=hex(id(self)))
def __str__(self):
return '({x:.2f}, {y:.2f}, {z:.2f})'.format(x=self.x, y=self.y, z=self.z)
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.