Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for proper comparison

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip"
Expand All @@ -34,7 +34,7 @@ jobs:
python -m pytest --collect-only tests/benchmark_text_service.py::test_regex_performance

- name: Restore benchmark data
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: .benchmarks
# Updated cache key to reset baseline due to performance optimization changes
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
# fi

- name: Upload benchmark results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: benchmark-results
path: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip"
Expand All @@ -40,9 +40,9 @@ jobs:
- python-version: "3.13"
install-profile: "nlp-advanced"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
PY

- name: Upload coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6
with:
files: ./coverage.xml
flags: ${{ matrix.install-profile }}-py${{ matrix.python-version }}
Expand All @@ -168,9 +168,9 @@ jobs:
- distributed
- web
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: "pip"
Expand Down Expand Up @@ -198,8 +198,8 @@ jobs:
wheel-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip"
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
BRANCH="dev"
fi

echo "release_type=$TYPE" >> $GITHUB_OUTPUT
echo "target_branch=$BRANCH" >> $GITHUB_OUTPUT
echo "release_type=$TYPE" >> "$GITHUB_OUTPUT"
echo "target_branch=$BRANCH" >> "$GITHUB_OUTPUT"
echo "Release type: $TYPE from $BRANCH"

- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ steps.resolve.outputs.target_branch }}
Expand All @@ -86,15 +86,15 @@ jobs:
if [ -z "$LAST_TAG" ]; then
COMMIT_COUNT=$(git rev-list --count --since="7 days ago" HEAD)
else
COMMIT_COUNT=$(git rev-list --count ${LAST_TAG}..HEAD)
COMMIT_COUNT=$(git rev-list --count "${LAST_TAG}..HEAD")
fi

echo "Commits since ${LAST_TAG:-'(none)'}: $COMMIT_COUNT"

if [ "$COMMIT_COUNT" -gt 0 ] || [ "${{ inputs.force_build }}" = "true" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "has_changes=true" >> "$GITHUB_OUTPUT"
else
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "has_changes=false" >> "$GITHUB_OUTPUT"
echo "No changes detected, skipping release"
fi

Expand All @@ -107,13 +107,13 @@ jobs:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ needs.determine-release.outputs.target_branch }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down Expand Up @@ -145,13 +145,13 @@ jobs:
if: needs.determine-release.outputs.has_changes == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ needs.determine-release.outputs.target_branch }}

- name: Set up Python 3.13
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
Expand All @@ -177,14 +177,14 @@ jobs:
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ needs.determine-release.outputs.target_branch }}
token: ${{ secrets.GH_PAT }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
VERSION="$BASE"
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Publishing version: $VERSION"

sed -i "s/__version__ = \".*\"/__version__ = \"$VERSION\"/" datafog/__about__.py
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
if: needs.determine-release.outputs.release_type != 'stable' && inputs.dry_run != true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Prune old alpha releases (keep 7)
if: needs.determine-release.outputs.release_type == 'alpha'
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

# Optional heavy dependencies
nlp_deps = [
"click>=8.0,<9.0",
"spacy>=3.7.0,<4.0",
]

Expand Down Expand Up @@ -57,6 +58,7 @@
]

cli_deps = [
"click>=8.0,<9.0",
"typer>=0.12.0",
"pydantic-settings>=2.0.0",
]
Expand Down
3 changes: 3 additions & 0 deletions tests/test_install_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ def test_install_profile_import_surface() -> None:
assert datafog.scan("Email jane@example.com").entities
assert datafog.redact("Email jane@example.com").redacted_text
elif profile == "cli":
import click # noqa: F401

from datafog.client import app

assert app is not None
elif profile == "nlp":
import click # noqa: F401
import spacy # noqa: F401

from datafog.models.spacy_nlp import SpacyAnnotator
Expand Down