Skip to content

Commit

Permalink
Apply black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ylyangtw committed Jun 18, 2024
1 parent d809d68 commit 081ffa8
Show file tree
Hide file tree
Showing 17 changed files with 1,187 additions and 691 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
extend-ignore = E501,E712,F541,F841
exclude = __init__.py
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Apply Black formatter [#169](https://github.com/IN-CORE/pyincore-viz/issues/169)

## [1.10.1] - 2023-06-12
### Added
- Google Analytics to the documentation site [#164](https://github.com/IN-CORE/pyincore-viz/issues/164)
Expand Down
105 changes: 55 additions & 50 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
import os
import sys

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../../pyincore_viz'))
sys.path.insert(0, os.path.abspath('../../tests'))
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../.."))
sys.path.insert(0, os.path.abspath("../../pyincore_viz"))
sys.path.insert(0, os.path.abspath("../../tests"))

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

project = 'pyIncore-viz'
author = 'Yong Wook Kim'
project = "pyIncore-viz"
author = "Yong Wook Kim"

# The short X.Y version
version = '1.10'
version = "1.10"
# The full version, including alpha/beta/rc tags
release = '1.10.1'
release = "1.10.1"

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

Expand All @@ -44,25 +44,26 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
# 'nbsphinx',
# 'sphinx.ext.viewcode',
'sphinx_rtd_theme',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo'
]
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
# 'nbsphinx',
# 'sphinx.ext.viewcode',
"sphinx_rtd_theme",
"sphinx.ext.ifconfig",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
source_suffix = [".rst", ".md"]

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation.rst
# for a list of supported languages.
Expand All @@ -74,13 +75,13 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# Disable notebook execution, nbsphinx not to execute
# nbsphinx_execute = 'never'

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# -- Custom configuration ---------------------------------------------------

Expand All @@ -90,8 +91,7 @@
# See also:
# http://www.sphinx-doc.org/en/stable/ext/autodoc.html#confval-autodoc_mock_importshttps://github.com/sphinx-doc/sphinx/issues/4182

autodoc_mock_imports = ['pyincore_viz', 'pytest', 'rasterstats']

autodoc_mock_imports = ["pyincore_viz", "pytest", "rasterstats"]


# This value selects what content will be inserted into the main body of an autoclass directive.
Expand All @@ -102,7 +102,7 @@
# “both”: Both the class ’ and the init method’s docstring are concatenated and inserted.
# “init”: Only the init method’s docstring is inserted.

autoclass_content = 'both'
autoclass_content = "both"

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

Expand All @@ -119,19 +119,19 @@
#
# html_theme_options = {}
html_theme_options = {
'canonical_url': '',
'analytics_id': '',
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
"canonical_url": "",
"analytics_id": "",
"logo_only": False,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": False,
"vcs_pageview_mode": "",
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -153,7 +153,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'pyincorevizdoc'
htmlhelp_basename = "pyincorevizdoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -162,15 +162,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -180,19 +177,21 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'pyIncore-viz.tex', 'pyIncore-viz Documentation',
'ISDA NCSA', 'manual'),
(
master_doc,
"pyIncore-viz.tex",
"pyIncore-viz Documentation",
"ISDA NCSA",
"manual",
),
]


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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pyIncore-viz', 'pyIncore-viz Documentation',
[author], 1)
]
man_pages = [(master_doc, "pyIncore-viz", "pyIncore-viz Documentation", [author], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -204,9 +203,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'pyIncore-viz', 'pyIncore-viz Documentation',
author, 'pyIncore-viz', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"pyIncore-viz",
"pyIncore-viz Documentation",
author,
"pyIncore-viz",
"One line description of project.",
"Miscellaneous",
),
]

# Documents to append as an appendix to all manuals.
Expand Down
Loading

0 comments on commit 081ffa8

Please sign in to comment.