Skip to content

Commit

Permalink
Reformat without quote normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherioszisis committed May 25, 2022
1 parent 678f627 commit 84fb851
Show file tree
Hide file tree
Showing 67 changed files with 4,772 additions and 2,635 deletions.
79 changes: 39 additions & 40 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

Expand All @@ -66,7 +66,7 @@
templates_path = ['_templates']

# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'

# General information about the project.
project = u'NeuroM'
Expand All @@ -86,38 +86,38 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
#language = None
# language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# keep_warnings = False

suppress_warnings = ["ref.python"]
autosummary_generate = True
Expand All @@ -127,7 +127,7 @@
}
autosummary_mock_imports = ['plotly']

#autoclass_content = 'both'
# autoclass_content = 'both'

# -- Options for HTML output ----------------------------------------------

Expand All @@ -140,7 +140,7 @@
# documentation.
html_theme_options = {
"repo_url": "https://github.com/BlueBrain/NeuroM/",
"repo_name": "BlueBrain/NeuroM"
"repo_name": "BlueBrain/NeuroM",
}


Expand All @@ -149,7 +149,7 @@
html_title = 'NeuroM'

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand All @@ -158,7 +158,7 @@
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -168,98 +168,97 @@
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'
# html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# html_search_scorer = 'scorer.js'

# -- Options for LaTeX output ---------------------------------------------

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# If true, show URL addresses after external links.
#man_show_urls = False

# man_show_urls = False


# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'
13 changes: 9 additions & 4 deletions neurom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,18 @@
>>> n_points = [n for n in nm.iter_neurites(pop, mapping, filter)]
"""
from neurom.core.dataformat import COLS
from neurom.core.morphology import (graft_morphology, iter_neurites,
iter_sections, iter_segments)
from neurom.core.morphology import graft_morphology
from neurom.core.morphology import iter_neurites
from neurom.core.morphology import iter_sections
from neurom.core.morphology import iter_segments
from neurom.core.types import NEURITES as NEURITE_TYPES
from neurom.core.types import NeuriteIter, NeuriteType
from neurom.core.types import NeuriteIter
from neurom.core.types import NeuriteType
from neurom.exceptions import NeuroMDeprecationWarning
from neurom.features import get
from neurom.io.utils import MorphLoader, load_morphologies, load_morphology
from neurom.io.utils import MorphLoader
from neurom.io.utils import load_morphologies
from neurom.io.utils import load_morphology

APICAL_DENDRITE = NeuriteType.apical_dendrite
BASAL_DENDRITE = NeuriteType.basal_dendrite
Expand Down
26 changes: 17 additions & 9 deletions neurom/apps/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,29 @@ def generate_annotation(result, settings):
if result.status:
return ''

header = ('\n\n'
f'({settings["label"]} ; MUK_ANNOTATION\n'
f' (Color {settings["color"]}) ; MUK_ANNOTATION\n'
f' (Name "{settings["name"]}") ; MUK_ANNOTATION')
header = (
'\n\n'
f'({settings["label"]} ; MUK_ANNOTATION\n'
f' (Color {settings["color"]}) ; MUK_ANNOTATION\n'
f' (Name "{settings["name"]}") ; MUK_ANNOTATION'
)
points = [p for _, _points in result.info for p in _points]
annotations = '\n'.join((f' '
f'({p[COLS.X]:10.2f} {p[COLS.Y]:10.2f} {p[COLS.Z]:10.2f} 0.50)'
f' ; MUK_ANNOTATION' for p in points))
annotations = '\n'.join(
(
f' '
f'({p[COLS.X]:10.2f} {p[COLS.Y]:10.2f} {p[COLS.Z]:10.2f} 0.50)'
f' ; MUK_ANNOTATION'
for p in points
)
)
footer = ') ; MUK_ANNOTATION\n'

return f'{header}\n{annotations}\n{footer}'


def annotate(results, settings):
"""Concatenate the annotations of all checkers."""
annotations = (generate_annotation(result, setting)
for result, setting in zip(results, settings))
annotations = (
generate_annotation(result, setting) for result, setting in zip(results, settings)
)
return '\n'.join(annot for annot in annotations if annot)
Loading

0 comments on commit 84fb851

Please sign in to comment.