bare-script 4.0.2__tar.gz → 4.0.3__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.
- {bare_script-4.0.2/src/bare_script.egg-info → bare_script-4.0.3}/PKG-INFO +2 -1
- {bare_script-4.0.2 → bare_script-4.0.3}/README.md +1 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/setup.cfg +1 -1
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/dataLineChart.bare +12 -6
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/value.py +4 -8
- {bare_script-4.0.2 → bare_script-4.0.3/src/bare_script.egg-info}/PKG-INFO +2 -1
- {bare_script-4.0.2 → bare_script-4.0.3}/LICENSE +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/pyproject.toml +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/__init__.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/__main__.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/bare.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/__init__.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/args.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/baredoc.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/baredocCLI.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/data.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/dataTable.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/dataUtil.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/diff.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/draw.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/elementModel.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/forms.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/markdown.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/markdownElements.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/markdownHighlight.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/markdownParser.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/markdownUp.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/pager.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/qrcode.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/schemaDoc.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/unittest.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/include/unittestMock.bare +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/library.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/model.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/options.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/parser.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script/runtime.py +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script.egg-info/SOURCES.txt +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script.egg-info/dependency_links.txt +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script.egg-info/entry_points.txt +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script.egg-info/requires.txt +0 -0
- {bare_script-4.0.2 → bare_script-4.0.3}/src/bare_script.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bare-script
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.3
|
|
4
4
|
Summary: bare-script
|
|
5
5
|
Home-page: https://github.com/craigahobbs/bare-script
|
|
6
6
|
Author: Craig A. Hobbs
|
|
@@ -48,6 +48,7 @@ confident that BareScript will execute the same regardless of the underlying run
|
|
|
48
48
|
|
|
49
49
|
- [The BareScript Language](https://craigahobbs.github.io/bare-script-py/language/)
|
|
50
50
|
- [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/)
|
|
51
|
+
- [The BareScript Include Library Tests](https://craigahobbs.github.io/bare-script/include/test/)
|
|
51
52
|
- [API Documentation](https://craigahobbs.github.io/bare-script-py/)
|
|
52
53
|
- [Source code](https://github.com/craigahobbs/bare-script-py)
|
|
53
54
|
|
|
@@ -23,6 +23,7 @@ confident that BareScript will execute the same regardless of the underlying run
|
|
|
23
23
|
|
|
24
24
|
- [The BareScript Language](https://craigahobbs.github.io/bare-script-py/language/)
|
|
25
25
|
- [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/)
|
|
26
|
+
- [The BareScript Include Library Tests](https://craigahobbs.github.io/bare-script/include/test/)
|
|
26
27
|
- [API Documentation](https://craigahobbs.github.io/bare-script-py/)
|
|
27
28
|
- [Source code](https://github.com/craigahobbs/bare-script-py)
|
|
28
29
|
|
|
@@ -174,12 +174,18 @@ endfunction
|
|
|
174
174
|
# $arg options: - **fontSize** - The font size, in pixels
|
|
175
175
|
# $return: The line chart [element model](https://github.com/craigahobbs/element-model#readme)
|
|
176
176
|
function dataLineChartElements(data, lineChart, options):
|
|
177
|
-
chartFontSize = if(options, objectGet(options, 'fontSize', dataLineChartChartFontDefaultSizePx), dataLineChartChartFontDefaultSizePx)
|
|
178
177
|
xField = objectGet(lineChart, 'x')
|
|
179
178
|
yFields = objectGet(lineChart, 'y')
|
|
180
179
|
colorField = objectGet(lineChart, 'color')
|
|
181
180
|
colorOrder = objectGet(lineChart, 'colorOrder')
|
|
182
181
|
|
|
182
|
+
# Determine the font size
|
|
183
|
+
fontSize = if(options, objectGet(options, 'fontSize'))
|
|
184
|
+
if !fontSize:
|
|
185
|
+
documentFontSize = systemGlobalGet('documentFontSize')
|
|
186
|
+
fontSize = if(documentFontSize, documentFontSize(), dataLineChartChartFontDefaultSizePx)
|
|
187
|
+
endif
|
|
188
|
+
|
|
183
189
|
# Sort the rows by the X field
|
|
184
190
|
arraySort(data, systemPartial(dataLineChartSortCompare, xField))
|
|
185
191
|
|
|
@@ -331,13 +337,13 @@ function dataLineChartElements(data, lineChart, options):
|
|
|
331
337
|
endif
|
|
332
338
|
|
|
333
339
|
# Chart title calculations
|
|
334
|
-
chartBorderSize =
|
|
335
|
-
chartTitleFontSize = 1.1 *
|
|
340
|
+
chartBorderSize = fontSize
|
|
341
|
+
chartTitleFontSize = 1.1 * fontSize
|
|
336
342
|
chartTitleHeight = if(chartTitle != null, 1.5 * chartTitleFontSize, 0)
|
|
337
343
|
|
|
338
344
|
# Y-axis calculations
|
|
339
|
-
axisTitleFontSize = 1 *
|
|
340
|
-
axisLabelFontSize =
|
|
345
|
+
axisTitleFontSize = 1 * fontSize
|
|
346
|
+
axisLabelFontSize = fontSize
|
|
341
347
|
yAxisTitle = if(arrayLength(yFields) == 1, arrayGet(yFields, 0))
|
|
342
348
|
yAxisTitleWidth = if(yAxisTitle != null, 1.8 * axisTitleFontSize, 0)
|
|
343
349
|
yAxisLabelWidth = 0
|
|
@@ -370,7 +376,7 @@ function dataLineChartElements(data, lineChart, options):
|
|
|
370
376
|
xAnnotationLabelOffsetY = 0.1 * annotationLabelFontSize
|
|
371
377
|
|
|
372
378
|
# Color legend calculations
|
|
373
|
-
colorLegendFontSize =
|
|
379
|
+
colorLegendFontSize = fontSize
|
|
374
380
|
colorLegendGap = 0.5 * colorLegendFontSize
|
|
375
381
|
colorLegendLabelHeight = colorLegendFontSize
|
|
376
382
|
colorLegendLabelGap = 0.35 * colorLegendLabelHeight
|
|
@@ -143,21 +143,17 @@ def value_boolean(value):
|
|
|
143
143
|
:rtype: bool
|
|
144
144
|
"""
|
|
145
145
|
|
|
146
|
-
if value
|
|
147
|
-
return
|
|
146
|
+
if isinstance(value, bool):
|
|
147
|
+
return value
|
|
148
148
|
elif isinstance(value, str):
|
|
149
149
|
return value != ''
|
|
150
|
-
elif isinstance(value, bool):
|
|
151
|
-
return value
|
|
152
150
|
elif isinstance(value, (int, float)):
|
|
153
151
|
return value != 0
|
|
154
|
-
elif isinstance(value, datetime.date):
|
|
155
|
-
return True
|
|
156
152
|
elif isinstance(value, list):
|
|
157
153
|
return len(value) != 0
|
|
158
154
|
|
|
159
|
-
# Everything else is true
|
|
160
|
-
return
|
|
155
|
+
# Everything else non-null is true
|
|
156
|
+
return value is not None
|
|
161
157
|
|
|
162
158
|
|
|
163
159
|
def value_is(value1, value2):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bare-script
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.3
|
|
4
4
|
Summary: bare-script
|
|
5
5
|
Home-page: https://github.com/craigahobbs/bare-script
|
|
6
6
|
Author: Craig A. Hobbs
|
|
@@ -48,6 +48,7 @@ confident that BareScript will execute the same regardless of the underlying run
|
|
|
48
48
|
|
|
49
49
|
- [The BareScript Language](https://craigahobbs.github.io/bare-script-py/language/)
|
|
50
50
|
- [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/)
|
|
51
|
+
- [The BareScript Include Library Tests](https://craigahobbs.github.io/bare-script/include/test/)
|
|
51
52
|
- [API Documentation](https://craigahobbs.github.io/bare-script-py/)
|
|
52
53
|
- [Source code](https://github.com/craigahobbs/bare-script-py)
|
|
53
54
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|