Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply black format #170

Merged
merged 5 commits into from
Jul 10, 2024
Merged
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
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
exclude = __init__.py
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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
exclude: 'docs/*'
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ 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)

### Fixed
- Unnecessary dependency in setup.py [#171](https://github.com/IN-CORE/pyincore-viz/issues/171)
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Please use pip for installing pyincore-viz at your discretion.
**Prerequisite**

* GDAL C library must be installed to install pyincore-viz. (for Ubuntu, **gdal-bin** and **libgdal-dev**)
* For developers, pre-install must be installed. If not, run `brew install pre-commit` or `pip install pre-commit`.

To install **pyincore-viz** package, run

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
Loading