QInfer/python-qinfer

View on GitHub
src/qinfer/unstructured_models.py

Summary

Maintainability
A
0 mins
Test Coverage

TODO found
Open

    # TODO: DEFINE VALIDITY
Severity: Minor
Found in src/qinfer/unstructured_models.py by fixme

TODO found
Open

    # TODO: CANONICALIZE
Severity: Minor
Found in src/qinfer/unstructured_models.py by fixme

TODO found
Open

    # TODO: DEFINE PARAMETERS
Severity: Minor
Found in src/qinfer/unstructured_models.py by fixme

TODO found
Open

    # TODO: INITIALIZER
Severity: Minor
Found in src/qinfer/unstructured_models.py by fixme

At least two spaces before inline comment
Open

from __future__ import division # Ensures that a/b is always a float.
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

Separate inline comments by at least two spaces.

An inline comment is a comment on the same line as a statement.
Inline comments should be separated by at least two spaces from the
statement. They should start with a # and a single space.

Each line of a block comment starts with a # and a single space
(unless it is indented text inside the comment).

Okay: x = x + 1  # Increment x
Okay: x = x + 1    # Increment x
Okay: # Block comment
E261: x = x + 1 # Increment x
E262: x = x + 1  #Increment x
E262: x = x + 1  #  Increment x
E265: #Block comment
E266: ### Block comment

Indentation contains tabs
Open

    #       Needs to take number of peaks.
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    # TODO: DEFINE VALIDITY
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    .. math::
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    #       expparams is just a float, but modelparams is 3 * n_peaks
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        \Pr(0 | \vec{a}, \vec{\omega}, \vec{\phi}; t) = \sum_i a_i \cos^2(\omega_i t + \phi_i),
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    where :math:`\vec{x} = (\vec{a}, \vec{\omega}, \vec{\phi})` are the
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    # TODO: INITIALIZER
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    # TODO: CANONICALIZE
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    #       this will be a pain: sort by omega, keeping a and phi in same order,
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    'UnstructuredFrequencyModel'
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    r"""
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    Represents estimating a likelihood function of the form
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    model parameters.
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    #       then normalize to sum_i a_i = 1. Is this valid?
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

No newline at end of file
Open

    #       then normalize to sum_i a_i = 1. Is this valid?
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

Trailing blank lines are superfluous.

Okay: spam(1)
W391: spam(1)\n

However the last line should end with a new line (warning W292).

Expected 2 blank lines, found 1
Open

class UnstructuredFrequencyModel(Model):
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Line too long (89 > 79 characters)
Open

        \Pr(0 | \vec{a}, \vec{\omega}, \vec{\phi}; t) = \sum_i a_i \cos^2(\omega_i t + \phi_i),
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

    """
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    # TODO: DEFINE PARAMETERS
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    #       define names, number
Severity: Minor
Found in src/qinfer/unstructured_models.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

There are no issues that match your filters.

Category
Status