bare-script 4.0.1__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.1/src/bare_script.egg-info → bare_script-4.0.3}/PKG-INFO +2 -1
- {bare_script-4.0.1 → bare_script-4.0.3}/README.md +1 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/setup.cfg +1 -1
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/dataLineChart.bare +15 -11
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/value.py +4 -8
- {bare_script-4.0.1 → bare_script-4.0.3/src/bare_script.egg-info}/PKG-INFO +2 -1
- {bare_script-4.0.1 → bare_script-4.0.3}/LICENSE +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/pyproject.toml +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/__init__.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/__main__.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/bare.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/__init__.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/args.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/baredoc.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/baredocCLI.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/data.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/dataTable.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/dataUtil.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/diff.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/draw.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/elementModel.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/forms.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/markdown.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/markdownElements.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/markdownHighlight.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/markdownParser.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/markdownUp.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/pager.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/qrcode.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/schemaDoc.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/unittest.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/include/unittestMock.bare +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/library.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/model.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/options.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/parser.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script/runtime.py +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script.egg-info/SOURCES.txt +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script.egg-info/dependency_links.txt +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script.egg-info/entry_points.txt +0 -0
- {bare_script-4.0.1 → bare_script-4.0.3}/src/bare_script.egg-info/requires.txt +0 -0
- {bare_script-4.0.1 → 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
|
|
|
@@ -135,11 +135,10 @@ dataLineChartCategoricalColors = [ \
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
# Line chart constants (all numbers in pixels)
|
|
138
|
-
dataLineChartPixelsPerPoint = 4 / 3
|
|
139
138
|
dataLineChartSvgPrecision = 3
|
|
140
139
|
dataLineChartChartFontFamily = 'Arial, Helvetica, sans-serif'
|
|
141
140
|
dataLineChartChartFontWidthRatio = 0.6
|
|
142
|
-
|
|
141
|
+
dataLineChartChartFontDefaultSizePx = 16
|
|
143
142
|
dataLineChartChartBackgroundColor = 'white'
|
|
144
143
|
dataLineChartAxisColor = 'black'
|
|
145
144
|
dataLineChartAxisTickLineColor = 'lightgray'
|
|
@@ -159,7 +158,7 @@ dataLineChartChartLineWidth = 3
|
|
|
159
158
|
# $arg data: The data array
|
|
160
159
|
# $arg lineChart: The [line chart model](model.html#var.vName='DataLineChart')
|
|
161
160
|
# $arg options: Optional (default is null). The line chart options object with the following optional members:
|
|
162
|
-
# $arg options: - **fontSize** - The font size, in
|
|
161
|
+
# $arg options: - **fontSize** - The font size, in pixels
|
|
163
162
|
function dataLineChart(data, lineChart, options):
|
|
164
163
|
elementModelRender = systemGlobalGet('elementModelRender')
|
|
165
164
|
elementModelRender({'html': 'p', 'elem': dataLineChartElements(data, lineChart, options)})
|
|
@@ -172,16 +171,21 @@ endfunction
|
|
|
172
171
|
# $arg data: The data array
|
|
173
172
|
# $arg lineChart: The [line chart model](model.html#var.vName='DataLineChart')
|
|
174
173
|
# $arg options: Optional (default is null). The line chart options object with the following optional members:
|
|
175
|
-
# $arg options: - **fontSize** - The font size, in
|
|
174
|
+
# $arg options: - **fontSize** - The font size, in pixels
|
|
176
175
|
# $return: The line chart [element model](https://github.com/craigahobbs/element-model#readme)
|
|
177
176
|
function dataLineChartElements(data, lineChart, options):
|
|
178
|
-
chartFontSize = dataLineChartPixelsPerPoint * \
|
|
179
|
-
if(options != null && objectHas(options, 'fontSize'), objectGet(options, 'fontSize'), dataLineChartChartFontDefaultSize)
|
|
180
177
|
xField = objectGet(lineChart, 'x')
|
|
181
178
|
yFields = objectGet(lineChart, 'y')
|
|
182
179
|
colorField = objectGet(lineChart, 'color')
|
|
183
180
|
colorOrder = objectGet(lineChart, 'colorOrder')
|
|
184
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
|
+
|
|
185
189
|
# Sort the rows by the X field
|
|
186
190
|
arraySort(data, systemPartial(dataLineChartSortCompare, xField))
|
|
187
191
|
|
|
@@ -333,13 +337,13 @@ function dataLineChartElements(data, lineChart, options):
|
|
|
333
337
|
endif
|
|
334
338
|
|
|
335
339
|
# Chart title calculations
|
|
336
|
-
chartBorderSize =
|
|
337
|
-
chartTitleFontSize = 1.1 *
|
|
340
|
+
chartBorderSize = fontSize
|
|
341
|
+
chartTitleFontSize = 1.1 * fontSize
|
|
338
342
|
chartTitleHeight = if(chartTitle != null, 1.5 * chartTitleFontSize, 0)
|
|
339
343
|
|
|
340
344
|
# Y-axis calculations
|
|
341
|
-
axisTitleFontSize = 1 *
|
|
342
|
-
axisLabelFontSize =
|
|
345
|
+
axisTitleFontSize = 1 * fontSize
|
|
346
|
+
axisLabelFontSize = fontSize
|
|
343
347
|
yAxisTitle = if(arrayLength(yFields) == 1, arrayGet(yFields, 0))
|
|
344
348
|
yAxisTitleWidth = if(yAxisTitle != null, 1.8 * axisTitleFontSize, 0)
|
|
345
349
|
yAxisLabelWidth = 0
|
|
@@ -372,7 +376,7 @@ function dataLineChartElements(data, lineChart, options):
|
|
|
372
376
|
xAnnotationLabelOffsetY = 0.1 * annotationLabelFontSize
|
|
373
377
|
|
|
374
378
|
# Color legend calculations
|
|
375
|
-
colorLegendFontSize =
|
|
379
|
+
colorLegendFontSize = fontSize
|
|
376
380
|
colorLegendGap = 0.5 * colorLegendFontSize
|
|
377
381
|
colorLegendLabelHeight = colorLegendFontSize
|
|
378
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
|