otlmow-template 0.8__tar.gz → 0.10__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.
- {otlmow_template-0.8 → otlmow_template-0.10}/PKG-INFO +2 -2
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/SubsetTemplateCreator.py +8 -6
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template.egg-info/PKG-INFO +2 -2
- otlmow_template-0.10/otlmow_template.egg-info/requires.txt +2 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/pyproject.toml +2 -2
- otlmow_template-0.8/otlmow_template.egg-info/requires.txt +0 -2
- {otlmow_template-0.8 → otlmow_template-0.10}/LICENSE +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/README.md +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/CsvTemplateCreator.py +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/ExcelTemplateCreator.py +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/Exceptions/MissingTypeUriException.py +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/__init__.py +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template.egg-info/SOURCES.txt +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template.egg-info/dependency_links.txt +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template.egg-info/top_level.txt +0 -0
- {otlmow_template-0.8 → otlmow_template-0.10}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: otlmow_template
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10
|
|
4
4
|
Author-email: David Vlaminck <david.vlaminck@mow.vlaanderen.be>, Jasper Berton <jasperberton1@telenet.be>
|
|
5
5
|
License: GNU GENERAL PUBLIC LICENSE
|
|
6
6
|
Version 3, 29 June 2007
|
|
@@ -698,7 +698,7 @@ Requires-Python: >=3.9
|
|
|
698
698
|
Description-Content-Type: text/markdown
|
|
699
699
|
License-File: LICENSE
|
|
700
700
|
Requires-Dist: otlmow-converter>=1.7
|
|
701
|
-
Requires-Dist: otlmow-modelbuilder>=0.
|
|
701
|
+
Requires-Dist: otlmow-modelbuilder>=0.25
|
|
702
702
|
|
|
703
703
|
# OTLMOW-Template
|
|
704
704
|
[](https://pypi.org/project/otlmow-template/)
|
|
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
from openpyxl.reader.excel import load_workbook
|
|
11
|
-
from openpyxl.styles import PatternFill
|
|
11
|
+
from openpyxl.styles import PatternFill, Alignment
|
|
12
12
|
from openpyxl.utils import get_column_letter
|
|
13
13
|
from openpyxl.worksheet.datavalidation import DataValidation
|
|
14
14
|
from openpyxl.worksheet.dimensions import DimensionHolder, ColumnDimension
|
|
@@ -123,6 +123,8 @@ class SubsetTemplateCreator:
|
|
|
123
123
|
add_attribute_info = kwargs.get('add_attribute_info', False)
|
|
124
124
|
highlight_deprecated_attributes = kwargs.get('highlight_deprecated_attributes', False)
|
|
125
125
|
amount_of_examples = kwargs.get('amount_of_examples', 0)
|
|
126
|
+
if add_attribute_info and amount_of_examples == 0:
|
|
127
|
+
amount_of_examples = 1
|
|
126
128
|
wb = load_workbook(temporary_path)
|
|
127
129
|
wb.create_sheet('Keuzelijsten')
|
|
128
130
|
# Volgorde is belangrijk! Eerst rijen verwijderen indien nodig dan choice list toevoegen,
|
|
@@ -176,7 +178,7 @@ class SubsetTemplateCreator:
|
|
|
176
178
|
for sheet in workbook:
|
|
177
179
|
dim_holder = DimensionHolder(worksheet=sheet)
|
|
178
180
|
for col in range(sheet.min_column, sheet.max_column + 1):
|
|
179
|
-
dim_holder[get_column_letter(col)] = ColumnDimension(sheet, min=col, max=col, width=
|
|
181
|
+
dim_holder[get_column_letter(col)] = ColumnDimension(sheet, min=col, max=col, width=25)
|
|
180
182
|
sheet.column_dimensions = dim_holder
|
|
181
183
|
|
|
182
184
|
@classmethod
|
|
@@ -201,10 +203,10 @@ class SubsetTemplateCreator:
|
|
|
201
203
|
dotnotation_attribute = dotnotation_module.get_attribute_by_dotnotation(single_attribute,
|
|
202
204
|
cell.value)
|
|
203
205
|
value = dotnotation_attribute.definition
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
newcell = sheet.cell(row=1, column=cell.column, value=value)
|
|
207
|
+
newcell.alignment = Alignment(wrapText=True, vertical='top')
|
|
208
|
+
newcell.fill = PatternFill(start_color="808080", end_color="808080",
|
|
209
|
+
fill_type="solid")
|
|
208
210
|
|
|
209
211
|
@classmethod
|
|
210
212
|
def check_for_deprecated_attributes(cls, workbook, instantiated_attributes: list):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: otlmow_template
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10
|
|
4
4
|
Author-email: David Vlaminck <david.vlaminck@mow.vlaanderen.be>, Jasper Berton <jasperberton1@telenet.be>
|
|
5
5
|
License: GNU GENERAL PUBLIC LICENSE
|
|
6
6
|
Version 3, 29 June 2007
|
|
@@ -698,7 +698,7 @@ Requires-Python: >=3.9
|
|
|
698
698
|
Description-Content-Type: text/markdown
|
|
699
699
|
License-File: LICENSE
|
|
700
700
|
Requires-Dist: otlmow-converter>=1.7
|
|
701
|
-
Requires-Dist: otlmow-modelbuilder>=0.
|
|
701
|
+
Requires-Dist: otlmow-modelbuilder>=0.25
|
|
702
702
|
|
|
703
703
|
# OTLMOW-Template
|
|
704
704
|
[](https://pypi.org/project/otlmow-template/)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "otlmow_template"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.10"
|
|
8
8
|
authors = [{name = "David Vlaminck", email = "david.vlaminck@mow.vlaanderen.be"},
|
|
9
9
|
{name = "Jasper Berton", email = "jasperberton1@telenet.be"},]
|
|
10
10
|
readme = "README.md"
|
|
@@ -30,7 +30,7 @@ classifiers = [
|
|
|
30
30
|
requires-python = ">=3.9"
|
|
31
31
|
dependencies = [
|
|
32
32
|
'otlmow-converter >= 1.7',
|
|
33
|
-
'otlmow-modelbuilder >= 0.
|
|
33
|
+
'otlmow-modelbuilder >= 0.25',
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
[tool.setuptools.packages.find]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{otlmow_template-0.8 → otlmow_template-0.10}/otlmow_template/Exceptions/MissingTypeUriException.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|