Skip to content

Commit

Permalink
Merge pull request #94 from timkpaine/tkp/jsdeps
Browse files Browse the repository at this point in the history
bump js deps, bump jlab support to version 4
  • Loading branch information
timkpaine authored Jul 12, 2023
2 parents 38bd98a + ccd4603 commit 0004369
Show file tree
Hide file tree
Showing 19 changed files with 2,724 additions and 3,012 deletions.
20 changes: 20 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[bumpversion]
current_version = 0.4.0
commit = True
tag = False

[bumpversion:file:jupyterlab_commands/_version.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:js/package.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

[bumpversion:file:binder/requirements.txt]
search = jupyterlab_commands=={current_version}
replace = jupyterlab_commands=={new_version}
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
jupyterlab_commands/nbconvert_functions/hideinput/templates/* linguist-vendored
docs/* linguist-documentation
* text=auto eol=lf

*.ipynb linguist-documentation

*.js text eol=lf
153 changes: 68 additions & 85 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

package-lock.json
lib

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -82,7 +20,6 @@ lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -103,10 +40,15 @@ htmlcov/
.coverage
.coverage.*
.cache
python_junit.xml
junit.xml
nosetests.xml
coverage.xml
*.cover
*,cover
.hypothesis/
.mypy_cache
.pytest_cache
.ruff_cache

# Translations
*.mo
Expand All @@ -116,61 +58,102 @@ coverage.xml
*.log
local_settings.py

# Flask stuff:
# Flask instance folder
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/source

# PyBuilder
target/

# Jupyter Notebook
# IPython Notebook
.ipynb_checkpoints
.autoversion

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
# =========================
# Operating System Files
# =========================

# Editor
.vscode
# OSX
# =========================

.DS_Store
.autoversion
docs/api
docs/index.md
python_junit.xml
*.tsbuildinfo
.vscode
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


# NPM
# ----
**/node_modules/

# Coverage data
# -------------
**/coverage/

# Notebook and lab extensions
jupyterlab_commands/labextension/*.tgz
jupyterlab_commands/labextension
15 changes: 9 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
include LICENSE
include README.md
include CODE_OF_CONDUCT.md
include CONTRIBUTING.md

include setup.cfg
include .bumpversion.cfg
include pyproject.toml
include Makefile

Expand All @@ -18,15 +17,19 @@ prune js/dist
prune js/docs
prune js/lib
prune js/node_modules
prune js/package-lock.json
prune js/yarn.lock

# Get rid of docs
prune docs

# get rid of binder
prune binder

# get rid of docs
prune docs

# get rid of test and lint artifacts
prune .mypy_cache
prune .pytest_cache
prune .ruff_cache

# Patterns to exclude from any directory
global-exclude *~
global-exclude *.pyc
Expand Down
65 changes: 44 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,45 +1,67 @@
###############
# Build Tools #
###############
build: ## build python/javascript
python -m build .

develop: ## install to site-packages in editable mode
python -m pip install --upgrade build pip setuptools twine wheel
cd js; yarn
python -m pip install -e .[develop]

install: ## install to site-packages
python -m pip install .

###########
# Testing #
###########
testpy: ## Clean and Make unit tests
python -m pytest -v jupyterlab_commands/tests --cov=jupyterlab_commands --junitxml=python_junit.xml --cov-report=xml --cov-branch
python -m pytest -v jupyterlab_commands/tests --junitxml=junit.xml --cov=jupyterlab_commands --cov-report xml --cov-branch --cov-fail-under=20 --cov-report term-missing

testjs: ## Clean and Make js tests
cd js; yarn test

test: tests
tests: testpy testjs ## run the tests

###########
# Linting #
###########
lintpy: ## Black/flake8 python
python -m black --check jupyterlab_commands setup.py docs/conf.py
python -m flake8 jupyterlab_commands setup.py docs/conf.py
python -m ruff jupyterlab_commands setup.py
python -m black --check jupyterlab_commands setup.py

lintjs: ## ESlint javascript
cd js; yarn lint

lint: lintpy lintjs ## run linter

fixpy: ## Black python
python -m black jupyterlab_commands/ setup.py docs/conf.py
python -m ruff jupyterlab_commands setup.py --fix
python -m black jupyterlab_commands/ setup.py

fixjs: ## ESlint Autofix JS
cd js; yarn fix

fix: fixpy fixjs ## run black/tslint fix
format: fix

#################
# Other Checks #
#################
check: checks
checks: ## run lint and other checks
check-manifest -v

build: ## build python/javascript
python -m build .
checks: check-manifest ## run security, packaging, and other checks

develop: ## install to site-packages in editable mode
python -m pip install --upgrade build pip setuptools twine wheel
cd js; yarn
python -m pip install -e .[develop]
check-manifest: ## run manifest checker for sdist
check-manifest -v

install: ## install to site-packages
python -m pip install .
semgrep: ## run semgrep
semgrep ci --config auto

################
# Distribution #
################
dist: clean build ## create dists
python -m twine check dist/*

Expand All @@ -51,20 +73,21 @@ publishjs: ## dist to npm

publish: dist publishpy publishjs ## dist to pypi and npm

docs: ## make documentation
make -C ./docs html
open ./docs/_build/html/index.html

############
# Cleaning #
############
clean: ## clean the repository
find . -name "__pycache__" | xargs rm -rf
find . -name "*.pyc" | xargs rm -rf
find . -name ".ipynb_checkpoints" | xargs rm -rf
rm -rf .coverage coverage *.xml build dist *.egg-info lib node_modules .pytest_cache *.egg-info .autoversion .mypy_cache
rm -rf .coverage coverage *.xml build dist *.egg-info lib node_modules .pytest_cache *.egg-info
rm -rf jupyterlab_commands/labextension
cd js && yarn clean
# make -C ./docs clean
git clean -fd

###########
# Helpers #
###########
# Thanks to Francoise at marmelab.com for this
.DEFAULT_GOAL := help
help:
Expand All @@ -73,4 +96,4 @@ help:
print-%:
@echo '$*=$($*)'

.PHONY: testjs testpy tests test lintpy lintjs lint fixpy fixjs fix format checks check build develop install labextension dist publishpy publishjs publish docs clean
.PHONY: testjs testpy tests test lintpy lintjs lint fixpy fixjs fix format checks check check-manifest semgrep build develop install labextension dist publishpy publishjs publish docs clean
Loading

0 comments on commit 0004369

Please sign in to comment.