Skip to content

Commit b47fff6

Browse files
Merge pull request #172 from UIUCLibrary/dev
Dev
2 parents dae38d2 + 535b0f4 commit b47fff6

6 files changed

Lines changed: 268 additions & 607 deletions

File tree

Jenkinsfile

Lines changed: 218 additions & 162 deletions
Large diffs are not rendered by default.

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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Documentation = "https://www.library.illinois.edu/dccdocs/imagevalidate"
3939
Download = "https://github.com/UIUCLibrary/imagevalidate"
4040

4141
[dependency-groups]
42-
audit-dependencies = ["uv-secure"]
4342
docs = ["sphinx"]
4443
type_checking = [
4544
"mypy",
@@ -64,7 +63,6 @@ dev = [
6463
{include-group = "docs"},
6564
{include-group = "lint"},
6665
{include-group = "test"},
67-
{include-group = "audit-dependencies"},
6866
"coverage[toml]",
6967
"gcovr;os_name!= 'nt'",
7068
]

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pass_env =
1010
LIBPATH
1111
dependency_groups = test
1212
commands = pytest --basetemp={envtmpdir}/pytest {posargs}
13+
uv_sync_flags = --no-editable
1314

1415
[testenv:docs]
1516
dependency_groups = docs

0 commit comments

Comments
 (0)