Skip to content

Commit

Permalink
Merge pull request #14 from youandvern/add-symbolic-class
Browse files Browse the repository at this point in the history
Introduce Symbolic class for displaying strings, equations, etc. without a calculated value
  • Loading branch information
youandvern authored May 27, 2024
2 parents 9eea4d8 + 00ca3f4 commit bf099a7
Show file tree
Hide file tree
Showing 40 changed files with 641 additions and 108 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
build:
python -m build

tests:
python -m pytest

publish:
python -m twine upload --skip-existing dist/*

# within venv
tests:
python -m pytest

# within venv
docs:
sphinx-build docs_src docs

# within venv
sections:
python -m "build_section_tables.py"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<p align="center">
<a href="https://github.com/youandvern/efficalc/actions/workflows/tests.yml"><img alt="Tests" src="https://github.com/youandvern/efficalc/actions/workflows/tests.yml/badge.svg"></a>&nbsp;&nbsp;&nbsp;
<a href="https://coveralls.io/github/youandvern/efficalc?branch=main"><img alt="Coverage Status" src="https://coveralls.io/repos/github/youandvern/efficalc/badge.svg?branch=main&v=1.1.0"></a>&nbsp;&nbsp;&nbsp;
<a href="https://coveralls.io/github/youandvern/efficalc?branch=main"><img alt="Coverage Status" src="https://coveralls.io/repos/github/youandvern/efficalc/badge.svg?branch=main&v=1.2.0"></a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/youandvern/efficalc/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>&nbsp;&nbsp;&nbsp;
<a href="https://badge.fury.io/py/efficalc"><img alt="PyPI version" src="https://badge.fury.io/py/efficalc.svg?v=1.1.0"></a>
<a href="https://badge.fury.io/py/efficalc"><img alt="PyPI version" src="https://badge.fury.io/py/efficalc.svg?version=1.2.0"></a>
</p>


Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e986a32d4ebbf8f991ab225314dbe723
config: 0b61954b10429afc60dfc155a8e18b44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/.doctrees/base_classes.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/_sources/base_classes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Base Classes
:members:


.. autoclass:: efficalc.Symbolic
:members:


.. autoclass:: efficalc.TextBlock
:members:

Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '1.1.0',
VERSION: '1.2.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Binary file added docs/_static/efficalc_basic_demo_typing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 124 additions & 13 deletions docs/base_classes.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/calculation_helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Section Properties" href="section_properties.html" /><link rel="prev" title="Figures in Calc Reports" href="figures.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Calculation Helpers - efficalc 1.1.0 documentation</title>
<title>Calculation Helpers - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -126,7 +126,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -152,7 +152,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -472,7 +472,7 @@

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions docs/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Styling Reports" href="styling.html" /><link rel="prev" title="Math Operations" href="math_operations.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Constants and Unit Conversions - efficalc 1.1.0 documentation</title>
<title>Constants and Unit Conversions - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -126,7 +126,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -152,7 +152,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -368,7 +368,7 @@ <h2>Constants<a class="headerlink" href="#id1" title="Link to this heading">#</a

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="prev" title="Testing Your Calculations" href="testing.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Examples - efficalc 1.1.0 documentation</title>
<title>Examples - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -126,7 +126,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -152,7 +152,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -301,7 +301,7 @@ <h3>Steel Beam Moment Strength<a class="headerlink" href="#steel-beam-moment-str

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions docs/figures.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Calculation Helpers" href="calculation_helpers.html" /><link rel="prev" title="Base Classes" href="base_classes.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Figures in Calc Reports - efficalc 1.1.0 documentation</title>
<title>Figures in Calc Reports - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -126,7 +126,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -152,7 +152,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -458,7 +458,7 @@ <h3>Example<a class="headerlink" href="#id4" title="Link to this heading">#</a><

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
40 changes: 30 additions & 10 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 --><title>Index - efficalc 1.1.0 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 --><title>Index - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -124,7 +124,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -150,7 +150,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -319,17 +319,21 @@ <h2>E</h2>
<li><a href="constants.html#module-efficalc.constants">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
efficalc.unit_conversions

<ul>
<li><a href="constants.html#module-efficalc.unit_conversions">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="base_classes.html#efficalc.Calculation.estimate_display_length">estimate_display_length() (efficalc.Calculation method)</a>

<ul>
<li><a href="base_classes.html#efficalc.Symbolic.estimate_display_length">(efficalc.Symbolic method)</a>
</li>
</ul></li>
<li><a href="math_operations.html#efficalc.exp">exp() (in module efficalc)</a>
</li>
</ul></td>
Expand Down Expand Up @@ -388,6 +392,8 @@ <h2>G</h2>
<li><a href="base_classes.html#efficalc.Comparison.get_value">(efficalc.Comparison method)</a>
</li>
<li><a href="base_classes.html#efficalc.Input.get_value">(efficalc.Input method)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic.get_value">(efficalc.Symbolic method)</a>
</li>
</ul></li>
</ul></td>
Expand Down Expand Up @@ -525,14 +531,16 @@ <h2>R</h2>
</li>
<li><a href="calculation_helpers.html#efficalc.report_builder.ReportBuilder">ReportBuilder (class in efficalc.report_builder)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="base_classes.html#efficalc.Calculation.result">result() (efficalc.Calculation method)</a>

<ul>
<li><a href="base_classes.html#efficalc.Comparison.result">(efficalc.Comparison method)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic.result">(efficalc.Symbolic method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="math_operations.html#efficalc.root">root() (in module efficalc)</a>
</li>
</ul></td>
Expand All @@ -559,16 +567,24 @@ <h2>S</h2>
</li>
<li><a href="math_operations.html#efficalc.sqrt">sqrt() (in module efficalc)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="base_classes.html#efficalc.Calculation.str_result_with_description">str_result_with_description() (efficalc.Calculation method)</a>

<ul>
<li><a href="base_classes.html#efficalc.Symbolic.str_result_with_description">(efficalc.Symbolic method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="base_classes.html#efficalc.Input.str_result_with_name">str_result_with_name() (efficalc.Input method)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic.str_result_with_unit">str_result_with_unit() (efficalc.Symbolic method)</a>
</li>
<li><a href="base_classes.html#efficalc.Calculation.str_substituted">str_substituted() (efficalc.Calculation method)</a>

<ul>
<li><a href="base_classes.html#efficalc.Comparison.str_substituted">(efficalc.Comparison method)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic.str_substituted">(efficalc.Symbolic method)</a>
</li>
</ul></li>
<li><a href="base_classes.html#efficalc.Calculation.str_symbolic">str_symbolic() (efficalc.Calculation method)</a>
Expand All @@ -577,9 +593,13 @@ <h2>S</h2>
<li><a href="base_classes.html#efficalc.Comparison.str_symbolic">(efficalc.Comparison method)</a>
</li>
<li><a href="base_classes.html#efficalc.ComparisonStatement.str_symbolic">(efficalc.ComparisonStatement method)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic.str_symbolic">(efficalc.Symbolic method)</a>
</li>
</ul></li>
<li><a href="math_operations.html#efficalc.sub">sub() (in module efficalc)</a>
</li>
<li><a href="base_classes.html#efficalc.Symbolic">Symbolic (class in efficalc)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -659,7 +679,7 @@ <h2>Z</h2>

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
8 changes: 4 additions & 4 deletions docs/get_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Purpose and Background" href="purpose.html" /><link rel="prev" title="efficalc" href="index.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Quickstart - efficalc 1.1.0 documentation</title>
<title>Quickstart - efficalc 1.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -126,7 +126,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">efficalc 1.1.0 documentation</div></a>
<a href="index.html"><div class="brand">efficalc 1.2.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -152,7 +152,7 @@
<img class="sidebar-logo" src="_static/efficalc.png" alt="Logo"/>
</div>

<span class="sidebar-brand-text">efficalc 1.1.0 documentation</span>
<span class="sidebar-brand-text">efficalc 1.2.0 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -352,7 +352,7 @@ <h2>View Reports<a class="headerlink" href="#view-reports" title="Link to this h

</aside>
</div>
</div><script src="_static/documentation_options.js?v=fc837d61"></script>
</div><script src="_static/documentation_options.js?v=6efca38a"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
Expand Down
Loading

0 comments on commit bf099a7

Please sign in to comment.