Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Jul 18, 2024
2 parents 8ba7709 + 13d931e commit 4478cad
Show file tree
Hide file tree
Showing 16 changed files with 242 additions and 157 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: stumpylog
46 changes: 29 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,27 @@ jobs:
uses: actions/checkout@v4
-
name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
-
name: Install Hatch
run: |
pip3 --quiet install --upgrade hatch
pip3 --quiet install --upgrade hatch uv
hatch --version
uv --version
-
name: Lint project
run: |
hatch run lint:all
hatch fmt --check
-
name: Check project typing
run: |
hatch run typing:run
-
name: Check files with pre-commit
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

test:
name: Test (Python ${{ matrix.python-version }})
Expand All @@ -66,26 +72,30 @@ jobs:
sleep 5
-
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
id: py-setup
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
-
name: Install Hatch
run: |
pip3 --quiet install --upgrade hatch
pip3 --quiet install --upgrade hatch uv
hatch --version
uv --version
-
name: List installed dependencies
name: Show environment
run: |
hatch run pip-list
hatch test --show --python ${{ matrix.python-version }}
-
name: Run tests
run: |
hatch run cov
hatch test --cover --python ${{ matrix.python-version }}
ls -ahl .
-
name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
# not required for public repos, but intermittently fails otherwise
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -108,20 +118,22 @@ jobs:
uses: actions/checkout@v4
-
name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
-
name: Install Hatch
run: |
pip3 --quiet install --upgrade hatch
pip3 --quiet install --upgrade hatch uv
hatch --version
uv --version
-
name: Build
run: |
hatch build --clean
-
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*
Expand All @@ -141,14 +153,14 @@ jobs:
-
uses: actions/checkout@v4
-
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
-
name: Get latest release info
id: query-release-info
uses: release-flow/keep-a-changelog-action@v2
uses: release-flow/keep-a-changelog-action@v3
with:
command: query
version: ${{ github.ref_name }}
Expand All @@ -175,10 +187,10 @@ jobs:
- test
steps:
-
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
-
name: Publish build to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1.9.0
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -74,6 +74,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
25 changes: 1 addition & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ target/
# PyCharm
.idea

# VS Code
.vscode
/src-ui/.vscode
/docs/.vscode

# Other stuff that doesn't belong
.virtualenv
Expand All @@ -75,26 +71,7 @@ virtualenv
/docker-compose.env
/docker-compose.yml
.ruff_cache/

# Used for development
scripts/import-for-development
scripts/nuke

# Static files collected by the collectstatic command
/static/

# Stored PDFs
/media/
/data/
/paperless.conf
/consume/
/export/

# this is where the compiled frontend is moved to.
/src/documents/static/frontend/
.mypy_cache/

# mac os
.DS_Store

# celery schedule file
celerybeat-schedule*
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-docstring-first
- id: check-json
Expand All @@ -27,20 +27,18 @@ repos:
- id: check-case-conflict
- id: detect-private-key
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v3.0.3'
rev: 'v3.1.0'
hooks:
- id: prettier
types_or:
- javascript
- ts
- markdown
exclude: "(^Pipfile\\.lock$)"
# Python hooks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.4'
rev: 'v0.4.8'
hooks:
# Run the linter.
- id: ruff
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
# Run the formatter.
- id: ruff-format
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"files.exclude": {
"**/__pycache__": true,
"**/.mypy_cache": true,
"**/.ruff_cache": true,
"**/.pytest_cache": true,
"**/.cache": true,
"**/.coverage*": true
}
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.0] - 2024-07-18

### Changed

- Updated development tools
- Bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14 (by [@dependabot](https://github.com/apps/dependabot) in [#16](https://github.com/stumpylog/tika-client/pull/16))
- Update development to use `hatch test` and `hatch fmt` ([#17](https://github.com/stumpylog/tika-client/pull/17))
- Included `mypy` typing in the linting checks

## [0.5.0] - 2023-11-07

### Added
Expand All @@ -19,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `pypa/gh-action-pypi-publish` updated to v1.8.10
- CI testing now uses the official Apache Tika image (minimal) instead of the paperless-ngx image

### Fixed

- Typo in README codeblock by @Chaostheorie ([#19](https://github.com/stumpylog/tika-client/pull/19))

## [0.4.0] - 2023-07-27

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ from tika_client import TikaClient
test_file = Path("sample.docx")


with TikaClient("http://localhost:9998) as client
with TikaClient("http://localhost:9998") as client

# Extract a document's metadata
metadata = client.metadata.from_file(test_file)
Expand Down
Loading

0 comments on commit 4478cad

Please sign in to comment.