-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transition to hatch and pyproject.toml
Add support for Python 3.12 Update .github/workflow
- Loading branch information
Showing
11 changed files
with
144 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,59 +17,56 @@ jobs: | |
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected].0 | ||
uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected].1 | ||
|
||
codeql: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: python, javascript | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
uses: github/codeql-action/analyze@v3 | ||
|
||
pytest: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] | ||
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] | ||
pandas-version: [latest] | ||
include: | ||
- python-version: 3.6 | ||
pandas-version: 0.22 | ||
- python-version: 3.7 | ||
pandas-version: '<1.0' | ||
- python-version: 3.9 | ||
pandas-version: 1.5 | ||
- python-version: "3.11" | ||
pandas-version: '<2.0' | ||
- python-version: "3.12" | ||
pandas-version: pre | ||
polars: true | ||
- python-version: "3.11" | ||
- python-version: "3.12" | ||
uninstall_jinja2: true | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
- name: Install a development version of 'itables' | ||
run: pip install -e . | ||
run: pip install -e .[test] | ||
|
||
- name: Install pandas latest | ||
if: matrix.pandas-version == 'latest' | ||
|
@@ -79,7 +76,7 @@ jobs: | |
run: pip install pandas --pre | ||
- name: Install pandas ${{ matrix.pandas-version }} | ||
if: matrix.pandas-version != 'pre' && matrix.pandas-version != 'latest' | ||
run: pip install pandas==${{ matrix.pandas-version }} | ||
run: pip install 'pandas${{ matrix.pandas-version }}' | ||
|
||
- name: Install polars | ||
if: matrix.polars | ||
|
@@ -97,3 +94,19 @@ jobs: | |
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v3 | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install hatch | ||
run : pip install hatch | ||
- name: Build package | ||
run: hatch build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,81 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools", "requests", "pathlib"] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "itables" | ||
authors = [{name = "Marc Wouts", email = "[email protected]"}] | ||
maintainers = [{name = "Marc Wouts", email = "[email protected]"}] | ||
description = "Pandas and Polar DataFrames as interactive datatables" | ||
readme = "README.md" | ||
keywords = ["Pandas", "Polars", "Interactive", "Javascript", "datatables-net"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: MIT License", | ||
"Framework :: Jupyter", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"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", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
requires-python = ">= 3.7" | ||
dependencies = ["IPython", "pandas", "numpy"] | ||
dynamic = ["version"] | ||
|
||
[tool.hatch.version] | ||
path = "itables/version.py" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
# Pytest | ||
"pytest", | ||
"pytest-cov", | ||
# Sample dfs | ||
"pytz", | ||
"world_bank_data", | ||
# Test the documentation | ||
"ipykernel", | ||
"nbconvert", | ||
"jupytext", | ||
# Pandas style | ||
"matplotlib", | ||
# Shiny test app | ||
"shiny" | ||
] | ||
polars = ["polars", "pyarrow"] | ||
|
||
[project.urls] | ||
Homepage = "https://mwouts.github.io/itables/" | ||
Documentation = "https://mwouts.github.io/itables" | ||
Repository = "https://github.com/mwouts/itables.git" | ||
Issues = "https://github.com/mwouts/itables/issues" | ||
Changelog = "https://github.com/mwouts/itables/blob/main/docs/changelog.md" | ||
|
||
[pycodestyle] | ||
max-line-length = 88 | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
# Have to re-enable the standard pragma | ||
"pragma: no cover", | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
"raise NotImplementedError", | ||
"except ImportError", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder] | ||
dependencies = ["hatch-jupyter-builder"] | ||
build-function = "hatch_jupyter_builder.npm_builder" | ||
ensured-targets = ["itables/dt_bundle/dt.js", "itables/dt_bundle/dt.css"] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
path = "itables/dt_package" | ||
build_cmd = "build" | ||
npm = ["npm"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.