Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 10 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- run: uvx pre-commit run --all-files

build:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.14"]
steps:
- uses: actions/setup-python@v4
- uses: actions/checkout@v6

- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Test with tox

- name: Test
run: |
pip install tox
tox
- uses: codecov/codecov-action@v3
if: ${{ matrix.python-version == '3.11' }}
uv run pytest --cov tuna --cov-report term
33 changes: 22 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.15.5
hooks:
- id: isort
# Run the linter.
- id: ruff-check
# Run the formatter.
- id: ruff-format

- repo: https://github.com/psf/black
rev: 22.3.0
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: black
language_version: python3
- id: prettier

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.6
# hooks:
# - id: codespell
# # args: ["-L", "sur,nd"]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.19.1
# hooks:
# - id: mypy
# files: src
# args: ["--install-types", "--non-interactive"]
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ pip install tuna

to install.

### Testing

To run the tuna unit tests, check out this repository and type

```
pytest
```

### IPython magics

tuna includes a `tuna` line / cell magic which can be used as a drop-in replacement for
Expand Down
20 changes: 9 additions & 11 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])"`
name := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['name'])"`
version := `python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])"`
name := `python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])"`


default:
Expand All @@ -23,21 +23,19 @@ clean:

dep:
npm install
cp node_modules/bootstrap/dist/css/bootstrap.min.css tuna/web/static/
cp node_modules/d3/dist/d3.min.js tuna/web/static/
cp node_modules/bootstrap/dist/css/bootstrap.min.css src/tuna/web/static/
cp node_modules/d3/dist/d3.min.js src/tuna/web/static/

update:
npm update
npm update --save-dev
npm outdated

lint:
flake8 .
black --check .
# blacken-docs README.md
npm run prettier
pre-commit run --all

format:
isort .
black .
prettier --write README.md .github tuna/web/static/icicle.js tuna/web/static/tuna.css tuna/web/index.html
ruff check --fix src/ tests/
black src/ tests/
# blacken-docs README.md
prettier --write README.md .github src/tuna/web/static/icicle.js src/tuna/web/static/tuna.css tuna/web/index.html
Loading