Skip to content
Merged

dev #84

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
32 changes: 25 additions & 7 deletions .github/workflows/tox_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,43 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
tox_matrix: ${{ steps.dataStep.outputs.myoutput }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
name: Get tox environments
with:
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- id: dataStep
run: |
pip install uv
echo "myoutput=$(uv run --quiet --only-group=tox tox --listenvs -a | jq --raw-input . | jq -c --slurp )" >> $GITHUB_OUTPUT

build:
needs: setup
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
tox-environment: ${{ fromJson(needs.setup.outputs.tox_matrix) }}
fail-fast: false
name: Python ${{ matrix.python-version }} ${{ matrix.os }} build
name: "${{ matrix.os }}: ${{ matrix.tox-environment }} "
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install requirements
run: |
pip install uv
- name: Run tox
run: uv run --only-group tox --with tox-uv --isolated tox -e py -vvv
env:
PIP_EXTRA_INDEX_URL: ${{vars.PIP_EXTRA_INDEX_URL}}
TOXENV: ${{ matrix.tox-environment }}
run: uv run --only-group=tox-uv tox run --runner uv-venv-lock-runner -e ${{matrix.tox-environment}}
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
University of Illinois/NCSA Open Source License
Copyright (c) 2026 University of Illinois at Urbana-Champaign. All rights reserved.

Developed by:
University of Illinois Library at Urbana-Champaign
University of Illinois at Urbana-Champaign

http://www.library.illinois.edu/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal with the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimers.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimers in the documentation and/or other materials provided with the distribution.

Neither the names of University of Illinois Library at Urbana-Champaign, University of Illinois at Urbana-Champaign,
nor the names of its contributors may be used to endorse or promote products derived from this Software without
specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
26 changes: 26 additions & 0 deletions ci/scripts/create_uv_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /usr/bin/env bash
# This script creates a global configuration file for Jenkins to make the UV cache metadata for longer than standard

set -e

MAX_AGE_API=6000
MAX_AGE_FILES=365000000

GLOBAL_CONFIG_FILE=uv.toml

echo "# This file is auto-generated by $(basename $0)" > $GLOBAL_CONFIG_FILE

echo '' >> $GLOBAL_CONFIG_FILE
echo '[[index]]' >> $GLOBAL_CONFIG_FILE
echo "url = \"https://pypi.org/simple\"" >> $GLOBAL_CONFIG_FILE
echo 'default = true' >> $GLOBAL_CONFIG_FILE
echo "cache-control = { api = \"max-age=$MAX_AGE_API\", files = \"max-age=$MAX_AGE_FILES, immutable\" }" >> $GLOBAL_CONFIG_FILE

for arg in "$@"; do
echo '' >> $GLOBAL_CONFIG_FILE
echo '[[index]]' >> $GLOBAL_CONFIG_FILE
echo "url = \"$arg\"" >> $GLOBAL_CONFIG_FILE
echo "cache-control = { api = \"max-age=$MAX_AGE_API\", files = \"max-age=$MAX_AGE_FILES, immutable\" }" >> $GLOBAL_CONFIG_FILE
done

echo "$(realpath $GLOBAL_CONFIG_FILE)"
23 changes: 23 additions & 0 deletions ci/scripts/new-uv-global-config.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$GLOBAL_CONFIG_FILE = "uv.toml"
$MAX_AGE_API="6000"
$MAX_AGE_FILES="365000000"

$scriptName = $MyInvocation.MyCommand.Name
"# This file is auto-generated by $scriptName" | Set-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8

'' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
'[[index]]' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
"url = `"https://pypi.org/simple`"" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
'default = true' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
"cache-control = { api = `"max-age=$MAX_AGE_API`", files = `"max-age=$MAX_AGE_FILES, immutable`" }" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8


foreach ($arg in $args) {
'' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
'[[index]]' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
"url = `"$arg`"" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
'default = true' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
"cache-control = { api = `"max-age=$MAX_AGE_API`", files = `"max-age=$MAX_AGE_FILES, immutable`" }" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
}

Write-Output (Get-ChildItem -Path $GLOBAL_CONFIG_FILE).FullName
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ version = "0.1.3.dev0"
requires-python = ">=3.10"

readme = "README.rst"
license = {text = "University of Illinois/NCSA Open Source License"}
license = "NCSA"
license-files = ["LICENSE"]
authors = [
{name = "University Library at The University of Illinois at Urbana Champaign: Preservation Services", email = "prescons@library.illinois.edu"},
]
Expand All @@ -18,11 +19,11 @@ maintainers = [
description = "This package is for performing automated quality control tests on file packages"
classifiers = [
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: University of Illinois/NCSA Open Source License",
"Topic :: System :: Archiving :: Packaging",
]

[dependency-groups]
audit-dependencies = ["uv-secure"]
docs = ["sphinx", "tomli ; python_full_version < '3.11'"]
type_checking = [
"mypy",
Expand All @@ -34,11 +35,16 @@ lint = [
{include-group = "type_checking"},
]
tox = ["tox"]
tox-uv = [
{include-group = "tox"},
"tox-uv-bare"
]
test = [
"coverage[toml]",
"pytest",
]
dev = [
{include-group = "audit-dependencies"},
{include-group = "docs"},
{include-group = "lint"},
{include-group = "test"},
Expand Down
8 changes: 3 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
envlist = py310, py311, py312, py313

envlist = py310, py311, py312, py313, py314, py314t

[pytest]
testpaths = tests
Expand All @@ -12,7 +11,6 @@ commands = {envbindir}/pytest --basetemp={envtmpdir}/pytest {posargs}

[testenv:docs]
changedir=docs
deps=
sphinx
dependency_groups = docs
commands=
{envbindir}/sphinx-build -d {envtmpdir}/doctrees source
{envbindir}/sphinx-build -d {envtmpdir}/doctrees source {temp_dir}/docs/html -W -b html
Loading
Loading