Skip to content

Commit

Permalink
Release 1.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
gaborbernat committed Sep 8, 2023
1 parent db74b36 commit 1dc6f35
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 101 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@ concurrency:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- uses: pre-commit/[email protected]

test:
name: test on ${{ matrix.py }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- '3.11'
- '3.10'
- '3.9'
- '3.8'
Expand All @@ -40,7 +41,7 @@ jobs:
- name: setup python for tox
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: install tox
run: python -m pip install tox
- name: setup python for test ${{ matrix.py }}
Expand All @@ -64,7 +65,7 @@ jobs:

check:
name: check ${{ matrix.tox_env }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -73,10 +74,10 @@ jobs:
- dev
steps:
- uses: actions/checkout@v4
- name: setup Python 3.10
- name: setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: install tox
run: python -m pip install tox
- name: run check for ${{ matrix.tox_env }}
Expand All @@ -90,7 +91,7 @@ jobs:
- name: setup python to build package
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: install build
run: python -m pip install build
- uses: actions/checkout@v4
Expand All @@ -109,7 +110,7 @@ jobs:
- name: setup python to build package
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: install build
run: python -m pip install build
- uses: actions/checkout@v4
Expand Down
48 changes: 22 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -12,56 +12,52 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
rev: v3.10.1
hooks:
- id: pyupgrade
args: [ "--py36-plus" ]
args: [ "--py37-plus" ]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
args: [ --safe ]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [ black==21.12b0 ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
additional_dependencies: [ black==23.7 ]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.1.0"
hooks:
- id: rst-backticks
- id: pyproject-fmt
additional_dependencies: ["tox>=4.11"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.5.1"
rev: "1.3.1"
hooks:
- id: tox-ini-fmt
args: [ "-p", "fix" ]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
args: [ --min-py3-version, "3.7", "--max-py-version", "3.10" ]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==21.11.29
- flake8-comprehensions==3.7
- flake8-pytest-style==1.6
- flake8-unused-arguments==0.0.9
- flake8-noqa==1.2.1
- pep8-naming==0.12.1
- flake8-bugbear==23.7.10
- flake8-comprehensions==3.14
- flake8-pytest-style==1.7.2
- flake8-unused-arguments==0.0.13
- flake8-noqa==1.3.2
- pep8-naming==0.13.3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
exclude: ui-tests-ipw[78]\/.*
additional_dependencies:
- "pandas-stubs"
- "types-Pygments"
- "types-colorama"
- "types-setuptools"
- "pandas-stubs>=2.0.3.230814"
- "types-Pygments>=2.16"
- "types-colorama>=0.4.15.12"
- "types-setuptools>=68.1.0.1"
2 changes: 1 addition & 1 deletion ipydatagrid/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Bloomberg.
# Distributed under the terms of the Modified BSD License.

__version__ = "1.1.17"
__version__ = "1.2.0"
3 changes: 2 additions & 1 deletion ipydatagrid/datagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ def get_dataframe_index(self, dataframe):
return "key"

def get_cell_value(self, column_name, primary_key_value):
"""Gets the value for a single or multiple cells by column name and index name.
"""Gets the value for a single or multiple cells by column name and
index name.
Tuples should be used to index into multi-index columns."""
row_indices = self._get_row_index_of_primary_key(primary_key_value)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ipydatagrid",
"version": "1.1.17",
"version": "1.2.0",
"description": "Fast Datagrid widget for the Jupyter Notebook and JupyterLab",
"keywords": [
"jupyter",
Expand Down
93 changes: 42 additions & 51 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,71 +1,57 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
"jupyterlab~=4.0",
"hatchling>=1.18",
"jupyterlab>=4.0.5",
]
build-backend = "hatchling.build"

[project]
name = "ipydatagrid"
version = "1.2.0"
description = "Fast Datagrid widget for the Jupyter Notebook and JupyterLab"
readme = "README.md"
requires-python = ">=3.7"
keywords = [
"IPython",
"Jupyter",
"Widgets",
]
authors = [
{ name = "Bloomberg" },
]
keywords = [
"IPython",
"Jupyter",
"Widgets",
]
requires-python = ">=3.7"
classifiers = [
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"bqplot>=0.11.6",
"ipywidgets>=7.6.0,<9",
"pandas",
"py2vega>=0.5.0",
"bqplot>=0.11.6",
"ipywidgets<9,>=7.6",
"pandas>=2.1",
"py2vega>=0.5",
]
version = "1.1.17"

[project.license]
file = "LICENSE.txt"

[project.optional-dependencies]
test = [
"nbval>=0.9",
"pandas<=1.3.5",
"pytest-cov>=3",
"pytest>=6",
optional-dependencies.test = [
"nbval>=0.10",
"pytest>=7.4",
"pytest-cov>=4.1",
]

[project.urls]
Homepage = "https://github.com/bloomberg/ipydatagrid"
urls.Homepage = "https://github.com/bloomberg/ipydatagrid"
project.license = {file = "LICENSE.txt"}

[tool.hatch.build]
artifacts = [
"ipydatagrid/nbextension/index.*",
"ipydatagrid/labextension",
]

[tool.hatch.build.targets.wheel.shared-data]
"ipydatagrid/nbextension" = "share/jupyter/nbextensions/ipydatagrid"
"ipydatagrid/labextension" = "share/jupyter/labextensions/ipydatagrid"
"ipydatagrid.json" = "etc/jupyter/nbconfig/notebook.d/ipydatagrid.json"

[tool.hatch.build.targets.sdist]
exclude = [
targets.sdist.exclude = [
".github",
"examples",
"tests",
Expand All @@ -82,6 +68,11 @@ exclude = [
"jest*",
]

[tool.hatch.build.targets.wheel.shared-data]
"ipydatagrid/nbextension" = "share/jupyter/nbextensions/ipydatagrid"
"ipydatagrid/labextension" = "share/jupyter/labextensions/ipydatagrid"
"ipydatagrid.json" = "etc/jupyter/nbconfig/notebook.d/ipydatagrid.json"

[tool.hatch.build.hooks.jupyter-builder]
ensured-targets = [
"ipydatagrid/nbextension/index.js",
Expand All @@ -99,6 +90,10 @@ npm = [
"jlpm",
]

[tool.black]
line-length = 80
exclude = "/(\n \\.eggs\n | \\.git\n | \\.hg\n | \\.mypy_cache\n | \\.tox\n | \\.venv\n | _build\n | buck-out\n | build\n | dist\n)/\n"

[tool.isort]
profile = "black"
known_first_party = [
Expand All @@ -113,18 +108,14 @@ disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = "80"

[tool.black]
line-length = 80
exclude = "/(\n \\.eggs\n | \\.git\n | \\.hg\n | \\.mypy_cache\n | \\.tox\n | \\.venv\n | _build\n | buck-out\n | build\n | dist\n)/\n"

[tool.tbump]
field = [
{ name = "channel", default = "" },
{ name = "release", default = "" },
]

[tool.tbump.version]
current = "1.1.17"
current = "1.2.0"
regex = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<channel>a|b|rc|.dev)(?P<release>\\d+))?"

[tool.tbump.git]
Expand Down
24 changes: 12 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
[tox]
envlist =
requires =
tox>=4.2
env_list =
fix
py311
py310
py39
py38
py37
py36
pypy3
docs
pkg_desc
isolated_build = true
skip_missing_interpreters = true
minversion = 3.7

[testenv]
package = wheel
wheel_build_env = .pkg
extras =
test
commands =
pytest {tty:--color=yes} tests
pytest --nbval examples
package = wheel
wheel_build_env = .pkg

[testenv:fix]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
passenv =
PROGRAMDATA
skip_install = true
deps =
pre-commit>=2
pre-commit>=3.3.3
pass_env =
PROGRAMDATA
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:pkg_desc]
description = check that the long description is valid
skip_install = true
deps =
build[virtualenv]>=0.7
twine>=3.7
build[virtualenv]>=1
twine>=4.0.2
commands =
python -m build --sdist --wheel . -o {envtmpdir}
twine check {envtmpdir}/*

[testenv:dev]
description = dev environment with all deps at {envdir}
usedevelop = true
package = editable
extras =
dev
test
Expand Down

0 comments on commit 1dc6f35

Please sign in to comment.