gamslib 0.7.5__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.
- gamslib-0.7.5/.gitignore +28 -0
- gamslib-0.7.5/.gitlab-ci.yml +56 -0
- gamslib-0.7.5/CHANGELOG.md +152 -0
- gamslib-0.7.5/LICENSE +21 -0
- gamslib-0.7.5/Makefile +30 -0
- gamslib-0.7.5/PKG-INFO +102 -0
- gamslib-0.7.5/README.md +71 -0
- gamslib-0.7.5/pyproject.toml +66 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/formatdetector.html +176 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/formatinfo.html +659 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/index.html +268 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/jsontypes.html +267 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/magikadetector.html +249 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/minimaldetector.html +224 -0
- gamslib-0.7.5/reference/gamslib/formatdetect/xmltypes.html +215 -0
- gamslib-0.7.5/reference/gamslib/index.html +106 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/create_csv.html +706 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/defaultvalues.html +80 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/dsdata.html +426 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/dublincore.html +562 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/exceptions.html +108 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/index.html +2397 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/manage_csv.html +255 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/objectcollection.html +610 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/objectcsvmanager.html +771 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/objectdata.html +361 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/utils.html +243 -0
- gamslib-0.7.5/reference/gamslib/objectcsv/xlsx.html +241 -0
- gamslib-0.7.5/reference/gamslib/projectconfiguration/configuration.html +475 -0
- gamslib-0.7.5/reference/gamslib/projectconfiguration/index.html +212 -0
- gamslib-0.7.5/reference/gamslib/projectconfiguration/utils.html +525 -0
- gamslib-0.7.5/reference/gamslib/sip/index.html +141 -0
- gamslib-0.7.5/reference/gamslib/sip/utils.html +426 -0
- gamslib-0.7.5/reference/gamslib/sip/validation/baginfo.html +429 -0
- gamslib-0.7.5/reference/gamslib/sip/validation/bagit.html +230 -0
- gamslib-0.7.5/reference/gamslib/sip/validation/index.html +335 -0
- gamslib-0.7.5/reference/gamslib/sip/validation/manifests.html +236 -0
- gamslib-0.7.5/reference/gamslib/sip/validation/sip_json.html +195 -0
- gamslib-0.7.5/src/gamslib/__init__.py +20 -0
- gamslib-0.7.5/src/gamslib/formatdetect/__init__.py +115 -0
- gamslib-0.7.5/src/gamslib/formatdetect/formatdetector.py +43 -0
- gamslib-0.7.5/src/gamslib/formatdetect/formatinfo.py +157 -0
- gamslib-0.7.5/src/gamslib/formatdetect/jsontypes.py +133 -0
- gamslib-0.7.5/src/gamslib/formatdetect/magikadetector.py +100 -0
- gamslib-0.7.5/src/gamslib/formatdetect/minimaldetector.py +76 -0
- gamslib-0.7.5/src/gamslib/formatdetect/resources/json_subformats.csv +5 -0
- gamslib-0.7.5/src/gamslib/formatdetect/resources/readme.txt +33 -0
- gamslib-0.7.5/src/gamslib/formatdetect/resources/xml_subformats.csv +41 -0
- gamslib-0.7.5/src/gamslib/formatdetect/xmltypes.py +173 -0
- gamslib-0.7.5/src/gamslib/objectcsv/__init__.py +56 -0
- gamslib-0.7.5/src/gamslib/objectcsv/create_csv.py +392 -0
- gamslib-0.7.5/src/gamslib/objectcsv/defaultvalues.py +48 -0
- gamslib-0.7.5/src/gamslib/objectcsv/dsdata.py +142 -0
- gamslib-0.7.5/src/gamslib/objectcsv/dublincore.py +271 -0
- gamslib-0.7.5/src/gamslib/objectcsv/exceptions.py +13 -0
- gamslib-0.7.5/src/gamslib/objectcsv/manage_csv.py +97 -0
- gamslib-0.7.5/src/gamslib/objectcsv/objectcollection.py +206 -0
- gamslib-0.7.5/src/gamslib/objectcsv/objectcsvmanager.py +288 -0
- gamslib-0.7.5/src/gamslib/objectcsv/objectdata.py +119 -0
- gamslib-0.7.5/src/gamslib/objectcsv/utils.py +167 -0
- gamslib-0.7.5/src/gamslib/objectcsv/xlsx.py +95 -0
- gamslib-0.7.5/src/gamslib/projectconfiguration/__init__.py +78 -0
- gamslib-0.7.5/src/gamslib/projectconfiguration/configuration.py +186 -0
- gamslib-0.7.5/src/gamslib/projectconfiguration/resources/gitignore +1 -0
- gamslib-0.7.5/src/gamslib/projectconfiguration/resources/project.toml +36 -0
- gamslib-0.7.5/src/gamslib/projectconfiguration/utils.py +276 -0
- gamslib-0.7.5/src/gamslib/py.typed +0 -0
- gamslib-0.7.5/src/gamslib/sip/__init__.py +19 -0
- gamslib-0.7.5/src/gamslib/sip/resources/sip-schema-d1.json +207 -0
- gamslib-0.7.5/src/gamslib/sip/utils.py +297 -0
- gamslib-0.7.5/src/gamslib/sip/validation/__init__.py +267 -0
- gamslib-0.7.5/src/gamslib/sip/validation/baginfo.py +209 -0
- gamslib-0.7.5/src/gamslib/sip/validation/bagit.py +112 -0
- gamslib-0.7.5/src/gamslib/sip/validation/manifests.py +119 -0
- gamslib-0.7.5/src/gamslib/sip/validation/sip_json.py +85 -0
- gamslib-0.7.5/tests/formatdetect/conftest.py +51 -0
- gamslib-0.7.5/tests/formatdetect/data/csv.csv +3 -0
- gamslib-0.7.5/tests/formatdetect/data/iiif_manifest.json +1 -0
- gamslib-0.7.5/tests/formatdetect/data/image.bmp +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.gif +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.jp2 +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.jpeg +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.jpg +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.png +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.tif +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.tiff +0 -0
- gamslib-0.7.5/tests/formatdetect/data/image.webp +0 -0
- gamslib-0.7.5/tests/formatdetect/data/json.json +15 -0
- gamslib-0.7.5/tests/formatdetect/data/json_ld.json +7 -0
- gamslib-0.7.5/tests/formatdetect/data/json_ld.jsonld +7 -0
- gamslib-0.7.5/tests/formatdetect/data/json_schema.json +7 -0
- gamslib-0.7.5/tests/formatdetect/data/jsonl.json +3 -0
- gamslib-0.7.5/tests/formatdetect/data/markdown.md +4 -0
- gamslib-0.7.5/tests/formatdetect/data/pdf-a_3b.pdf +0 -0
- gamslib-0.7.5/tests/formatdetect/data/pdf.pdf +0 -0
- gamslib-0.7.5/tests/formatdetect/data/text.txt +2 -0
- gamslib-0.7.5/tests/formatdetect/data/xml_lido.xml +365 -0
- gamslib-0.7.5/tests/formatdetect/data/xml_no_ns.xml +4 -0
- gamslib-0.7.5/tests/formatdetect/data/xml_tei.xml +263 -0
- gamslib-0.7.5/tests/formatdetect/data/xml_tei_with_rng.xml +252 -0
- gamslib-0.7.5/tests/formatdetect/test_formatdetect_init.py +80 -0
- gamslib-0.7.5/tests/formatdetect/test_formatinfo.py +196 -0
- gamslib-0.7.5/tests/formatdetect/test_jsontypes.py +162 -0
- gamslib-0.7.5/tests/formatdetect/test_magikadetector.py +122 -0
- gamslib-0.7.5/tests/formatdetect/test_minimaldetector.py +75 -0
- gamslib-0.7.5/tests/formatdetect/test_xmltypes.py +88 -0
- gamslib-0.7.5/tests/objectcsv/conftest.py +85 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/DC.xml +15 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/empty.foo +0 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/image.jpeg +0 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/json.json +15 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/sound.mp3 +0 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/video.mp4 +0 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/xml_lido.xml +365 -0
- gamslib-0.7.5/tests/objectcsv/data/obj1/xml_tei.xml +263 -0
- gamslib-0.7.5/tests/objectcsv/data/project.toml +29 -0
- gamslib-0.7.5/tests/objectcsv/test_create_csv/objects/obj1/DC.xml +16 -0
- gamslib-0.7.5/tests/objectcsv/test_create_csv/objects/obj1/SOURCE.xml +250 -0
- gamslib-0.7.5/tests/objectcsv/test_create_csv/objects/obj2/DC.xml +14 -0
- gamslib-0.7.5/tests/objectcsv/test_create_csv/project.toml +14 -0
- gamslib-0.7.5/tests/objectcsv/test_create_csv.py +550 -0
- gamslib-0.7.5/tests/objectcsv/test_csvutils/lido.xml +365 -0
- gamslib-0.7.5/tests/objectcsv/test_csvutils/tei.xml +250 -0
- gamslib-0.7.5/tests/objectcsv/test_csvutils.py +229 -0
- gamslib-0.7.5/tests/objectcsv/test_dsdata.py +147 -0
- gamslib-0.7.5/tests/objectcsv/test_dublincore/DC.xml +20 -0
- gamslib-0.7.5/tests/objectcsv/test_dublincore.py +288 -0
- gamslib-0.7.5/tests/objectcsv/test_exceptions.py +15 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/collected_csvs/all_datastreams.csv +7 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/collected_csvs/all_objects.csv +3 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj1/DC.xml +0 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj1/datastreams.csv +4 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj1/object.csv +2 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj2/DC.xml +0 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj2/datastreams.csv +4 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv/objects/obj2/object.csv +2 -0
- gamslib-0.7.5/tests/objectcsv/test_manage_csv.py +165 -0
- gamslib-0.7.5/tests/objectcsv/test_objectcollection.py +369 -0
- gamslib-0.7.5/tests/objectcsv/test_objectcsvmanager.py +490 -0
- gamslib-0.7.5/tests/objectcsv/test_objectdata.py +111 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx/datastreams.csv +4 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx/datastreams_encoding_problem.csv +4 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx/objects.csv +2 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx/objects_encoding_problem.csv +2 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx/simple.csv +3 -0
- gamslib-0.7.5/tests/objectcsv/test_xlsx.py +91 -0
- gamslib-0.7.5/tests/projectconfiguration/test_cfg_utils/foo/bar/readme.txt +1 -0
- gamslib-0.7.5/tests/projectconfiguration/test_cfg_utils/project.toml +13 -0
- gamslib-0.7.5/tests/projectconfiguration/test_cfg_utils/windotenv +4 -0
- gamslib-0.7.5/tests/projectconfiguration/test_cfg_utils.py +256 -0
- gamslib-0.7.5/tests/projectconfiguration/test_configuration/invalid.toml +1 -0
- gamslib-0.7.5/tests/projectconfiguration/test_configuration/invalid_value.toml +9 -0
- gamslib-0.7.5/tests/projectconfiguration/test_configuration/project.toml +13 -0
- gamslib-0.7.5/tests/projectconfiguration/test_configuration.py +275 -0
- gamslib-0.7.5/tests/projectconfiguration/test_init/project.toml +12 -0
- gamslib-0.7.5/tests/projectconfiguration/test_init.py +46 -0
- gamslib-0.7.5/tests/sip/test_siputils/DC.xml +0 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder1/DC.xml +1 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder2/DC.xml +1 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder2/foo.txt +1 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder3/folder_a/DC.xml +3 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder3/folder_b/bar.txt +1 -0
- gamslib-0.7.5/tests/sip/test_siputils/folder3/foo.txt +5 -0
- gamslib-0.7.5/tests/sip/test_siputils.py +435 -0
- gamslib-0.7.5/tests/sip/validate/conftest.py +111 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/bag-info.txt +5 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/bagit.txt +2 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/data/content/DC.xml +17 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/data/content/IMG.jpeg +0 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/data/meta/sip.json +41 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/manifest-md5.txt +3 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/manifest-sha256.txt +3 -0
- gamslib-0.7.5/tests/sip/validate/data/valid_bag/manifest-sha512.txt +3 -0
- gamslib-0.7.5/tests/sip/validate/test_bag_info_text.py +173 -0
- gamslib-0.7.5/tests/sip/validate/test_baginfo.py +94 -0
- gamslib-0.7.5/tests/sip/validate/test_bagit_txt.py +90 -0
- gamslib-0.7.5/tests/sip/validate/test_manifests.py +91 -0
- gamslib-0.7.5/tests/sip/validate/test_sip_json.py +271 -0
- gamslib-0.7.5/tests/sip/validate/test_structure.py +100 -0
- gamslib-0.7.5/tests/sip/validate/test_validate.py +10 -0
- gamslib-0.7.5/tests/sip/validate/test_validation_init.py +419 -0
gamslib-0.7.5/.gitignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# python generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# venv
|
|
10
|
+
.venv
|
|
11
|
+
.coverage
|
|
12
|
+
.python-version
|
|
13
|
+
requirements-dev.lock
|
|
14
|
+
requirements.lock
|
|
15
|
+
.vscode/settings.json
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
foo.py
|
|
20
|
+
uv.lock
|
|
21
|
+
src/gamslib/validate/xml/X_dtdvalidator.py
|
|
22
|
+
src/gamslib/validate/xml/X_genericxmlvalidator.py
|
|
23
|
+
src/gamslib/validate/xml/X_lidovalidator.py
|
|
24
|
+
src/gamslib/validate/xml/X_teivalidator.py
|
|
25
|
+
tests/validate/xml/X_test_dtdvalidator.py
|
|
26
|
+
tests/validate/xml/data/Xminimal_non_existing_schema_reference.xml
|
|
27
|
+
.DS_Store
|
|
28
|
+
coverage
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
variables:
|
|
2
|
+
UV_VERSION: 0.5
|
|
3
|
+
PYTHON_BASE_VERSION: 3.12
|
|
4
|
+
BASE_LAYER: bookworm-slim
|
|
5
|
+
|
|
6
|
+
stages:
|
|
7
|
+
- test
|
|
8
|
+
- lint
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# A hidden job template that can be used by different Python versions
|
|
12
|
+
.test-template:
|
|
13
|
+
stage: test
|
|
14
|
+
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_BASE_VERSION-$BASE_LAYER
|
|
15
|
+
script:
|
|
16
|
+
- echo "uv environment version"
|
|
17
|
+
- uv --version
|
|
18
|
+
- echo "Pinning ${PYTHON_VERSION}"
|
|
19
|
+
- uv python pin ${PYTHON_VERSION}
|
|
20
|
+
- uv sync
|
|
21
|
+
- echo "Using python version:"
|
|
22
|
+
- python --version
|
|
23
|
+
- echo "Running tests with uv"
|
|
24
|
+
- uv run pytest tests
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
test-py_3.11:
|
|
28
|
+
extends: .test-template
|
|
29
|
+
variables:
|
|
30
|
+
PYTHON_VERSION: "3.11"
|
|
31
|
+
|
|
32
|
+
test-py_3.12:
|
|
33
|
+
extends: .test-template
|
|
34
|
+
variables:
|
|
35
|
+
PYTHON_VERSION: "3.12"
|
|
36
|
+
|
|
37
|
+
test-py_3.13:
|
|
38
|
+
extends: .test-template
|
|
39
|
+
variables:
|
|
40
|
+
PYTHON_VERSION: "3.13"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
lint:
|
|
44
|
+
stage: lint
|
|
45
|
+
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_BASE_VERSION-$BASE_LAYER
|
|
46
|
+
script:
|
|
47
|
+
- echo "uv environment version"
|
|
48
|
+
- uv --version
|
|
49
|
+
- echo "Using python version:"
|
|
50
|
+
- python --version
|
|
51
|
+
- echo "Running uv check with ruff"
|
|
52
|
+
- uv run ruff check src
|
|
53
|
+
|
|
54
|
+
.rules:
|
|
55
|
+
- if: $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_REF_NAME == "develop"
|
|
56
|
+
when: always
|
|
@@ -0,0 +1,152 @@
|
|
|
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.7.5] - 2025-11-21
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
* Add tags to object.csv
|
|
13
|
+
|
|
14
|
+
## [0.7.4] - 2025-11-19
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
* Add extract_id_from_tei() to objectcsv.utils
|
|
19
|
+
* Add extract_id_from_lido() to objectcsv.utils
|
|
20
|
+
* Add check_if_object_dir_matches_object_id() to objectcsv.utils
|
|
21
|
+
|
|
22
|
+
## [0.7.3] - 2025-11-19
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
* Allow uppercase letters in datastream ids
|
|
27
|
+
|
|
28
|
+
## [0.7.2] - 2025-11-11
|
|
29
|
+
|
|
30
|
+
* Add sip.utils.is_bag function
|
|
31
|
+
* Bump magika to 1.0.1
|
|
32
|
+
* Improve tests
|
|
33
|
+
* Fix .gitlab-ci.yml
|
|
34
|
+
|
|
35
|
+
## [0.7.1] - 2025-11-10
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
* Add more file names, which should not be treated as datastreams.
|
|
40
|
+
|
|
41
|
+
## [0.7.0] - 2025-10-16
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
* Add sip submodule
|
|
45
|
+
* Add Makefile
|
|
46
|
+
* Add reference (API documentation)
|
|
47
|
+
|
|
48
|
+
## [0.6.1] - 2025-07-23
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
* Code cleanup
|
|
53
|
+
* line in datastreams.csv are again saved sorted by dsid
|
|
54
|
+
|
|
55
|
+
## [0.6.0] - 2025-07-18
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
* Massively refactored.
|
|
60
|
+
* CSV handling was heavily rewritten: objectcsv was replaced by two new
|
|
61
|
+
classes: ObjectCSVManager and ObjectCollector
|
|
62
|
+
* mainResource is set automatically for XML files
|
|
63
|
+
* title for datastreams now contains the Type and Subtype. This was request from the
|
|
64
|
+
front end people
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [0.5.0] - 2025-02-28
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
* Breaking change: The subtype property of FormatInfo classes
|
|
72
|
+
is no longer a string, but a formatinfo.SubType enum value.
|
|
73
|
+
This gives more control about supported subtypes and avoids
|
|
74
|
+
mistakes.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## [0.4.3] - 2025-02-20
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
* get_languages() in create_csv.py no longer supports data from DC.xml,
|
|
82
|
+
because 'language' of the object does not say anything about the language
|
|
83
|
+
of a data stream.
|
|
84
|
+
|
|
85
|
+
## [0.4.2] - 2025-02-20
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
|
|
89
|
+
* Add a detect_languages to create_csv.py
|
|
90
|
+
* Currently language(s) are taken from DC.xml
|
|
91
|
+
* NLP based detection can be added later
|
|
92
|
+
|
|
93
|
+
## Removed
|
|
94
|
+
|
|
95
|
+
* Remove the 'funder' field from datastreams.csv, which was introduced
|
|
96
|
+
in 0.4.1, because it was highly redundant. 'funder' now is only
|
|
97
|
+
supported in object.csv
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## [0.4.1] - 2025-02-20
|
|
101
|
+
|
|
102
|
+
### Changed
|
|
103
|
+
* Add a 'funder' field to object.csv and datastreams.csv
|
|
104
|
+
|
|
105
|
+
## [0.4.0] - 2025-01-30
|
|
106
|
+
|
|
107
|
+
### Added
|
|
108
|
+
|
|
109
|
+
* A new subpackage formatdetect for file format identification
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
|
|
113
|
+
* project.toml has 2 new fields in the general table: format_detector and format_detector_url
|
|
114
|
+
* Add tags column to datastreams.csv
|
|
115
|
+
* Improve auto-detection for some csv columns
|
|
116
|
+
* The Configuration object in submodule projectconfiguration now must be obtained by calling
|
|
117
|
+
the (cached) get_configuration() function
|
|
118
|
+
|
|
119
|
+
## [0.3.1] - 2025-01-09
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
* Additional filename pattterns for autogenerating values title and description are
|
|
124
|
+
autogenerated
|
|
125
|
+
* Default titles for media files (images, audio, video): 'Image|Audio|Video: DS ID'
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [0.3.0] - 2024-12-13
|
|
130
|
+
|
|
131
|
+
### Changed
|
|
132
|
+
|
|
133
|
+
- manage_csv.py: The collected csv files are now by default created
|
|
134
|
+
and expected in the current working directory and no longer in object_root
|
|
135
|
+
- collect_csv_data() output_dir ist now a required parameter:
|
|
136
|
+
- Unify/simplify API
|
|
137
|
+
- manage_csv.collect_csv_data() now requires the output_dir parameter
|
|
138
|
+
- When creating the csv files, some fields like title and description are
|
|
139
|
+
autogenerated
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## [0.2.6] - 2024-12-06
|
|
143
|
+
|
|
144
|
+
### Added
|
|
145
|
+
|
|
146
|
+
- CHANGELOG.md
|
|
147
|
+
- More tests
|
|
148
|
+
|
|
149
|
+
### Changed
|
|
150
|
+
|
|
151
|
+
- Extend pyproject.toml
|
|
152
|
+
|
gamslib-0.7.5/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Fabio Tosques, Gunter Vasold
|
|
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.
|
gamslib-0.7.5/Makefile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# make test, coverage, documentation, etc
|
|
2
|
+
SHELL := /bin/bash
|
|
3
|
+
|
|
4
|
+
.PHONY: all test coverage clean docs build test-all
|
|
5
|
+
|
|
6
|
+
docs:
|
|
7
|
+
@echo "Generating documentation..."
|
|
8
|
+
@pdoc3 --html --output-dir reference --force gamslib
|
|
9
|
+
@echo "Documentation generated in the 'reference' directory."
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
test:
|
|
13
|
+
@uv run pytest tests
|
|
14
|
+
|
|
15
|
+
# Run all tests with different python versions
|
|
16
|
+
test-versions:
|
|
17
|
+
@uv run --python 3.11 --isolated --with-editable '.[test]' pytest
|
|
18
|
+
@uv run --python 3.12 --isolated --with-editable '.[test]' pytest
|
|
19
|
+
@uv run --python 3.13 --isolated --with-editable '.[test]' pytest
|
|
20
|
+
# 3.14 depencies currently have some wheel issues: magicka require 1.20, which is rather old
|
|
21
|
+
# @uv run --python 3.14 --isolated --with-editable '.[test]' pytest
|
|
22
|
+
|
|
23
|
+
lint:
|
|
24
|
+
@uv run ruff check src
|
|
25
|
+
|
|
26
|
+
coverage:
|
|
27
|
+
@uv run pytest tests --cov-report term-missing --cov=gamslib
|
|
28
|
+
|
|
29
|
+
build:
|
|
30
|
+
@uv build
|
gamslib-0.7.5/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gamslib
|
|
3
|
+
Version: 0.7.5
|
|
4
|
+
Summary: Modules and subpackages used in various GAMS5 related projects
|
|
5
|
+
Project-URL: Homepage, https://github.com/DHGraz/gamslib
|
|
6
|
+
Project-URL: Repository, https://github.com/DHGraz/gamslib
|
|
7
|
+
Project-URL: Issues, https://github.com/DHGraz/gamslib/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/DHGraz/gamslib/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Gunter Vasold <gunter.vasold@uni-graz.at>, Fabio Tosques <fabio.tosques@uni-graz.at>
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: GAMS
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: jsonschema>=4.25.1
|
|
21
|
+
Requires-Dist: lxml>=6.0.2
|
|
22
|
+
Requires-Dist: magika>=1.0.1
|
|
23
|
+
Requires-Dist: pydantic>=2.12.2
|
|
24
|
+
Requires-Dist: pylightxl>=1.61
|
|
25
|
+
Requires-Dist: python-dotenv>=1.1.1
|
|
26
|
+
Requires-Dist: requests>=2.32.5
|
|
27
|
+
Requires-Dist: rnc2rng>=2.7.0
|
|
28
|
+
Requires-Dist: tomlkit>=0.13.3
|
|
29
|
+
Requires-Dist: uritools>=5.0.0
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# gamslib
|
|
33
|
+
|
|
34
|
+
Gamslib is a collection of GAMS related modules and packages, which are used in multiple other packages.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
gamslib is available on pypi.org and can be installed via pip:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
pip install gamslib
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
As gamslib is a library, it can only we used with other code.
|
|
47
|
+
|
|
48
|
+
The main purpose is to make code reusable in other GAMS5 projects and to have
|
|
49
|
+
a unique way of doing things. If you are not working on GAMS5 reated code
|
|
50
|
+
(which is very likely), this library will be useless for you.
|
|
51
|
+
|
|
52
|
+
Currently these subpackages are available (more to come):
|
|
53
|
+
|
|
54
|
+
## objectcsv
|
|
55
|
+
|
|
56
|
+
Handle object and datastream metadata in object csv files.
|
|
57
|
+
|
|
58
|
+
When creating bags for GAMS, we provide some metadata in csv
|
|
59
|
+
files (which are not part of the bag, btw).
|
|
60
|
+
|
|
61
|
+
The objectcsv package provides tools to handle this metadata.
|
|
62
|
+
|
|
63
|
+
* The ObjectCSV class represents the object and datastream csv data for a
|
|
64
|
+
single object. It is created by providing the path to the object
|
|
65
|
+
directory.
|
|
66
|
+
* The manage_csv module can be used to collect csv data from all objects into
|
|
67
|
+
a single file, which makes editing the data more efficient. It also has a
|
|
68
|
+
function to update the csv files in the object directories based on the
|
|
69
|
+
collected data.
|
|
70
|
+
* The xlsx module can be used to convert the csv files to xlsx files and vice
|
|
71
|
+
versa. This is useful for editing the data in a spreadsheet without the
|
|
72
|
+
hassles of importing and exporting the csv files, which led to encoding
|
|
73
|
+
problems in the past.
|
|
74
|
+
|
|
75
|
+
## projectconfiguration
|
|
76
|
+
|
|
77
|
+
This package contains a central class `Configuration` that represents the
|
|
78
|
+
project configuration. To create this object, the function
|
|
79
|
+
`load_configuration(OBJECT_ROOT, [PATH_TO_TOML_FILE])` should be used.
|
|
80
|
+
|
|
81
|
+
The function tries to find the project configuration file, validates its
|
|
82
|
+
content, and creates the central Configuration object with all sub-objects
|
|
83
|
+
(Each TOML inline table is provided as its own sub-object). These sub-objects
|
|
84
|
+
are currently:
|
|
85
|
+
|
|
86
|
+
* general
|
|
87
|
+
* metadata
|
|
88
|
+
|
|
89
|
+
A basic configuration file can be generated via the `create_condiguration()`
|
|
90
|
+
function.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
The Github repository is ment to be a read only mirror of the work repository
|
|
96
|
+
hosted on our institutional private Github server. You can use the bug tracker
|
|
97
|
+
on Github, but everything else should happen in the Zimlab Github repo.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
[MIT](https://choosealicense.com/licenses/mit/)
|
gamslib-0.7.5/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# gamslib
|
|
2
|
+
|
|
3
|
+
Gamslib is a collection of GAMS related modules and packages, which are used in multiple other packages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
gamslib is available on pypi.org and can be installed via pip:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pip install gamslib
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
As gamslib is a library, it can only we used with other code.
|
|
16
|
+
|
|
17
|
+
The main purpose is to make code reusable in other GAMS5 projects and to have
|
|
18
|
+
a unique way of doing things. If you are not working on GAMS5 reated code
|
|
19
|
+
(which is very likely), this library will be useless for you.
|
|
20
|
+
|
|
21
|
+
Currently these subpackages are available (more to come):
|
|
22
|
+
|
|
23
|
+
## objectcsv
|
|
24
|
+
|
|
25
|
+
Handle object and datastream metadata in object csv files.
|
|
26
|
+
|
|
27
|
+
When creating bags for GAMS, we provide some metadata in csv
|
|
28
|
+
files (which are not part of the bag, btw).
|
|
29
|
+
|
|
30
|
+
The objectcsv package provides tools to handle this metadata.
|
|
31
|
+
|
|
32
|
+
* The ObjectCSV class represents the object and datastream csv data for a
|
|
33
|
+
single object. It is created by providing the path to the object
|
|
34
|
+
directory.
|
|
35
|
+
* The manage_csv module can be used to collect csv data from all objects into
|
|
36
|
+
a single file, which makes editing the data more efficient. It also has a
|
|
37
|
+
function to update the csv files in the object directories based on the
|
|
38
|
+
collected data.
|
|
39
|
+
* The xlsx module can be used to convert the csv files to xlsx files and vice
|
|
40
|
+
versa. This is useful for editing the data in a spreadsheet without the
|
|
41
|
+
hassles of importing and exporting the csv files, which led to encoding
|
|
42
|
+
problems in the past.
|
|
43
|
+
|
|
44
|
+
## projectconfiguration
|
|
45
|
+
|
|
46
|
+
This package contains a central class `Configuration` that represents the
|
|
47
|
+
project configuration. To create this object, the function
|
|
48
|
+
`load_configuration(OBJECT_ROOT, [PATH_TO_TOML_FILE])` should be used.
|
|
49
|
+
|
|
50
|
+
The function tries to find the project configuration file, validates its
|
|
51
|
+
content, and creates the central Configuration object with all sub-objects
|
|
52
|
+
(Each TOML inline table is provided as its own sub-object). These sub-objects
|
|
53
|
+
are currently:
|
|
54
|
+
|
|
55
|
+
* general
|
|
56
|
+
* metadata
|
|
57
|
+
|
|
58
|
+
A basic configuration file can be generated via the `create_condiguration()`
|
|
59
|
+
function.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Contributing
|
|
63
|
+
|
|
64
|
+
The Github repository is ment to be a read only mirror of the work repository
|
|
65
|
+
hosted on our institutional private Github server. You can use the bug tracker
|
|
66
|
+
on Github, but everything else should happen in the Zimlab Github repo.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
[MIT](https://choosealicense.com/licenses/mit/)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "gamslib"
|
|
3
|
+
version = "0.7.5"
|
|
4
|
+
description = "Modules and subpackages used in various GAMS5 related projects"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Gunter Vasold", email = "gunter.vasold@uni-graz.at" },
|
|
7
|
+
{ name = "Fabio Tosques", email = "fabio.tosques@uni-graz.at" }
|
|
8
|
+
]
|
|
9
|
+
dependencies = [
|
|
10
|
+
"pylightxl>=1.61",
|
|
11
|
+
"pydantic>=2.12.2",
|
|
12
|
+
"python-dotenv>=1.1.1",
|
|
13
|
+
"lxml>=6.0.2",
|
|
14
|
+
"requests>=2.32.5",
|
|
15
|
+
"uritools>=5.0.0",
|
|
16
|
+
"tomlkit>=0.13.3",
|
|
17
|
+
"rnc2rng>=2.7.0",
|
|
18
|
+
"jsonschema>=4.25.1",
|
|
19
|
+
"magika>=1.0.1",
|
|
20
|
+
]
|
|
21
|
+
readme = "README.md"
|
|
22
|
+
requires-python = ">= 3.11"
|
|
23
|
+
keywords = ["GAMS"]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Development Status :: 4 - Beta",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Topic :: Software Development :: Libraries",
|
|
28
|
+
"License :: OSI Approved :: MIT License",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
"Programming Language :: Python :: 3.12",
|
|
31
|
+
"Programming Language :: Python :: 3.13",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://github.com/DHGraz/gamslib"
|
|
36
|
+
# Documentation = "https://readthedocs.org"
|
|
37
|
+
Repository = "https://github.com/DHGraz/gamslib"
|
|
38
|
+
Issues = "https://github.com/DHGraz/gamslib/issues"
|
|
39
|
+
Changelog = "https://github.com/DHGraz/gamslib/blob/main/CHANGELOG.md"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
[build-system]
|
|
43
|
+
requires = ["hatchling"]
|
|
44
|
+
build-backend = "hatchling.build"
|
|
45
|
+
|
|
46
|
+
[dependency-groups]
|
|
47
|
+
dev = [
|
|
48
|
+
"pytest>=8.4.2",
|
|
49
|
+
"pytest-datadir>=1.8.0",
|
|
50
|
+
"pytest-cov>=7.0.0",
|
|
51
|
+
"toml>=0.10.2",
|
|
52
|
+
"ruff>=0.14.0",
|
|
53
|
+
"pylint>=4.0.1",
|
|
54
|
+
"pyright>=1.1.406",
|
|
55
|
+
"pdoc3>=0.11.6",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[tool.hatch.metadata]
|
|
59
|
+
allow-direct-references = true
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.wheel]
|
|
62
|
+
packages = ["src/gamslib"]
|
|
63
|
+
|
|
64
|
+
[tool.ruff.lint]
|
|
65
|
+
select = ["PL", "RUF", "SIM"]
|
|
66
|
+
|