Skip to content

Commit

Permalink
add auto lint jupyter-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
willingc committed Feb 1, 2019
1 parent 112a85a commit be6bfd4
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ jobs:
name: Build Jupyter Extension
command: npx lerna run build:asap --scope nteract-on-jupyter
no_output_timeout: 30m

- run:
name: Lint Jupyter Extension
command: |
pip install --user black
yarn run lint:jupyterExtension
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: 61feadc
hooks:
- id: black
language_version: python
30 changes: 30 additions & 0 deletions applications/jupyter-extension/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Example configuration for Black.

# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.

[tool.black]
line-length = 100
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
# The following are specific to Black, you probably don't want those.
| blib2to3
| tests/data
| profiling
)/
'''
skip-string-normalization = true

Empty file.
18 changes: 6 additions & 12 deletions applications/jupyter-extension/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
import os

version = '0.0.0-dev'
version = '0.0.1-dev'
name = "nteract_on_jupyter"

here = os.path.realpath(os.path.dirname(__file__))
Expand All @@ -14,11 +14,10 @@
packageJSON = json.load(f)
version = packageJSON['version']

config_d_filepath = os.path.join('jupyter-config',
'jupyter_notebook_config.d',
'nteract_on_jupyter.json')
data_files = [('etc/jupyter/jupyter_notebook_config.d', [config_d_filepath]),
]
config_d_filepath = os.path.join(
'jupyter-config', 'jupyter_notebook_config.d', 'nteract_on_jupyter.json'
)
data_files = [('etc/jupyter/jupyter_notebook_config.d', [config_d_filepath])]

setuptools.setup(
name=name,
Expand All @@ -32,10 +31,5 @@
zip_safe=False,
install_requires=['notebook'],
data_files=data_files,
entry_points={
'console_scripts': [
'jupyter-nteract = nteract_on_jupyter.nteractapp:main'
]
}

entry_points={'console_scripts': ['jupyter-nteract = nteract_on_jupyter.nteractapp:main']},
)

0 comments on commit be6bfd4

Please sign in to comment.