Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e8d3467
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Fri Sep 6 19:02:36 2024 +0200

    Implement new `wiz.res()` API (#41)

    * Remove plum as dependency

    * Implement new `wiz.res()` API (see #33)

    * Fix errors in error messages

    * Use consistent comment format in error messages

    * Add docstrings to `wiz.res()`

    * Add missing `int` type for uncertainties

    * Add PrintableResult to res() method signature

    * Rename `uncert` to `uncerts` (plural)

commit cc6bf5b
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Apr 27 20:25:54 2024 +0200

    Improve wording: use `uncertainty` instead of `error` (#43)

    * Remove spaces in units

    * Detect percent as unit in console stringifier

    * Replace error by uncert

    * Undo unwanted changes

    * Replace error by uncertainty in various places

commit 62c34a5
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Sat Apr 27 19:45:34 2024 +0200

    Add missing `site.baseurl` to relative links (#52)

commit f5e0007
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Sat Apr 27 19:45:19 2024 +0200

    Truncate Readme & refer to documentation (#51)

    * Truncate Readme & refer to documentation

    * Remove GitHub-flavored markdown

    Otherwise, it won't be rendered correctly on PyPI.

    * Make Readme image clickable (points to docs)

commit 7af242c
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Wed Apr 24 17:56:11 2024 +0200

    Add first version of docs (#37)

    * Init _Just the docs_ basic structure

    * Add Jupyter-related items to TODO

    * Add GitHub pages docs workflow

    * Add 404 page

    * Add landing page of documentation

    * Add LaTeX rendered output

    * Add quickstart & backbone for other pages

    * Add `export()` & siunitx troubleshooting

    * Add docs for `wiz.res()`

    * Add `wiz.res()` tip for multiple occurrences

    * Add config options & siunitx tips

    * Improve Jupyter section & add "Is this really for me?"

    * Add about page

    * Add table of contents (TOC) back to about page

    * Add docs build workflow for PRs

    * Specify correct cwd for docs workflow

    * Fix remaining docs workflow errors

    * Add tip for how to suppress output in JupyterNotebook.

    This fixes #44.

commit 63f2a6b
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Mon Apr 22 23:31:50 2024 +0200

    Update GitHub URLs to point to new repo location (#47)

commit 6a84259
Merge: 08cc319 e070e84
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Sun Mar 24 10:13:19 2024 +0100

    Continuous Release 1.0.0-alpha.2

    Merge pull request #23 from resultwizard/alpha-2

commit e070e84
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 23 19:41:46 2024 +0100

    Add more todo notes (one related to plum resolver)

commit f02f580
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 23 19:25:47 2024 +0100

    Add raw strings to todo notes for documentation

commit e99ca36
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 23 19:19:34 2024 +0100

    Add config option to ignore shadowed result warning

commit 6ecf6d1
Author: Splines <dominic-plein@gmx.de>
Date:   Wed Mar 20 01:03:35 2024 +0100

    Improve Readme

commit 64c2266
Author: Splines <dominic-plein@gmx.de>
Date:   Wed Mar 20 00:48:39 2024 +0100

    Assert `n>=0` when rounding to decimal places

commit 22d5dc8
Author: Splines <dominic-plein@gmx.de>
Date:   Wed Mar 20 00:46:07 2024 +0100

    Fix "consider-using-from-import" to import error messages

commit 5525348
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 12:41:30 2024 +0100

    Fix potential vulnerability by replacing float with Decimal

commit 398df1c
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 12:39:15 2024 +0100

    Restructure rounder test and test all rounding hierarchies

commit 2f9ea35
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 12:14:32 2024 +0100

    Add example to playground

commit 35ef3fa
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 12:13:21 2024 +0100

    Print an error when number of decimal places is too small

commit 6229921
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 11:31:13 2024 +0100

    Centralize error messages

commit 0d58dc5
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 11:17:04 2024 +0100

    Add instructions for how to release to PyPI

commit 78aa5de
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 10:54:51 2024 +0100

    Remove code duplication in config

commit 4377ed8
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Tue Mar 19 10:47:40 2024 +0100

    Fix behavior when the specified number of decimals is not high enough to display the value

commit 24cb501
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 02:09:28 2024 +0100

    Split up line that is too long

commit 7c3c8cc
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 02:07:46 2024 +0100

    Remove license field, instead use license classifier

    See the following link for the reasons:
    https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license

commit 85bf53d
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 01:48:33 2024 +0100

    Allow `Decimal`s for `sys` and `stat` uncertainties

commit 93ddb30
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 01:33:48 2024 +0100

    Let users pass in Decimals & add precision config key

commit 0951c3e
Author: Splines <dominic-plein@gmx.de>
Date:   Tue Mar 19 00:04:19 2024 +0100

    Use decimal module internally

    Also changed the test cases accordingly.

commit 59ffc71
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 17:43:53 2024 +0100

    Improve unit string in console output

    This fixes #24.

commit dfb865b
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 17:37:07 2024 +0100

    Only print "processing .. results" if needed

commit c61d5af
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 12:27:14 2024 +0100

    Implement `export_auto_to` config option

    If not empty, each `res()` call will automatically
    export all results to the file the user specifies with this keyword.

    They can still use the `export()` method to export
    results to other files as well.

    This option might be particularly useful in Jupyter notebooks.

commit 843abea
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 02:08:12 2024 +0100

    Shorten LaTeX error message

    We can't use line breaks here, so we should aim for a short message
    such that the user can ideally view all of it
    (without the message being pruned)

commit bb4a279
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 01:50:26 2024 +0100

    Add correct version specifier for next alpha

commit 8daa7db
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 01:49:04 2024 +0100

    Change default identifier to "result"

    See issue #25 for the reasons.

commit c71ce30
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 01:35:59 2024 +0100

    Disable false duplicate code warning (pylint)

commit 124cddf
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 01:30:39 2024 +0100

    Split latex stringifier into commandifier

    This is essentially a refactoring of the previous commit a4d33be.

commit a4d33be
Author: Splines <dominic-plein@gmx.de>
Date:   Mon Mar 18 00:32:40 2024 +0100

    Make use of siunitx \qty and \num (new stringify logic)

    We also added a fallback option to the config in order to switch back
    to the old behavior. It's called `siunitx_fallback` (bool).

    Note that this commit contains some duplicated code, which will
    be cleaned up in subsequent commits.

commit cf3ef0f
Author: Splines <dominic-plein@gmx.de>
Date:   Sun Mar 17 01:08:38 2024 +0100

    Add some TODO notes

commit 78b5857
Author: Splines <dominic-plein@gmx.de>
Date:   Sun Mar 17 01:08:30 2024 +0100

    Add Python 3.8 classifier to project setup

commit 08cc319
Merge: b7739e6 e2a4693
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Sat Mar 16 23:33:43 2024 +0100

    Continuous Release 1.0.0-alpha.1

    Merge pull request #19 from paul019/dev

commit e2a4693
Merge: 97c0ece b7739e6
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 23:24:33 2024 +0100

    Merge branch 'main' into dev

commit 97c0ece
Merge: 14e3f0d cb5f173
Author: Splines <37160523+Splines@users.noreply.github.com>
Date:   Sat Mar 16 23:15:47 2024 +0100

    Merge pull request #18 from paul019/value-wizard

    ResultWizard project

commit cb5f173
Merge: b56af58 21f1eec
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 23:07:05 2024 +0100

    Merge remote-tracking branch 'origin/value-wizard' into value-wizard

commit b56af58
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 23:06:46 2024 +0100

    Add disclaimer to troubleshooting section

commit 21f1eec
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 22:59:14 2024 +0100

    Fix shadowing warning message

commit 61ba561
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 20:23:11 2024 +0100

    Add troubleshooting for old`siunitx` versions

commit d518728
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 16:13:34 2024 +0100

    Add latex option to call result "withoutUnit"

    i.e. value and errors, but not the unit
    In contrast, "value" only outputs the value itself without any errors.

commit 56b94e0
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 16:06:37 2024 +0100

    Improve runtime error messages

commit 6cfcf94
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:40:37 2024 +0100

    Disable too-many-locals in stringifier

commit d11658f
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:34:22 2024 +0100

    Disallow int for uncertainties in certain cases to prevent ambiguities for overloaded methods

commit 66fb173
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:29:51 2024 +0100

    Remove todo in value.py

commit 89e6c17
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:28:54 2024 +0100

    Add error message to runtime error in rounder

commit c201917
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:25:21 2024 +0100

    Add error message when user gives exact value AND specifies sigfigs/decimal places

commit 7fb8e1a
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:21:17 2024 +0100

    Add a warning when shadowing values in cache.

commit f894c15
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:17:19 2024 +0100

    Always print uncertainty name when user specifies it

commit c6d680b
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sat Mar 16 14:12:36 2024 +0100

    Replace _modify_value by value_prefix and value_suffix in stringifier

commit 5a6a07d
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 14:04:16 2024 +0100

    Add `siunitx` import in resulting tex file & add to docs

commit 34f797f
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 13:54:04 2024 +0100

    Rename `latex_str` to `string` in `stringifier.py`

commit fcf0e44
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 13:53:33 2024 +0100

    Use \num{} for latex values

commit 0075a50
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 13:28:26 2024 +0100

    Use "SS" instead of "Ss" as replacement for "ẞ"

commit 1cd31aa
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 13:26:23 2024 +0100

    Add first test for value parser

commit 2be5700
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 12:54:21 2024 +0100

    Add tests for special char parsing

commit 57e8737
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 12:44:09 2024 +0100

    Add some name parser tests & extract method

commit 3ee6f8c
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 12:27:08 2024 +0100

    Restore old greedy digit counting

commit c3a8151
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 01:09:36 2024 +0100

    Improve pyproject description

commit 26c0fe9
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 00:50:24 2024 +0100

    Reorganize import in test

commit d5ef148
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 00:50:01 2024 +0100

    Fix pylint errors in tests

commit e457ce1
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 00:47:03 2024 +0100

    Add "number to word" tests & forbid too small/big numbers

commit 6ae7c55
Author: Splines <dominic-plein@gmx.de>
Date:   Sat Mar 16 00:27:45 2024 +0100

    Refactor name parser

commit 9952a1a
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 23:50:57 2024 +0100

    Remove unwanted comments in domain/Value

commit 94209da
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 23:50:21 2024 +0100

    Get rid of unnecessary "_ClassName" convention

    Instead, just don't import the classes in the public api, then the user
    will also never see them.

    Note that we still use the convention for attributes to mark them as
    internal to a class.

commit d7345cf
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 23:44:59 2024 +0100

    Use more meaningful names for stringifiers

commit dca2e75
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 23:34:00 2024 +0100

    Use Protocol for MasterStringifier

commit 557d860
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 20:27:02 2024 +0100

    Implement master stringifier that is customized by latexer and stringifier

commit b988fd7
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 20:04:24 2024 +0100

    Add very basic install & usage instructions

commit ef1ee87
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 19:53:36 2024 +0100

    Create release workflow for PyPI

commit c6b1c6b
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 17:21:46 2024 +0100

    Add support for parsing of numbers up to 999 in names

commit d6adf88
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 17:01:05 2024 +0100

    Remove unnecessary imports

commit 68fd9d0
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 17:00:36 2024 +0100

    Refactor stringifier

commit d3395a1
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 16:35:33 2024 +0100

    Fix too-few-public-methods & other small pylint warnings

commit 3fb7ec0
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 16:26:13 2024 +0100

    Fix more pylint warnings

commit 3219583
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 16:16:55 2024 +0100

    Add docstring & disable some pylint warnings

commit a66ffff
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 16:02:11 2024 +0100

    Fix misunderstood "requires" key

    See https://docs.pipenv.org/en/latest/advanced.html#specifying-versions-of-python

commit 5977add
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 15:48:52 2024 +0100

    Remove outdated todo notes

commit 1a735c8
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 15:38:33 2024 +0100

    Rename to `to_latex_str` & add docstrings

commit 06a3d21
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 15:28:35 2024 +0100

    Simplify creation of latex string

commit 0a4c438
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 14:59:19 2024 +0100

    Reduce spacing between value and unit

commit d07f144
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 14:58:18 2024 +0100

    Fix latexer else branch

commit da5d0ec
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 14:47:12 2024 +0100

    Only include non-empty keywords to error list

commit ce5a7f1
Merge: 21b7ba1 f429ec1
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 14:40:21 2024 +0100

    Merge remote-tracking branch 'origin/value-wizard' into value-wizard

commit 21b7ba1
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 14:40:05 2024 +0100

    Refactor result to latex cmd via builder pattern

commit f429ec1
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 14:05:52 2024 +0100

    Raise error when user specifies sigfigs and decimal places

commit 71cfa44
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 14:01:29 2024 +0100

    Update rounder_test.py

commit 45504e3
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:56:11 2024 +0100

    Return errors when making wrong settings in config

commit 3a274d0
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:44:42 2024 +0100

    Change rounding hierarchy (prioritize settings in single results over default settings)

commit 9ad1256
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:43:19 2024 +0100

    Add more rounding options to config

commit ef2bc83
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:26:23 2024 +0100

    Remove unnecessary imports

commit 9b0f11f
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:24:18 2024 +0100

    Move the parsing of exact values from domain to api

commit bc3c7ad
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 13:03:42 2024 +0100

    Add option "without error" to latexer

commit 9757fbc
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 12:39:38 2024 +0100

    Add support for int values

commit bccdef2
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 12:21:40 2024 +0100

    Improve parsing of names

commit ee01e73
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 12:12:43 2024 +0100

    Fix capital ß

commit 29f6c05
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Fri Mar 15 12:11:28 2024 +0100

    Fix error message for short results

commit 9590ffa
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 12:00:14 2024 +0100

    Allow python versions down to `3.8`

commit 42c4044
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 11:54:06 2024 +0100

    Regenerate lockfile & fix missing dependency

commit f6a8fc3
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 11:40:54 2024 +0100

    Remove dummy mail from project settings

commit 09c1fc0
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 03:07:32 2024 +0100

    Let all negative values signify "no decimal places specified"

commit 78babce
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 03:06:47 2024 +0100

    Fix missing copy of python objects

commit a2ee1d7
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 03:06:30 2024 +0100

    Fix wrong caller syntax in tests

commit 8d00de8
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:42:46 2024 +0100

    Always add a "valueOnly" option & do not include unit

commit 75a3db2
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:42:10 2024 +0100

    Add TODO to support int values

commit b102601
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:38:32 2024 +0100

    Remove unnecessary JSON printouts in config

commit 3d0432d
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:22:26 2024 +0100

    Fix package discovery

    Also see https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-simple-packages

commit ca331cc
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:13:59 2024 +0100

    Remove unnecessary import mode config

commit 8ee4d0b
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:08:03 2024 +0100

    Use configuration in stringifier

commit 99549cc
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 02:05:34 2024 +0100

    Implement "print auto" & fix broken config share

commit 215c756
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 01:33:32 2024 +0100

    Raise errors when user passes in empty name

commit 9a0299d
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 01:31:46 2024 +0100

    Remove unnecessary else branch

    Also added a question as TODO

commit a584206
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 01:30:07 2024 +0100

    Add support for decimal places in Rounder

commit 39ff7c4
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 00:54:11 2024 +0100

    Also replace capitalized "ß" (ẞ) in name parser

commit f4df2be
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 00:43:35 2024 +0100

    Make Rounder configurable

    We also had to move some things around as the latexer should not be
    responsible to call the Rounder for a short result.
    This should be the job of the rounder itself.

commit 07146a2
Author: Splines <dominic-plein@gmx.de>
Date:   Fri Mar 15 00:02:09 2024 +0100

    Use configuration in LaTeXer

commit 9a0d277
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 23:46:37 2024 +0100

    Move `_res_cache` instantiation to API

commit 767c89e
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 23:45:05 2024 +0100

    Add link to possible pluml fix

commit e1af3b6
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 23:37:10 2024 +0100

    Redesign config such that defaults are visible in API

commit b83316f
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 23:32:26 2024 +0100

    Add first draft for configuration

commit a364a42
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Thu Mar 14 22:04:06 2024 +0100

    Add TODO

commit b700b33
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Thu Mar 14 21:32:49 2024 +0100

    Make small fix regarding parenthesis in output strings and test it in playground

commit 8e99d5a
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Thu Mar 14 19:08:37 2024 +0100

    Move parsers to api

commit 2065616
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 14:35:09 2024 +0100

    Get rid of unnecessary `_res_cache` variable

    `_res_cache` is already initialized in `application.cache`.

commit 1d045a7
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 14:34:24 2024 +0100

    Rename project to `ResultWizard`

commit 6e000d5
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 13:56:05 2024 +0100

    Invoke pytest correctly in Actions

commit ab951b1
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 13:49:53 2024 +0100

    Fix tests not running with GitHub actions

commit 554cca7
Author: Splines <dominic-plein@gmx.de>
Date:   Thu Mar 14 13:44:10 2024 +0100

    Move python testing settings to better section

commit d4f9b77
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Thu Mar 14 11:45:12 2024 +0100

    Remove print statements

commit d1d7d11
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Thu Mar 14 11:18:45 2024 +0100

    Refactor res.py and move parsers to application

commit b7739e6
Author: paul019 <39464035+paul019@users.noreply.github.com>
Date:   Sun Dec 24 00:25:27 2023 +0100

    Add MIT license
  • Loading branch information
paul019 committed Sep 9, 2024
1 parent da1127a commit e6851e8
Show file tree
Hide file tree
Showing 57 changed files with 2,721 additions and 775 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docs-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Documentation

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- "docs/**"

jobs:
# Just check that the build works and doesn't throw any errors
# The actual build and deployment is done on the main branch
# with another GitHub Actions workflow.
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: '${{ github.workspace }}/docs'

- name: Build with Jekyll
run: bundle exec jekyll build
69 changes: 69 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# See the template here: https://github.com/just-the-docs/just-the-docs-template

name: Documentation

on:
push:
branches:
- "main"
paths:
- "docs/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: '${{ github.workspace }}/docs'

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

# Automatically creates an github-pages artifact used by the deployment job
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "docs/_site/"

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release package

on:
release:
types: [published]

jobs:
releasepypi:
# see https://docs.pypi.org/trusted-publishers/using-a-publisher/
# and https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives
name: Release to PyPI
runs-on: "ubuntu-latest"
environment: release
permissions:
id-token: write

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pipenv'

- name: Run tests (one last time before release)
run: |
pip install pipenv
pipenv install --dev
pipenv run pip3 install --editable .
pipenv run pytest tests/
- name: Install build tooling
run: python3 -m pip install --upgrade build

- name: Build distributions
run: python3 -m build

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"files.exclude": {
"**/__pycache__/": true,
"**/*.egg-info/": true,
".pytest_cache/": true
"**/.pytest_cache/": true,
"**/.jekyll-cache/": true
},
//////////////////////////////////////
// Editor
Expand Down Expand Up @@ -61,6 +62,8 @@
// Spell Checker
//////////////////////////////////////
"cSpell.words": [
"Commandifier",
"getcontext",
"github",
"ifthen",
"ifthenelse",
Expand All @@ -69,17 +72,22 @@
"newcommand",
"normalsize",
"pipenv",
"prec",
"pydantic",
"pylint",
"pytest",
"resultwizard",
"scriptsize",
"scriptstyle",
"setcontext",
"sigfigs",
"siunitx",
"Stringifier",
"textbf",
"texttt",
"textwidth",
"TLDR",
"uncert",
"uncerts",
"usepackage"
]
}
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog of ResultWizard
# Changelog

TODO
👀 Nothing here yet
14 changes: 13 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Getting ready:
- [ ] Recommended VSCode extensions installed (especially the formatter. It should automatically format on every save!)
- [ ] on branch `value-wizard` with latest commit pulled
- [ ] Work through the `Setup` section below (especially to install the necessary dependencies)
- [ ] Read the [`README.md`](https://github.com/paul019/ResultWizard/tree/value-wizard/src#code-structure) in the `src` folder (to get to know the code structure) & see our [feature list](https://github.com/paul019/ResultWizard/issues/16)
- [ ] Read the [`README.md`](https://github.com/resultwizard/ResultWizard/tree/main/src#code-structure) in the `src` folder (to get to know the code structure) & see our [feature list](https://github.com/resultwizard/ResultWizard/issues/16)

Verify that everything worked:
- [ ] try to run the tests, see the instructions in [`tests/playground.py`](./tests/playground.py)
Expand Down Expand Up @@ -66,3 +66,15 @@ Also try adding `import pytest` as first line of a test file. Does it give you a
Note that tests are also run on every commit via a GitHub action.

In order to learn how to write the tests with pytest, start with the [`Get Started` guide](https://docs.pytest.org/en/8.0.x/getting-started.html#create-your-first-test). Probably also relevant: ["How to use fixtures"](https://docs.pytest.org/en/8.0.x/how-to/fixtures.html). There are lots of [How-to guides](https://docs.pytest.org/en/8.0.x/how-to/index.html) available.


## Release to PyPI

To release a new version to [PyPI](https://pypi.org/project/resultwizard/), do the following:

- Create a PR that is going to get merged into `main`. Name it "Continuous Release <version number, e.g. 1.0.0-alpha.42>".
- Make sure all tests pass and review the PR. Merge it into `main` via a *Merge commit*
<br>(from `dev` to `main` always via *Merge commit*, not *Rebase* or *Squash and merge*).
- On `main`, create a new release on GitHub. In this process (via the GitHub UI), create a new tag named "v<version number>", e.g. "v1.0.0-alpha.42".
- The tag creation will trigger a GitHub action that builds and uploads the package to PyPI. As this action uses a special "release" environment, code owners have to approve this step.
- Make sure the new version is available on PyPI [here](https://pypi.org/project/resultwizard/).
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ verify_ssl = true
name = "pypi"

[packages]
plum-dispatch = "*"

[dev-packages]
pylint = "~=3.0"
Expand Down
54 changes: 2 additions & 52 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<div align="center">
<img src="https://github.com/paul019/ResultWizard/assets/37160523/8576038a-3867-470b-8f42-90b60ea92042" width="200px" />
<a href="https://resultwizard.github.io/ResultWizard/">
<img src="https://github.com/resultwizard/ResultWizard/assets/37160523/8576038a-3867-470b-8f42-90b60ea92042" width="120px" />
</a>
<div align="center">
<h3 align="center">ResultWizard</h3>
<p>Intelligent interface between Python-computed values and your LaTeX work</p>
<p><strong>Intelligent interface between Python-computed values and your LaTeX work</strong></p>
</div>
</div>

Annoyed of having to copy around values from Python code to your LaTeX work? Think of `ResultWizard` as an interface between the two. Export any variables from Python including possible uncertainties and their units and directly reference them in your LaTeX document.

## `ResultWizard` is ...

- a
- b


## Usage
> **Warning ⚠**
> ResultWizard is still in its *alpha* stage. We're happy to receive your feedback, e.g. report any bugs. But note that the API might still change before we hit the first stable release 1.0.0.
> **📄**
> **For installation/usage/API, refer to our [documentation](https://resultwizard.github.io/ResultWizard/).**
33 changes: 33 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Documentation

**Things we should include in the documentation:**

- an overview of what the goal of the project is with a small illustration where we sketch python code, the `results.tex` file and the LaTeX document and explain how they are connected
- most common ways to use the library, but then also a comprehensive list of all possible ways to call `res` (preferable on a separate page of the documentation). How to guides for most common cases
- ways to use the variable in LaTeX code, e.g. list all keys, tell users they should enter \resMyVariable[test] and then see the error message to find out what the possible keys are
- passing in as string means exact value
- how to specify the name of a variable. Numbers only allowed from 0 up to 1000. Special characters are stripped. Explain camel case etc.
-> Explain that this has the great potential for loops: users can specify variables in a loop and use format strings, e.g. `wiz.res(f"my_variable_{i}", ...)`
- how to pass in uncertainties. How to pass in one? What about systematic and statistical ones. What if I want to add my own name for the uncertainty? How can I control that output.
- a list of all possible keys for `config_init` including their default values, e.g. `identifier`. In-depth explanation especially for sigfigs and decimal places and how they differ from respective fallback options
- a hint that the output is completely customizable and that the user can change it with the `\sisetup{...}`, e.g. `\cdot` vs. `\times` for exponent, `separate-uncertainty=true` (!)
- how to use the unit string. explain that strings from `siunitx` can be passed in, e.g. `\cm \per \N` etc. Explain how python raw strings can help, e.g. `r"\cm \per \N"` instead of having to do `\\cm` etc. all the time. However, `r'\\tesla'` will fail as the double backslash is treated a raw string and not as an escape character. Use `r'\tesla'` instead.
- possible ways to print a result. Recommended: activate `print_auto`. Other way: call `print()` on result object. Users can also call `resVariable.to_latex_str()` to retrieve the LaTeX representation. This can be useful to plot the result in a matplotlib figure, e.g. the fit parameter of a curve fit.
- Suggest some good initial configuration for Jupyter notebook, e.g. `print_auto=True` and `ignore_result_overwrite=True`.
- Naming: we call it "uncertainty". Give a hint that others might also call it "error" interchangeably.
- Jupyter Notebook tip to avoid

```
<api.printable_result.PrintableResult at 0x7f35beb20510>
```
as output. Instead append a `;` to the `wiz.res(...)` call and the output will be suppressed.

- Use fuzzy search in IntelliSense to search for result names.



## Other

- Setup issue template and contribution guide. Clean up `DEVELOPMENT.md`.
- Long-term: Ask real users what they really need in the scientific day-to-day life, see [here](https://github.com/resultwizard/ResultWizard/issues/9).
- If user enters an uncertainty of `0.0`, don't just issue warning "Uncertainty must be positive", but also give a hint that the user might want to use a different caller syntax for `res` which does not even have the uncertainty as argument.
12 changes: 12 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are directly copied from Jekyll's first-party docs on `.gitignore` files:
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control

# Ignore the default location of the built site, and caches and metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/
26 changes: 26 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}

h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found 😥</strong></p>
<p>The requested page could not be found.</p>
</div>
Loading

0 comments on commit e6851e8

Please sign in to comment.