gamster 0.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gamster-0.6.4/.github/workflows/docs.yml +81 -0
- gamster-0.6.4/.gitignore +178 -0
- gamster-0.6.4/.gitlab-ci.yml +125 -0
- gamster-0.6.4/CHANGELOG.md +75 -0
- gamster-0.6.4/LICENSE +21 -0
- gamster-0.6.4/Makefile +25 -0
- gamster-0.6.4/PKG-INFO +120 -0
- gamster-0.6.4/README.md +109 -0
- gamster-0.6.4/coverage.sh +2 -0
- gamster-0.6.4/docs/de/docs/api/create_bag.md +9 -0
- gamster-0.6.4/docs/de/docs/api/index.md +16 -0
- gamster-0.6.4/docs/de/docs/api/unpack.md +5 -0
- gamster-0.6.4/docs/de/docs/bag-structure.md +123 -0
- gamster-0.6.4/docs/de/docs/command-reference/create.md +49 -0
- gamster-0.6.4/docs/de/docs/command-reference/index.md +40 -0
- gamster-0.6.4/docs/de/docs/command-reference/unpack.md +31 -0
- gamster-0.6.4/docs/de/docs/images/gamster.png +0 -0
- gamster-0.6.4/docs/de/docs/index.md +12 -0
- gamster-0.6.4/docs/de/docs/install_uv.md +24 -0
- gamster-0.6.4/docs/de/docs/installation.md +79 -0
- gamster-0.6.4/docs/de/docs/object-directories.md +25 -0
- gamster-0.6.4/docs/de/zensical.toml +181 -0
- gamster-0.6.4/docs/en/docs/index.md +3 -0
- gamster-0.6.4/docs/en/zensical.toml +160 -0
- gamster-0.6.4/pyproject.toml +53 -0
- gamster-0.6.4/schemas/gams-sip-schema.json +207 -0
- gamster-0.6.4/src/gamster/__init__.py +11 -0
- gamster-0.6.4/src/gamster/cli.py +160 -0
- gamster-0.6.4/src/gamster/create_bag.py +191 -0
- gamster-0.6.4/src/gamster/loggers.py +50 -0
- gamster-0.6.4/src/gamster/unpack.py +142 -0
- gamster-0.6.4/tests/data/bags/obj.1/bag-info.txt +4 -0
- gamster-0.6.4/tests/data/bags/obj.1/bagit.txt +2 -0
- gamster-0.6.4/tests/data/bags/obj.1/data/content/DC.xml +20 -0
- gamster-0.6.4/tests/data/bags/obj.1/data/content/TEI_SOURCE.xml +37 -0
- gamster-0.6.4/tests/data/bags/obj.1/data/content/img.1.png +0 -0
- gamster-0.6.4/tests/data/bags/obj.1/data/content/img.2.jpg +0 -0
- gamster-0.6.4/tests/data/bags/obj.1/data/meta/sip.json +84 -0
- gamster-0.6.4/tests/data/bags/obj.1/manifest-md5.txt +5 -0
- gamster-0.6.4/tests/data/bags/obj.1/manifest-sha512.txt +5 -0
- gamster-0.6.4/tests/data/bags/obj.2/bag-info.txt +4 -0
- gamster-0.6.4/tests/data/bags/obj.2/bagit.txt +2 -0
- gamster-0.6.4/tests/data/bags/obj.2/data/content/DC.xml +20 -0
- gamster-0.6.4/tests/data/bags/obj.2/data/content/TEI_SOURCE.xml +37 -0
- gamster-0.6.4/tests/data/bags/obj.2/data/content/img.1.jpg +0 -0
- gamster-0.6.4/tests/data/bags/obj.2/data/content/img.2.png +0 -0
- gamster-0.6.4/tests/data/bags/obj.2/data/meta/sip.json +84 -0
- gamster-0.6.4/tests/data/bags/obj.2/manifest-md5.txt +5 -0
- gamster-0.6.4/tests/data/bags/obj.2/manifest-sha512.txt +5 -0
- gamster-0.6.4/tests/data/objects/obj.1/DC.xml +21 -0
- gamster-0.6.4/tests/data/objects/obj.1/TEI_SOURCE.xml +37 -0
- gamster-0.6.4/tests/data/objects/obj.1/datastreams.csv +5 -0
- gamster-0.6.4/tests/data/objects/obj.1/img.1.png +0 -0
- gamster-0.6.4/tests/data/objects/obj.1/img.2.jpg +0 -0
- gamster-0.6.4/tests/data/objects/obj.1/object.csv +2 -0
- gamster-0.6.4/tests/data/objects/obj.2/DC.xml +21 -0
- gamster-0.6.4/tests/data/objects/obj.2/TEI_SOURCE.xml +37 -0
- gamster-0.6.4/tests/data/objects/obj.2/datastreams.csv +5 -0
- gamster-0.6.4/tests/data/objects/obj.2/img.1.jpg +0 -0
- gamster-0.6.4/tests/data/objects/obj.2/img.2.png +0 -0
- gamster-0.6.4/tests/data/objects/obj.2/object.csv +2 -0
- gamster-0.6.4/tests/test_cli.py +291 -0
- gamster-0.6.4/tests/test_create_bag/out/bag1/data/content/DC.xml +18 -0
- gamster-0.6.4/tests/test_create_bag/out/bag1/data/content/IMG.jpeg +0 -0
- gamster-0.6.4/tests/test_create_bag/out/bag1/data/content/SOURCE.xml +250 -0
- gamster-0.6.4/tests/test_create_bag/out/bag1/data/meta/sip.json +0 -0
- gamster-0.6.4/tests/test_create_bag/src/project1.object1/DC.xml +18 -0
- gamster-0.6.4/tests/test_create_bag/src/project1.object1/IMG.jpeg +0 -0
- gamster-0.6.4/tests/test_create_bag/src/project1.object1/SOURCE.xml +250 -0
- gamster-0.6.4/tests/test_create_bag/src/project1.object1/datastreams.csv +4 -0
- gamster-0.6.4/tests/test_create_bag/src/project1.object1/object.csv +2 -0
- gamster-0.6.4/tests/test_create_bag.py +358 -0
- gamster-0.6.4/tests/test_integration.py +341 -0
- gamster-0.6.4/tests/test_loggers.py +96 -0
- gamster-0.6.4/tests/test_unpack.py +273 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Build and Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v7
|
|
24
|
+
|
|
25
|
+
- name: Configure GitHub Pages
|
|
26
|
+
uses: actions/configure-pages@v5
|
|
27
|
+
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
uses: actions/setup-python@v6
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
cache: pip
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install ./src
|
|
38
|
+
pip install zensical==0.0.50 mkdocstrings-python==2.0.5
|
|
39
|
+
|
|
40
|
+
- name: Build English docs
|
|
41
|
+
run: zensical build -c -f docs/en/zensical.toml
|
|
42
|
+
|
|
43
|
+
- name: Build German docs
|
|
44
|
+
run: zensical build -c -f docs/de/zensical.toml
|
|
45
|
+
|
|
46
|
+
- name: Assemble Pages artifact
|
|
47
|
+
run: |
|
|
48
|
+
mkdir -p _pages/de _pages/en
|
|
49
|
+
cp -a docs/de/site/. _pages/de/
|
|
50
|
+
cp -a docs/en/site/. _pages/en/
|
|
51
|
+
touch _pages/.nojekyll
|
|
52
|
+
cat > _pages/index.html <<'EOF'
|
|
53
|
+
<!doctype html>
|
|
54
|
+
<html lang="en">
|
|
55
|
+
<head>
|
|
56
|
+
<meta charset="utf-8">
|
|
57
|
+
<meta http-equiv="refresh" content="0; url=de/">
|
|
58
|
+
<title>gamspreprocessor</title>
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<p>Redirecting to <a href="de/">German documentation</a>.</p>
|
|
62
|
+
<p><a href="en/">English documentation</a></p>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
EOF
|
|
66
|
+
- name: Upload Pages artifact
|
|
67
|
+
uses: actions/upload-pages-artifact@v5
|
|
68
|
+
with:
|
|
69
|
+
path: _pages
|
|
70
|
+
|
|
71
|
+
deploy:
|
|
72
|
+
needs: build
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
environment:
|
|
75
|
+
name: github-pages
|
|
76
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
77
|
+
|
|
78
|
+
steps:
|
|
79
|
+
- name: Deploy to GitHub Pages
|
|
80
|
+
id: deployment
|
|
81
|
+
uses: actions/deploy-pages@v5
|
gamster-0.6.4/.gitignore
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
110
|
+
.pdm.toml
|
|
111
|
+
.pdm-python
|
|
112
|
+
.pdm-build/
|
|
113
|
+
|
|
114
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
115
|
+
__pypackages__/
|
|
116
|
+
|
|
117
|
+
# Celery stuff
|
|
118
|
+
celerybeat-schedule
|
|
119
|
+
celerybeat.pid
|
|
120
|
+
|
|
121
|
+
# SageMath parsed files
|
|
122
|
+
*.sage.py
|
|
123
|
+
|
|
124
|
+
# Environments
|
|
125
|
+
.env
|
|
126
|
+
.venv
|
|
127
|
+
env/
|
|
128
|
+
venv/
|
|
129
|
+
ENV/
|
|
130
|
+
env.bak/
|
|
131
|
+
venv.bak/
|
|
132
|
+
|
|
133
|
+
# Spyder project settings
|
|
134
|
+
.spyderproject
|
|
135
|
+
.spyproject
|
|
136
|
+
|
|
137
|
+
# Rope project settings
|
|
138
|
+
.ropeproject
|
|
139
|
+
|
|
140
|
+
# mkdocs documentation
|
|
141
|
+
/site
|
|
142
|
+
|
|
143
|
+
# mypy
|
|
144
|
+
.mypy_cache/
|
|
145
|
+
.dmypy.json
|
|
146
|
+
dmypy.json
|
|
147
|
+
|
|
148
|
+
# Pyre type checker
|
|
149
|
+
.pyre/
|
|
150
|
+
|
|
151
|
+
# pytype static type analyzer
|
|
152
|
+
.pytype/
|
|
153
|
+
|
|
154
|
+
# Cython debug symbols
|
|
155
|
+
cython_debug/
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
.idea/
|
|
163
|
+
|
|
164
|
+
# Custom
|
|
165
|
+
output_bag/
|
|
166
|
+
sample_bag/
|
|
167
|
+
tmp/
|
|
168
|
+
.vscode/
|
|
169
|
+
.python-version
|
|
170
|
+
requirements-dev.lock
|
|
171
|
+
requirements.lock
|
|
172
|
+
project.toml
|
|
173
|
+
uv.lock
|
|
174
|
+
schemas/cern-schema.json
|
|
175
|
+
schemas/sip-schema_generated.json
|
|
176
|
+
.DS_Store
|
|
177
|
+
foo.py
|
|
178
|
+
site/
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- test
|
|
3
|
+
- lint
|
|
4
|
+
- nightly-test
|
|
5
|
+
- tag-and-publish
|
|
6
|
+
|
|
7
|
+
variables:
|
|
8
|
+
UV_CACHE_DIR: "$CI_PROJECT_DIR/.uv-cache"
|
|
9
|
+
|
|
10
|
+
cache:
|
|
11
|
+
key:
|
|
12
|
+
files:
|
|
13
|
+
- uv.lock
|
|
14
|
+
paths:
|
|
15
|
+
- .uv-cache
|
|
16
|
+
|
|
17
|
+
workflow:
|
|
18
|
+
rules:
|
|
19
|
+
- if: $CI_PIPELINE_SOURCE == "push"
|
|
20
|
+
when: always
|
|
21
|
+
- if: $CI_PIPELINE_SOURCE == "web"
|
|
22
|
+
when: always
|
|
23
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
24
|
+
when: always
|
|
25
|
+
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
26
|
+
when: always
|
|
27
|
+
- when: never
|
|
28
|
+
|
|
29
|
+
# run on any push
|
|
30
|
+
pytest:
|
|
31
|
+
stage: test
|
|
32
|
+
rules:
|
|
33
|
+
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
34
|
+
when: never
|
|
35
|
+
- when: always
|
|
36
|
+
parallel:
|
|
37
|
+
matrix:
|
|
38
|
+
- PYTHON_VERSION: ["3.11", "3.12", "3.13", "3.14"]
|
|
39
|
+
script:
|
|
40
|
+
- uv python install $PYTHON_VERSION
|
|
41
|
+
- uv run --python $PYTHON_VERSION pytest
|
|
42
|
+
|
|
43
|
+
# Linting (Ruff normally only needs one python version): run on any push
|
|
44
|
+
lint-ruff:
|
|
45
|
+
stage: lint
|
|
46
|
+
rules:
|
|
47
|
+
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
48
|
+
when: never
|
|
49
|
+
- when: always
|
|
50
|
+
script:
|
|
51
|
+
- uv run ruff check src
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Nightly matrix: force fresh environments and dependency upgrades
|
|
56
|
+
nightly-pytest:
|
|
57
|
+
stage: nightly-test
|
|
58
|
+
rules:
|
|
59
|
+
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
60
|
+
when: always
|
|
61
|
+
- when: never
|
|
62
|
+
parallel:
|
|
63
|
+
matrix:
|
|
64
|
+
- PYTHON_VERSION: ["3.11", "3.12", "3.13", "3.14"]
|
|
65
|
+
script:
|
|
66
|
+
- echo "uv environment version"
|
|
67
|
+
- uv --version
|
|
68
|
+
- echo "Forcing fresh install and upgraded dependencies"
|
|
69
|
+
- rm -rf .venv
|
|
70
|
+
- uv cache clean
|
|
71
|
+
- uv sync --python $PYTHON_VERSION --upgrade
|
|
72
|
+
- echo "Using python version:"
|
|
73
|
+
- uv run --python $PYTHON_VERSION python --version
|
|
74
|
+
- echo "Running tests with uv"
|
|
75
|
+
- uv run --python $PYTHON_VERSION pytest tests
|
|
76
|
+
- uv python install $PYTHON_VERSION
|
|
77
|
+
- uv run --python $PYTHON_VERSION pytest
|
|
78
|
+
|
|
79
|
+
auto-tag-and-publish:
|
|
80
|
+
stage: tag-and-publish
|
|
81
|
+
image:
|
|
82
|
+
name: alpine/git:latest
|
|
83
|
+
entrypoint: [""]
|
|
84
|
+
rules:
|
|
85
|
+
- if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "schedule"
|
|
86
|
+
when: always
|
|
87
|
+
- when: never
|
|
88
|
+
script:
|
|
89
|
+
- apk add --no-cache python3 curl
|
|
90
|
+
- curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
91
|
+
- source $HOME/.local/bin/env
|
|
92
|
+
- VERSION_RAW=$(awk -F ' = ' '/^\[project\]/{in_project=1; next} /^\[/{in_project=0} in_project && /^version = / {gsub(/"/, "", $2); print $2; exit}' pyproject.toml)
|
|
93
|
+
- TAG="v${VERSION_RAW}"
|
|
94
|
+
- echo "Detected tag='$TAG'"
|
|
95
|
+
# check if tag already exists
|
|
96
|
+
- |
|
|
97
|
+
if git ls-remote --tags origin "refs/tags/${TAG}" | grep -q "${TAG}"; then
|
|
98
|
+
echo "Tag ${TAG} already exists, nothing to do"
|
|
99
|
+
else
|
|
100
|
+
echo "Creating tag ${TAG}"
|
|
101
|
+
git config user.email "ci@gitlab"
|
|
102
|
+
git config user.name "GitLab CI"
|
|
103
|
+
git tag "${TAG}"
|
|
104
|
+
# if we have an explicit token, use this, otherwise use the autimatically generated CI token
|
|
105
|
+
if [ -n "${GIT_PUSH_TOKEN}" ]; then
|
|
106
|
+
echo "Using GIT_PUSH_TOKEN for authentication"
|
|
107
|
+
PUSH_URL="https://oauth2:${GIT_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
|
108
|
+
else
|
|
109
|
+
echo "Using CI_JOB_TOKEN for authentication"
|
|
110
|
+
PUSH_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
|
111
|
+
fi
|
|
112
|
+
git push "${PUSH_URL}" "${TAG}" || {
|
|
113
|
+
echo "Tag push failed: configure GIT_PUSH_TOKEN (Project Access Token with write_repository)"
|
|
114
|
+
echo "or enable CI_JOB_TOKEN push rights in project settings."
|
|
115
|
+
exit 1
|
|
116
|
+
}
|
|
117
|
+
fi
|
|
118
|
+
- rm -rf .uv-cache .venv
|
|
119
|
+
- echo "Building package"
|
|
120
|
+
- uv build
|
|
121
|
+
- echo "Publishing ${TAG} to PyPI"
|
|
122
|
+
- uv publish --token "${UV_PUBLISH_TOKEN}"
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.6.4] 2026-07-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
* Rename project to "gamster"
|
|
13
|
+
* Add online documentation
|
|
14
|
+
|
|
15
|
+
## [0.6.3] 2026-05-18
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
* Update: enhance CI configuration
|
|
20
|
+
* Extend schema of sip.json: reflect the changes of the
|
|
21
|
+
sip.json schema (from gamslib):
|
|
22
|
+
|
|
23
|
+
- add sip_creation_timestamp
|
|
24
|
+
- add puid to contentfile
|
|
25
|
+
- add checksums
|
|
26
|
+
|
|
27
|
+
- Add Contact-Email to bag-info.txt
|
|
28
|
+
- Update datastream paths and gamslib dependency handling
|
|
29
|
+
- Update gamslib dependency (unify dspath handling)
|
|
30
|
+
- Fix wrong path in sip_json.from_objectmanager
|
|
31
|
+
|
|
32
|
+
## [0.6.2] 2025-12-19
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
* Update gamslib dependency
|
|
37
|
+
* Improve warnings filtering
|
|
38
|
+
|
|
39
|
+
## [0.6.1]
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
* Update gamslib dependency to 0.7.9
|
|
44
|
+
* Now detects unwanted datastreams like object.csv before packaging
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [0.6.0]
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
* Before packaging, each object dir is validated
|
|
52
|
+
|
|
53
|
+
## [0.5.1] 2025-11-21
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
* Enable tags in sip.json
|
|
58
|
+
* Requires gamslib 0.7.5
|
|
59
|
+
|
|
60
|
+
## [0.5.0] 2025-11-14
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
* Add unpack command
|
|
65
|
+
* Add support for zipped bags. Use the --zip option to create the bag as a zip file
|
|
66
|
+
The unpack command is able to deal also with zipped bags
|
|
67
|
+
* Fix issue with changed gamslib API
|
|
68
|
+
* Rename option --outputfolder to --outputdir
|
|
69
|
+
|
|
70
|
+
## [0.4.0] - 2025-10-16
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
* Moved sip validation and some utility function to gamslib
|
|
74
|
+
* Bump gamslib to 0.7.0
|
|
75
|
+
|
gamster-0.6.4/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vasold Gunter
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
gamster-0.6.4/Makefile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# make test, coverage, documentation, etc
|
|
2
|
+
SHELL := /bin/bash
|
|
3
|
+
|
|
4
|
+
.PHONY: all test coverage clean test-all build
|
|
5
|
+
|
|
6
|
+
all: test coverage lint build
|
|
7
|
+
|
|
8
|
+
test:
|
|
9
|
+
@uv run pytest tests
|
|
10
|
+
|
|
11
|
+
# Run all tests with different python versions
|
|
12
|
+
test-versions:
|
|
13
|
+
@uv run --python 3.11 --isolated --with-editable '.[test]' pytest && \
|
|
14
|
+
uv run --python 3.12 --isolated --with-editable '.[test]' pytest && \
|
|
15
|
+
uv run --python 3.13 --isolated --with-editable '.[test]' pytest && \
|
|
16
|
+
uv run --python 3.14 --isolated --with-editable '.[test]' pytest
|
|
17
|
+
|
|
18
|
+
coverage:
|
|
19
|
+
@uv run pytest tests --cov-report term-missing --cov=gamster
|
|
20
|
+
|
|
21
|
+
lint:
|
|
22
|
+
@uv run ruff check src
|
|
23
|
+
|
|
24
|
+
build:
|
|
25
|
+
@uv build
|
gamster-0.6.4/PKG-INFO
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gamster
|
|
3
|
+
Version: 0.6.4
|
|
4
|
+
Summary: Convert local GAMS object directories to BagitFiles.
|
|
5
|
+
Author-email: Fabio Tosques <fabio.tosques@uni-graz.at>, Gunter Vasold <gunter.vasold@uni-graz.at>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: click>=8.4.2
|
|
9
|
+
Requires-Dist: gamslib>=0.8.5
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# Gamster
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
`gamster` creates bag directories from *GAMS object directories*, which can then be ingested into GAMS.
|
|
17
|
+
The program can also convert bags back into GAMS object directories.
|
|
18
|
+
|
|
19
|
+
The command for creating Bags is `gamster create <PATH>`.
|
|
20
|
+
|
|
21
|
+
The command for "unpacking" Bags into GAMS object directories is:
|
|
22
|
+
`gamster unpack <PATH>`
|
|
23
|
+
|
|
24
|
+
```mermaid
|
|
25
|
+
graph LR
|
|
26
|
+
subgraph A[Object directory]
|
|
27
|
+
AA[Must contain files
|
|
28
|
+
that belong to the digital object,
|
|
29
|
+
plus 'DC.xml',
|
|
30
|
+
'object.csv', and
|
|
31
|
+
'datastreams.csv']
|
|
32
|
+
end
|
|
33
|
+
subgraph B[BAG]
|
|
34
|
+
BB[Data structure
|
|
35
|
+
in Bag format
|
|
36
|
+
that can be ingested,
|
|
37
|
+
i.e. one
|
|
38
|
+
Bag directory
|
|
39
|
+
per digital object]
|
|
40
|
+
end
|
|
41
|
+
A -->|gamster create| B[Bag file]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Using `unpack`, an object directory can be recreated from a bag directory at any time.
|
|
45
|
+
|
|
46
|
+
```mermaid
|
|
47
|
+
graph LR
|
|
48
|
+
subgraph A[Object directory]
|
|
49
|
+
AA[Must contain files
|
|
50
|
+
that belong to the digital object,
|
|
51
|
+
plus 'DC.xml',
|
|
52
|
+
'object.csv', and
|
|
53
|
+
'datastreams.csv']
|
|
54
|
+
end
|
|
55
|
+
subgraph B[BAG]
|
|
56
|
+
BB[Data structure
|
|
57
|
+
in Bag format
|
|
58
|
+
that can be ingested,
|
|
59
|
+
i.e. one
|
|
60
|
+
Bag directory
|
|
61
|
+
per digital object]
|
|
62
|
+
end
|
|
63
|
+
B[BAG] -->|gamster unpack| A[Object directory]
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
At the moment, only a command-line interface (CLI) is available. A GUI is planned.
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
### Without explicit installation
|
|
71
|
+
|
|
72
|
+
If the user has `uv` installed, `gamster` can be run directly without prior
|
|
73
|
+
installation via `uvx gamster` (or `uv tool install gamster`).
|
|
74
|
+
If needed, a suitable Python installation and virtual environment are created
|
|
75
|
+
in the background.
|
|
76
|
+
|
|
77
|
+
### Traditional installation
|
|
78
|
+
|
|
79
|
+
`pip install gamster`. We strongly recommend using a dedicated virtual
|
|
80
|
+
environment for this.
|
|
81
|
+
`gamster` and `gamspreprocessing` can be installed in the same virtual
|
|
82
|
+
environment.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
## Create Bags from object directories
|
|
87
|
+
|
|
88
|
+
`gamster create` creates Bags.
|
|
89
|
+
|
|
90
|
+
In the simplest form, this command is sufficient:
|
|
91
|
+
```
|
|
92
|
+
gamster create <PATH>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
* `PATH` can be a single object directory or a
|
|
96
|
+
directory that contains multiple object directories.
|
|
97
|
+
|
|
98
|
+
By default, the generated Bags are created in the `./bags` directory.
|
|
99
|
+
|
|
100
|
+
`gamster create` supports several options that control its behavior. Details
|
|
101
|
+
are available via `gamster create --help` or in the
|
|
102
|
+
[Online-Dokumentation](https://dhgraz.github.io/gamster/)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## Convert Bags into an object directory
|
|
107
|
+
|
|
108
|
+
To create an object directory from a Bag, this command is sufficient:
|
|
109
|
+
`gamster unpack <PATH>`. `PATH` is either the path to the bag to unpack or
|
|
110
|
+
to a directory that contains bags to unpack (these are also searched for in
|
|
111
|
+
subdirectories). `unpack` can handle both bag directories and zipped bags.
|
|
112
|
+
Here is a complete example that converts all bags in the `bags` directory into
|
|
113
|
+
object directories and creates them in the `objects` directory:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
gamster unpack -o objects bags
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
All available options are shown via `gamster unpack --help` and in the
|
|
120
|
+
[online documentation](https://dhgraz.github.io/gamster/).
|