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

Black and flake8 #96

Merged
merged 10 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 15 additions & 0 deletions .github/workflows/flake8_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# use the flake8 linter to annotate improperly formatted code
# from: https://github.com/marketplace/actions/run-flake8-on-your-pr-with-annotations
name: Run flake8

on:
pull_request:
branches:
- development
- master
steps:
- name: Run flake8 on your PR - with annotations!
uses: tayfun/flake8-your-pr@1.0.1



5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
56 changes: 31 additions & 25 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

sys.path.insert(0, os.path.abspath("../.."))
import datetime

import icepyx
Expand All @@ -21,9 +22,9 @@

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

project = 'icepyx'
project = "icepyx"
year = datetime.date.today().year
copyright = '2019-{}, The icepyx Developers'.format(year)
copyright = "2019-{}, The icepyx Developers".format(year)

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

Expand All @@ -35,24 +36,23 @@
"sphinx.ext.autosectionlabel",
"numpydoc",
"nbsphinx",
"recommonmark"

"recommonmark",
]
source_suffix = {
'.rst': 'restructuredtext',
'.txt': 'markdown',
'.md': 'markdown',
".rst": "restructuredtext",
".txt": "markdown",
".md": "markdown",
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# 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 = ['**.ipynb_checkpoints']
exclude_patterns = ["**.ipynb_checkpoints"]

# location of master document (by default sphinx looks for contents.rst)
master_doc = 'index'
master_doc = "index"


# -- Configuration options ---------------------------------------------------
Expand All @@ -68,24 +68,30 @@
# html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'logo_only': True,
'display_version': False,
'prev_next_buttons_location': None,
'navigation_depth': 4,
'collapse_navigation': True
"logo_only": True,
"display_version": False,
"prev_next_buttons_location": None,
"navigation_depth": 4,
"collapse_navigation": True,
}
html_logo = '_static/icepyx_v2_oval_orig_nobackgr.png'
html_favicon = '_static/icepyx_v2_oval_tiny-uml_nobackgr.png'
html_static_path = ['_static']
html_logo = "_static/icepyx_v2_oval_orig_nobackgr.png"
html_favicon = "_static/icepyx_v2_oval_tiny-uml_nobackgr.png"
html_static_path = ["_static"]

html_context = {
'menu_links_name': '',
'menu_links': [
('<i class="fa fa-github fa-fw"></i> icepyx Github', 'https://github.com/icesat2py/icepyx'),
('<i class="fa fa-comments fa-fw"></i> Pangeo Discourse', 'https://discourse.pangeo.io/t/icepyx-python-tools-for-icesat-2-data/404/2')

]
"menu_links_name": "",
"menu_links": [
(
'<i class="fa fa-github fa-fw"></i> icepyx Github',
"https://github.com/icesat2py/icepyx",
),
(
'<i class="fa fa-comments fa-fw"></i> Pangeo Discourse',
"https://discourse.pangeo.io/t/icepyx-python-tools-for-icesat-2-data/404/2",
),
],
}


def setup(app):
app.add_stylesheet("style.css")
2 changes: 1 addition & 1 deletion icepyx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .core import icesat2data
from .core import icesat2data
Loading