Skip to content
Merged

Test #24

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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ max-line-length=120

# ignore E203: whitespace before ':'
# ignore W503: line break before binary operator
ignore=E203,W503,
ignore=E203,W503,
14 changes: 4 additions & 10 deletions .github/actions/install_package/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: install_package
description: Install a package from local poetry
description: Install a package from local pyproject.toml
inputs:
python_version:
description: "Python version to install"
Expand All @@ -16,21 +16,15 @@ runs:
python-version: ${{ inputs.python_version }}
allow-prereleases: true

- name: Install Poetry
- name: Install UV
shell: bash
run: |
python -m pip install --upgrade pip
pip install poetry
pip install uv
echo "python-version=${{ steps.setup_python.outputs.python-version }}" >> "$GITHUB_OUTPUT"

- name: Setup a local virtual environment (if no poetry.toml file)
shell: bash
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- name: Install Dependencies
shell: bash
run: |
poetry install --no-interaction
uv sync
echo "python-version=${{ steps.setup_python.outputs.python-version }}" >> "$GITHUB_OUTPUT"
2 changes: 1 addition & 1 deletion .github/workflows/py_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
python_version: ${{ matrix.python-version }}

- name: Run Tests
run: poetry run pytest
run: uv run pytest
6 changes: 3 additions & 3 deletions .github/workflows/py_test_np_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
numpy-version: ["numpy=^1", "numpy=^2"]
numpy-version: ["numpy>=1,<2", "numpy>=2,<3"]
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
python_version: ${{ matrix.python-version }}

- name: Install Numpy
run: poetry add ${{ matrix.numpy-version }}
run: uv add "${{ matrix.numpy-version }}"

- name: Run Tests
run: poetry run pytest
run: uv run pytest
8 changes: 4 additions & 4 deletions .github/workflows/version_publish_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ jobs:
python_version: 3.12

- name: Run Tests
run: poetry run pytest
run: uv run pytest

- name: Get current package version
shell: bash
id: get_version
run: |
CURRENT_VERSION=$(poetry version --short)
CURRENT_VERSION=$(uvx poetry version --short)
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
echo "CURRENT_VERSION=${CURRENT_VERSION}"

- name: Get latest version from PyPI
shell: bash
id: get_pypi_version
run: |
PACKAGE_NAME=$(poetry version | awk '{print $1}')
PACKAGE_NAME=$(uvx poetry version | awk '{print $1}')
LATEST_VERSION=$(curl -s https://pypi.org/pypi/$PACKAGE_NAME/json | jq -r .info.version)
echo "LATEST_VERSION=${LATEST_VERSION}" >> $GITHUB_ENV
echo "LATEST_VERSION=${LATEST_VERSION}"
Expand All @@ -56,7 +56,7 @@ jobs:
fi

- name: Package project
run: poetry build
run: uv build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
15 changes: 6 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ repos:
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master", "--branch", "test"]

- repo: https://github.com/python-poetry/poetry
rev: "1.8.0" # add version here
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: "0.5.27"
hooks:
- id: poetry-check
verbose: true
- id: poetry-lock
verbose: true
- id: poetry-install
verbose: true
# Update the uv lockfile
- id: uv-lock

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
rev: v0.9.4
hooks:
# Run the linter.
- id: ruff
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## v0.2.11 (2025-07-09)

### Refactor

- **ndarray**: remove deprecated tostring node
- reorganize project structure and update dependencies + version bump

## v0.2.2 (2024-08-25)
14 changes: 14 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
graft src
graft tests

global-exclude __pycache__/*
prune __pycache__
prune */__pycache__
recursive-exclude */__pycache__ *

global-exclude .venv/*
global-exclude .venv/**/*
prune .venv
prune */.venv
recursive-exclude .venv *
recursive-exclude */.venv *
1 change: 0 additions & 1 deletion funcnodes_numpy/_linalg/__init__.py

This file was deleted.

24 changes: 0 additions & 24 deletions funcnodes_numpy/constants.py

This file was deleted.

Loading
Loading