Skip to content

Commit 6d6e740

Browse files
Merge pull request #84 from UIUCLibrary/dev
dev
2 parents a218a3b + 1ab6ec1 commit 6d6e740

8 files changed

Lines changed: 944 additions & 257 deletions

File tree

.github/workflows/tox_matrix.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,43 @@ concurrency:
55
group: ${{ github.workflow }}-${{ github.ref }}
66
cancel-in-progress: true
77

8+
89
jobs:
10+
setup:
11+
name: Setup
12+
runs-on: ubuntu-latest
13+
outputs:
14+
tox_matrix: ${{ steps.dataStep.outputs.myoutput }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-python@v6
18+
name: Get tox environments
19+
with:
20+
python-version: '3.13'
21+
cache: 'pip' # caching pip dependencies
22+
- id: dataStep
23+
run: |
24+
pip install uv
25+
echo "myoutput=$(uv run --quiet --only-group=tox tox --listenvs -a | jq --raw-input . | jq -c --slurp )" >> $GITHUB_OUTPUT
26+
927
build:
28+
needs: setup
1029
runs-on: ${{ matrix.os }}
1130
strategy:
1231
matrix:
1332
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: ['3.10', '3.11', '3.12', '3.13']
33+
tox-environment: ${{ fromJson(needs.setup.outputs.tox_matrix) }}
1534
fail-fast: false
16-
name: Python ${{ matrix.python-version }} ${{ matrix.os }} build
35+
name: "${{ matrix.os }}: ${{ matrix.tox-environment }} "
1736
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v4
37+
- uses: actions/checkout@v6
38+
- uses: actions/setup-python@v6
2039
with:
21-
python-version: ${{ matrix.python-version }}
2240
cache: 'pip' # caching pip dependencies
2341
- name: Install requirements
2442
run: |
2543
pip install uv
2644
- name: Run tox
27-
run: uv run --only-group tox --with tox-uv --isolated tox -e py -vvv
2845
env:
29-
PIP_EXTRA_INDEX_URL: ${{vars.PIP_EXTRA_INDEX_URL}}
46+
TOXENV: ${{ matrix.tox-environment }}
47+
run: uv run --only-group=tox-uv tox run --runner uv-venv-lock-runner -e ${{matrix.tox-environment}}

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
University of Illinois/NCSA Open Source License
2+
Copyright (c) 2026 University of Illinois at Urbana-Champaign. All rights reserved.
3+
4+
Developed by:
5+
University of Illinois Library at Urbana-Champaign
6+
University of Illinois at Urbana-Champaign
7+
8+
http://www.library.illinois.edu/
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
11+
documentation files (the "Software"), to deal with the Software without restriction, including without limitation the
12+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
13+
persons to whom the Software is furnished to do so, subject to the following conditions:
14+
15+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
16+
disclaimers.
17+
18+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
19+
disclaimers in the documentation and/or other materials provided with the distribution.
20+
21+
Neither the names of University of Illinois Library at Urbana-Champaign, University of Illinois at Urbana-Champaign,
22+
nor the names of its contributors may be used to endorse or promote products derived from this Software without
23+
specific prior written permission.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
26+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS
27+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
28+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

ci/scripts/create_uv_config.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#! /usr/bin/env bash
2+
# This script creates a global configuration file for Jenkins to make the UV cache metadata for longer than standard
3+
4+
set -e
5+
6+
MAX_AGE_API=6000
7+
MAX_AGE_FILES=365000000
8+
9+
GLOBAL_CONFIG_FILE=uv.toml
10+
11+
echo "# This file is auto-generated by $(basename $0)" > $GLOBAL_CONFIG_FILE
12+
13+
echo '' >> $GLOBAL_CONFIG_FILE
14+
echo '[[index]]' >> $GLOBAL_CONFIG_FILE
15+
echo "url = \"https://pypi.org/simple\"" >> $GLOBAL_CONFIG_FILE
16+
echo 'default = true' >> $GLOBAL_CONFIG_FILE
17+
echo "cache-control = { api = \"max-age=$MAX_AGE_API\", files = \"max-age=$MAX_AGE_FILES, immutable\" }" >> $GLOBAL_CONFIG_FILE
18+
19+
for arg in "$@"; do
20+
echo '' >> $GLOBAL_CONFIG_FILE
21+
echo '[[index]]' >> $GLOBAL_CONFIG_FILE
22+
echo "url = \"$arg\"" >> $GLOBAL_CONFIG_FILE
23+
echo "cache-control = { api = \"max-age=$MAX_AGE_API\", files = \"max-age=$MAX_AGE_FILES, immutable\" }" >> $GLOBAL_CONFIG_FILE
24+
done
25+
26+
echo "$(realpath $GLOBAL_CONFIG_FILE)"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$GLOBAL_CONFIG_FILE = "uv.toml"
2+
$MAX_AGE_API="6000"
3+
$MAX_AGE_FILES="365000000"
4+
5+
$scriptName = $MyInvocation.MyCommand.Name
6+
"# This file is auto-generated by $scriptName" | Set-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
7+
8+
'' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
9+
'[[index]]' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
10+
"url = `"https://pypi.org/simple`"" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
11+
'default = true' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
12+
"cache-control = { api = `"max-age=$MAX_AGE_API`", files = `"max-age=$MAX_AGE_FILES, immutable`" }" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
13+
14+
15+
foreach ($arg in $args) {
16+
'' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
17+
'[[index]]' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
18+
"url = `"$arg`"" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
19+
'default = true' | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
20+
"cache-control = { api = `"max-age=$MAX_AGE_API`", files = `"max-age=$MAX_AGE_FILES, immutable`" }" | Add-Content -Path $GLOBAL_CONFIG_FILE -Encoding UTF8
21+
}
22+
23+
Write-Output (Get-ChildItem -Path $GLOBAL_CONFIG_FILE).FullName

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ version = "0.1.3.dev0"
88
requires-python = ">=3.10"
99

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

2525
[dependency-groups]
26+
audit-dependencies = ["uv-secure"]
2627
docs = ["sphinx", "tomli ; python_full_version < '3.11'"]
2728
type_checking = [
2829
"mypy",
@@ -34,11 +35,16 @@ lint = [
3435
{include-group = "type_checking"},
3536
]
3637
tox = ["tox"]
38+
tox-uv = [
39+
{include-group = "tox"},
40+
"tox-uv-bare"
41+
]
3742
test = [
3843
"coverage[toml]",
3944
"pytest",
4045
]
4146
dev = [
47+
{include-group = "audit-dependencies"},
4248
{include-group = "docs"},
4349
{include-group = "lint"},
4450
{include-group = "test"},

tox.ini

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[tox]
2-
envlist = py310, py311, py312, py313
3-
2+
envlist = py310, py311, py312, py313, py314, py314t
43

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

1312
[testenv:docs]
1413
changedir=docs
15-
deps=
16-
sphinx
14+
dependency_groups = docs
1715
commands=
18-
{envbindir}/sphinx-build -d {envtmpdir}/doctrees source
16+
{envbindir}/sphinx-build -d {envtmpdir}/doctrees source {temp_dir}/docs/html -W -b html

0 commit comments

Comments
 (0)