otlmow-template 0.8__py3-none-any.whl → 0.10__py3-none-any.whl

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.
@@ -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=20)
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
- sheet.cell(row=1, column=cell.column, value=value)
206
- sheet.cell(row=1, column=cell.column).fill = PatternFill(start_color="808080", end_color="808080",
207
- fill_type="solid")
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.8
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.24
701
+ Requires-Dist: otlmow-modelbuilder>=0.25
702
702
 
703
703
  # OTLMOW-Template
704
704
  [![PyPI](https://img.shields.io/pypi/v/otlmow-template?label=latest%20release)](https://pypi.org/project/otlmow-template/)
@@ -0,0 +1,10 @@
1
+ otlmow_template/CsvTemplateCreator.py,sha256=PQq2zGmliWk0N9bhYNB7ZEa8PWV16OTbvoHh3--qCMs,7538
2
+ otlmow_template/ExcelTemplateCreator.py,sha256=wW-7Uq2Gzr1vHYMO1I7TtqZSBTVFFSWotHvjwzCelV4,10853
3
+ otlmow_template/SubsetTemplateCreator.py,sha256=FQNaOp-3_EelKijpOBT5KjwZ3X30yD5K9xpmY0euDLo,25225
4
+ otlmow_template/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ otlmow_template/Exceptions/MissingTypeUriException.py,sha256=DSKwywmP9Bq8n7rzBoDcEPlxvC1IChx18QIHFUCTtdA,51
6
+ otlmow_template-0.10.dist-info/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
7
+ otlmow_template-0.10.dist-info/METADATA,sha256=0FveCcFEZtR8CqXMNDG0VPhWurSVOtXOtEzsfPMfsik,44000
8
+ otlmow_template-0.10.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
+ otlmow_template-0.10.dist-info/top_level.txt,sha256=zPgBoaTLG-avoOLySlwOUEtHaFyA5Vc5wJqkSeX1l6A,16
10
+ otlmow_template-0.10.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- otlmow_template/CsvTemplateCreator.py,sha256=PQq2zGmliWk0N9bhYNB7ZEa8PWV16OTbvoHh3--qCMs,7538
2
- otlmow_template/ExcelTemplateCreator.py,sha256=wW-7Uq2Gzr1vHYMO1I7TtqZSBTVFFSWotHvjwzCelV4,10853
3
- otlmow_template/SubsetTemplateCreator.py,sha256=552FsvmbS3g48f_h2o2Y5t2Ank4NBW1dfJlQXowHD74,25090
4
- otlmow_template/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- otlmow_template/Exceptions/MissingTypeUriException.py,sha256=DSKwywmP9Bq8n7rzBoDcEPlxvC1IChx18QIHFUCTtdA,51
6
- otlmow_template-0.8.dist-info/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
7
- otlmow_template-0.8.dist-info/METADATA,sha256=63EBk5omnZoL47HGvtX789ZVImk63OugJY9ht3fnoQk,43999
8
- otlmow_template-0.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
- otlmow_template-0.8.dist-info/top_level.txt,sha256=zPgBoaTLG-avoOLySlwOUEtHaFyA5Vc5wJqkSeX1l6A,16
10
- otlmow_template-0.8.dist-info/RECORD,,