-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix #31. Failed when axis!=0 - Change API. Only expose: * significant_digits * contributing_bits * probability_estimation_bernoulli * minimum_number_of_trials * Method, Error - Add tests for compute_z - Add docs with pdoc - Generate github-pages with github/actions Escape python-version in github/actions
- Loading branch information
1 parent
4f1989d
commit 5c05683
Showing
9 changed files
with
484 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: website | ||
|
||
# build the documentation whenever there are new commits on main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# security: restrict permissions for CI jobs. | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# Build the documentation and upload the static HTML files as an artifact. | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- run: pip install . | ||
- run: pdoc -d numpy -t pdoc/template/ --math -o docs significantdigits/ | ||
|
||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: docs/ | ||
|
||
# Deploy the artifact to GitHub pages. | ||
# This is a separate job so that only actions/deploy-pages has the necessary permissions. | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{# This template is included in math mode and loads MathJax for formula rendering. #} | ||
<script> | ||
{# | ||
MathJax by default does not define $ as a math delimiter because it's commonly used in non-mathematical settings. | ||
We add it here. If you are unhappy with this default, you can override math.html.jinja2 with a custom template. | ||
#} | ||
window.MathJax = { | ||
tex: { | ||
inlineMath: [['$', '$'], ['\\(', '\\)']], | ||
autoload: { | ||
color: [], | ||
colorV2: ['color'], | ||
cases: [[], ['numcases', 'subnumcases']], | ||
} | ||
} | ||
}; | ||
</script> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> | ||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> | ||
<script> | ||
/* Re-invoke MathJax when DOM content changes, for example during search. */ | ||
document.addEventListener("DOMContentLoaded", () => { | ||
new MutationObserver(() => MathJax.typeset()).observe( | ||
document.querySelector("main.pdoc").parentNode, | ||
{childList: true} | ||
); | ||
}) | ||
</script> | ||
<style> | ||
mjx-container { | ||
overflow-x: auto; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "significantdigits" | ||
version = "0.2.0" | ||
version = "0.3.0" | ||
description = "Solid stochastic statistic analysis of Stochastic Arithmetic" | ||
authors = [ | ||
{ name = "Verificarlo contributors", email = "[email protected]" }, | ||
|
@@ -31,6 +31,7 @@ dependencies = [ | |
"scipy>=1.7.3", | ||
"toml>=0.10.2", | ||
"icecream>=2.1.3", | ||
"pdoc>=14.2.0" | ||
] | ||
|
||
[tool.hatch.build] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
from ._significantdigits import * | ||
""" | ||
.. include:: ../README.md | ||
""" | ||
|
||
from ._significantdigits import ( | ||
InputType, | ||
ReferenceType, | ||
Method, | ||
Metric, | ||
Error, | ||
SignificantDigitsException, | ||
significant_digits, | ||
contributing_digits, | ||
change_basis, | ||
probability_estimation_bernoulli, | ||
minimum_number_of_trials, | ||
) | ||
|
||
__all__ = [ | ||
"InputType", | ||
"ReferenceType", | ||
"Method", | ||
"Metric", | ||
"Error", | ||
"SignificantDigitsException", | ||
"significant_digits", | ||
"contributing_digits", | ||
"change_basis", | ||
"probability_estimation_bernoulli", | ||
"minimum_number_of_trials", | ||
] |
Oops, something went wrong.