-
Notifications
You must be signed in to change notification settings - Fork 24
chore: update poetry.lock file for dependabot #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pyproject.toml
Outdated
| pydantic = "^2.7" | ||
| sympy = "^1.12" | ||
| qref = "^0.11.0" | ||
| h11 = "^0.16.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of adding h11 as an explicit dependency, since it's a transient dependency, we don't use it anywhere directly.
At least there should be a comment on why it's there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's true. The reason for adding it explicitly is because the version that we use 0.14.0 is less than the version for the fix proposed in #222 (0.16.0). I wanted to see if I could see where h11 might be coming from in the dependency tree and then update that meta-dependency. However, running:
$ poetry show h11 --tree
h11 0.16.0 A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
doesn't give me the information about which dependency is bringing it in. Indeed, running the more verbose tree command:
$ poetry show --tree
black 24.10.0 The uncompromising code formatter.
├── click >=8.0.0
│ └── colorama *
├── mypy-extensions >=0.4.3
├── packaging >=22.0
├── pathspec >=0.9.0
├── platformdirs >=2
├── tomli >=1.1.0
└── typing-extensions >=4.0.1
flake8 7.2.0 the modular source code checker: pep8 pyflakes and co
├── mccabe >=0.7.0,<0.8.0
├── pycodestyle >=2.13.0,<2.14.0
└── pyflakes >=3.3.0,<3.4.0
flake8-docstrings 1.7.0 Extension for flake8 which uses pydocstyle to check docstrings
├── flake8 >=3
│ ├── mccabe >=0.7.0,<0.8.0
│ ├── pycodestyle >=2.13.0,<2.14.0
│ └── pyflakes >=3.3.0,<3.4.0
└── pydocstyle >=2.1
└── snowballstemmer >=2.2.0
h11 0.16.0 A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
ipytree 0.2.2 A Tree Widget using jsTree
└── ipywidgets >=7.5.0,<9
├── comm >=0.1.3
│ └── traitlets >=4
├── ipython >=6.1.0
│ ├── colorama *
│ ├── decorator *
│ ├── exceptiongroup *
│ ├── jedi >=0.16
│ │ └── parso >=0.8.4,<0.9.0
│ ├── matplotlib-inline *
│ │ └── traitlets * (circular dependency aborted here)
│ ├── pexpect >4.3
│ │ └── ptyprocess >=0.5
│ ├── prompt-toolkit >=3.0.41,<3.1.0
│ │ └── wcwidth *
│ ├── pygments >=2.4.0
│ ├── stack-data *
│ │ ├── asttokens >=2.1.0
│ │ ├── executing >=1.2.0
│ │ └── pure-eval *
│ ├── traitlets >=5.13.0 (circular dependency aborted here)
│ └── typing-extensions >=4.6
├── jupyterlab-widgets >=3.0.12,<3.1.0
├── traitlets >=4.3.1 (circular dependency aborted here)
└── widgetsnbextension >=4.0.12,<4.1.0
....
(Rest of output from `-tree` command truncated)
IOW, it doesn't seem clear to me where precisely h11 is coming from. I can suggest two options:
- Keep the
h11 = "^0.16.0"dependency explicitly listed in thepyproject.tomlfile (although I also don't like transient dependencies, so maybe let's not opt for this one) and add a comment for descriptive purposes as to why this is listed, or - Remove the
h11dependency and be aware that chore(deps-dev): bump h11 from 0.14.0 to 0.16.0 #222 will still be flagged.
I think I would opt for Option 2, but I'm open to other options not listed here as well that might be better. Any thoughts, @mstechly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tree failed for you as you already had h11 specified in pyproject.toml.
When I ran it on a fresh repo I got:
├── jupyterlab >=4.3.6,<4.4
│ ├── async-lru >=1.0.0
│ │ └── typing-extensions >=4.0.0
│ ├── httpx >=0.25.0
│ │ ├── anyio *
│ │ │ ├── exceptiongroup >=1.0.2
│ │ │ ├── idna >=2.8
│ │ │ ├── sniffio >=1.1
│ │ │ └── typing-extensions >=4.5 (circular dependency aborted here)
│ │ ├── certifi *
│ │ ├── httpcore ==1.*
│ │ │ ├── certifi * (circular dependency aborted here)
│ │ │ └── h11 >=0.13,<0.15
So I went down that rabbithole and it looks like it's already fixed in httpcore (see this MR: encode/httpcore#1008), but it just has not been released yet.
So I would go with option 2, the problem will solve itself once they release it and we update poetry lock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good! Okay, Option 2 it is then: 08b0158
* chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock
…lass (#205) * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * refactor: Added CompilationFlags to init * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * refactor: Changed assertions into Exceptions * bugfix: Changed None -> CompilationsFlags(0) * chore: Updated compilation to discuss transitivity and compilation flags * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * feat: Began work on sympy manipulator * feat: added instruction types enum; adding functionality to SM * refactor: split base class + sympyManipulator into separate modules * chore: removed generic types * refactor: Moved InstructionsType enum * feat: Added `focus` method. Generic types added * refactor: Renamed SympyManipulation -> SympyManipulator * fix: removed testing code * refactor: renamed analysis.py -> optimization.py * refactor: created analysis module * feat: created rewriters module * feat: added expressionwriter abc * feat: subclassed from expressionwriter * chore: improving typing * feat: Added basic tests for rewriters * chore: improved typing, added docstrings * feat: improved typing; added docstrings * chore: ran isort * chore: fixed typing issues * chore: added module level docstrings * chore: removed unused import * chore: erroneous line introduced * chore: added module level docstring * chore: improved typing in update_expression * chore: added module level docstring; removed return section of docstring and improved descriptions * chore: Type -> type * chore: made expression_rewriter.py public * refactor: renamed variables -> free_symbols * refactor: improved docstrings * chore: correcting imports * refactor: renamed test_variables, and improved it such that it will work for all backends * chore: added copyright message * refactor: renamed free_symbols_in -> free_symbols * chore: updated docstrings * chore: isort fix * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: resolving conflicts * chore: free_symbols_in -> free_symbols * chore: free_symbols_in -> free_symbols * Resolving conflicts * began typing fixes * Removed expression getter/setter. Updated typing * Removed commented out code * feat: added treemap visualisation class (#216) * Added GSE prototype * Trialling a decorator function * Added warning if no update applied; added methods to isolate functions and their arguments * Minor fix * Removed userwarning due to bug * Added catch for top level expression * Added better support for parsing assumptions and redefining symbols * Potential bugfix; Symbols now updated correctly * Improved logic parsing * bug fix * Improved detection of nonzero Symbols * Added warning if an expression does not change * defaulting suppress_warnings to true; still experimental * Updated check_expression_update to catch edge cases * bug fix: when parsing known symbols with reference values!=0 * Undoing code removal * Minor change for readaility * more bug fixes * More bug fixes * Hopefully the last bug fix * tbd * tbd * Updated imports after merge * Minor improvements * Added ability to evaluate gnarly * Attempting to fix evaluation bug * bug fix * bug found on substitute * Removed unused import * Added fix to allow substitute to refer to symbols rather than symbol names * Removed unnecessary print statement * Bandaid fix for minor bug * Small fix * fix: proper detection for zero arguments * Upgraded grammar and text in alias-sampling * Only minor changes to the third tutorial * Typo fix. * Added visualisations module; needs depth parameter. * scratch notebook * Pausing work; creating issue in bartiq. * feat: visualisation improvement cleanup * feat: visualisation improvement cleanup * feat: create a method that can handle dataframe with redundant names * test: test the new method * chore: linting * chore: include pandas and plotly in dependencies * Update src/bartiq/visualisations.py Co-authored-by: Dr Brendan Reid <[email protected]> * chore: file removal and renaming from review * feat: added is_numeric method and visualization input validation check logic * test: added compiled routine is_numeric tests and input validation for visualization * chore: remove scale_to * chore: delete changes to sympy backend * chore: private function instead of classmethod * chore: reset advanced example * chore: validation checking invalid resource to plot * chore: avoid duplication of strings when calling px.treemap * test: output data frame is as expected * test: test plot output type * chore: adjust docstring and test function signatures * chore: linting * chore: linting * chore: address review comments * chore: address review comment --------- Co-authored-by: brendan reid <[email protected]> Co-authored-by: Brendan Reid <[email protected]> Co-authored-by: Dr Brendan Reid <[email protected]> * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * Removed reference to ._expr * improved typing * Modifying Basic -> Expr as generic type. * Modified fixture * improved typing * Moved expand test to be sympy specific * changed fixture scope from 'class' to 'function' * renamed as_individual_terms - > individual_terms * Renamed property; ran isort * renamed as_individual_terms -> individual_terms * typo fix * Removed fixtures from tests and restructured them * chore: update poetry.lock file for dependabot (#227) * chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock * refactor: made pandas and plotly optional installs (#226) * refactor: made pandas and plotly optional installs * Added checks to ensure tests do not fail unexpectedly * ran isort * Added .venv to .gitignore * Addition of pandas stubs changed behaviour of scipy stubs; quick fix * renamed visualization->interactive * updated extras flag * renamed vis->viz * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * added plotly-stubs; may revert * Removed type: ignore * removed type: ignore; updated error message * fixing plotly-stubs install * Removed plotly-stubs entirely. * added pytest.importorskip to module * Added noqa to pass flake8 * Ran isort * isort versioning mismatch * Streamlined some aspects of the TreeMap class; removed unnecessary checks * Removing unused imports * fix: Fix typing in analysis module --------- Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]> * updated substitute function to account for symbols with assumptions on them * attempting to consolidate the typing * Added sequence of commands as a test * removing unused import * Updating typing * Implementing Konrads changes * remove trailing whitespace * added return statement * minor changes to typing * removing sequence of commands test * fixing linting; temporary fix --------- Co-authored-by: Avin Divakara <[email protected]> Co-authored-by: antalszava <[email protected]> Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]>
* chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * refactor: Added CompilationFlags to init * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * refactor: Changed assertions into Exceptions * bugfix: Changed None -> CompilationsFlags(0) * chore: Updated compilation to discuss transitivity and compilation flags * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * feat: Began work on sympy manipulator * feat: added instruction types enum; adding functionality to SM * refactor: split base class + sympyManipulator into separate modules * chore: removed generic types * refactor: Moved InstructionsType enum * feat: Added `focus` method. Generic types added * refactor: Renamed SympyManipulation -> SympyManipulator * fix: removed testing code * refactor: renamed analysis.py -> optimization.py * refactor: created analysis module * feat: created rewriters module * feat: added expressionwriter abc * feat: subclassed from expressionwriter * chore: improving typing * feat: Added basic tests for rewriters * chore: improved typing, added docstrings * feat: improved typing; added docstrings * chore: ran isort * chore: fixed typing issues * chore: added module level docstrings * chore: removed unused import * chore: erroneous line introduced * chore: added module level docstring * chore: improved typing in update_expression * chore: added module level docstring; removed return section of docstring and improved descriptions * chore: Type -> type * chore: made expression_rewriter.py public * refactor: renamed variables -> free_symbols * refactor: improved docstrings * chore: correcting imports * refactor: renamed test_variables, and improved it such that it will work for all backends * chore: added copyright message * refactor: renamed free_symbols_in -> free_symbols * chore: updated docstrings * chore: isort fix * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * feat: began development on assumptions * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: resolving conflicts * chore: free_symbols_in -> free_symbols * chore: free_symbols_in -> free_symbols * Resolving conflicts * Improving assumptions handling * began typing fixes * Removed expression getter/setter. Updated typing * Removed commented out code * feat: added treemap visualisation class (#216) * Added GSE prototype * Trialling a decorator function * Added warning if no update applied; added methods to isolate functions and their arguments * Minor fix * Removed userwarning due to bug * Added catch for top level expression * Added better support for parsing assumptions and redefining symbols * Potential bugfix; Symbols now updated correctly * Improved logic parsing * bug fix * Improved detection of nonzero Symbols * Added warning if an expression does not change * defaulting suppress_warnings to true; still experimental * Updated check_expression_update to catch edge cases * bug fix: when parsing known symbols with reference values!=0 * Undoing code removal * Minor change for readaility * more bug fixes * More bug fixes * Hopefully the last bug fix * tbd * tbd * Updated imports after merge * Minor improvements * Added ability to evaluate gnarly * Attempting to fix evaluation bug * bug fix * bug found on substitute * Removed unused import * Added fix to allow substitute to refer to symbols rather than symbol names * Removed unnecessary print statement * Bandaid fix for minor bug * Small fix * fix: proper detection for zero arguments * Upgraded grammar and text in alias-sampling * Only minor changes to the third tutorial * Typo fix. * Added visualisations module; needs depth parameter. * scratch notebook * Pausing work; creating issue in bartiq. * feat: visualisation improvement cleanup * feat: visualisation improvement cleanup * feat: create a method that can handle dataframe with redundant names * test: test the new method * chore: linting * chore: include pandas and plotly in dependencies * Update src/bartiq/visualisations.py Co-authored-by: Dr Brendan Reid <[email protected]> * chore: file removal and renaming from review * feat: added is_numeric method and visualization input validation check logic * test: added compiled routine is_numeric tests and input validation for visualization * chore: remove scale_to * chore: delete changes to sympy backend * chore: private function instead of classmethod * chore: reset advanced example * chore: validation checking invalid resource to plot * chore: avoid duplication of strings when calling px.treemap * test: output data frame is as expected * test: test plot output type * chore: adjust docstring and test function signatures * chore: linting * chore: linting * chore: address review comments * chore: address review comment --------- Co-authored-by: brendan reid <[email protected]> Co-authored-by: Brendan Reid <[email protected]> Co-authored-by: Dr Brendan Reid <[email protected]> * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * Removed reference to ._expr * improved typing * Modifying Basic -> Expr as generic type. * Modified fixture * improved typing * Moved expand test to be sympy specific * changed fixture scope from 'class' to 'function' * renamed as_individual_terms - > individual_terms * Renamed property; ran isort * renamed as_individual_terms -> individual_terms * typo fix * Removed fixtures from tests and restructured them * chore: update poetry.lock file for dependabot (#227) * chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock * refactor: made pandas and plotly optional installs (#226) * refactor: made pandas and plotly optional installs * Added checks to ensure tests do not fail unexpectedly * ran isort * Added .venv to .gitignore * Addition of pandas stubs changed behaviour of scipy stubs; quick fix * renamed visualization->interactive * updated extras flag * renamed vis->viz * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * added plotly-stubs; may revert * Removed type: ignore * removed type: ignore; updated error message * fixing plotly-stubs install * Removed plotly-stubs entirely. * added pytest.importorskip to module * Added noqa to pass flake8 * Ran isort * isort versioning mismatch * Streamlined some aspects of the TreeMap class; removed unnecessary checks * Removing unused imports * fix: Fix typing in analysis module --------- Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]> * updated substitute function to account for symbols with assumptions on them * attempting to consolidate the typing * Added sequence of commands as a test * removing unused import * Updating typing * Implementing Konrads changes * remove trailing whitespace * added return statement * reimplementing lost changes * Implementing SympyAssumption * made it so child classes of ExpressionRewriters do not need the decorator * moved evaluation check into Assumptions _post_init_ * started assumptions tracking * quick fix for custom max problem * improved docstrings and added comments * added reapply_all_assumptions * formatting * improving properties dict * isort * formatting * began tests * updated properties dict * added tests * formatting * added comment on _add_assumption * deleted test file * fixing mypy issues * fixing mypy issues * fixing import for py3.10 * isort * minor typo fix * added hash to assumptions * added decorator to override custom max * minor refactor after removing custom max * began improving tests * added classmethod to sympy_backend * added classmethod to sympy_backend * added tests for .with_sympy_max * rename Relationals -> Comparators * rename relationship->comparator * minor typo fix * re-adding assumptions after mistaken deletion * changed from using float to literal_eval * added more tests for assumptions * minor fixes * improved typehinting * improved tracking of assumptions * improved tracking of assumptions * streamlined dataclass interactions * deleting test file * bug fixes * change from all caps to snake case * moving some assumptions tests into basic tests * fixing docstring inconsistencies * quick fixes from michals review * Removed classmethod; moved logic to `parse_to_sympy` * modified interpreter to override certain functions * modified rewriter backend def * removed test until we settle on impl * bug fixes, test fixes * deleted unwanted file * mypy fix * added function_overrides to sympyinterpreter * updated sympybackend with new properties * updated rewriter after changes to sympy backend * modified backend after changes to interpreter * removing unnecessary kwargs * improved docstrings * added tests for sympy_backend when using sympy max * rename assume->assumption * fix typing error * test renaming * renaming assumption->assume * typo * another typo * renamed kwarg to assumption --------- Co-authored-by: Avin Divakara <[email protected]> Co-authored-by: antalszava <[email protected]> Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]>
…ory tracking (#237) * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * refactor: Added CompilationFlags to init * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * refactor: Changed assertions into Exceptions * bugfix: Changed None -> CompilationsFlags(0) * chore: Updated compilation to discuss transitivity and compilation flags * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * feat: Began work on sympy manipulator * feat: added instruction types enum; adding functionality to SM * refactor: split base class + sympyManipulator into separate modules * chore: removed generic types * refactor: Moved InstructionsType enum * feat: Added `focus` method. Generic types added * refactor: Renamed SympyManipulation -> SympyManipulator * fix: removed testing code * refactor: renamed analysis.py -> optimization.py * refactor: created analysis module * feat: created rewriters module * feat: added expressionwriter abc * feat: subclassed from expressionwriter * chore: improving typing * feat: Added basic tests for rewriters * chore: improved typing, added docstrings * feat: improved typing; added docstrings * chore: ran isort * chore: fixed typing issues * chore: added module level docstrings * chore: removed unused import * chore: erroneous line introduced * chore: added module level docstring * chore: improved typing in update_expression * chore: added module level docstring; removed return section of docstring and improved descriptions * chore: Type -> type * chore: made expression_rewriter.py public * refactor: renamed variables -> free_symbols * refactor: improved docstrings * chore: correcting imports * refactor: renamed test_variables, and improved it such that it will work for all backends * chore: added copyright message * refactor: renamed free_symbols_in -> free_symbols * chore: updated docstrings * chore: isort fix * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * feat: began development on assumptions * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: resolving conflicts * chore: free_symbols_in -> free_symbols * chore: free_symbols_in -> free_symbols * Resolving conflicts * Improving assumptions handling * began typing fixes * Removed expression getter/setter. Updated typing * Removed commented out code * feat: added treemap visualisation class (#216) * Added GSE prototype * Trialling a decorator function * Added warning if no update applied; added methods to isolate functions and their arguments * Minor fix * Removed userwarning due to bug * Added catch for top level expression * Added better support for parsing assumptions and redefining symbols * Potential bugfix; Symbols now updated correctly * Improved logic parsing * bug fix * Improved detection of nonzero Symbols * Added warning if an expression does not change * defaulting suppress_warnings to true; still experimental * Updated check_expression_update to catch edge cases * bug fix: when parsing known symbols with reference values!=0 * Undoing code removal * Minor change for readaility * more bug fixes * More bug fixes * Hopefully the last bug fix * tbd * tbd * Updated imports after merge * Minor improvements * Added ability to evaluate gnarly * Attempting to fix evaluation bug * bug fix * bug found on substitute * Removed unused import * Added fix to allow substitute to refer to symbols rather than symbol names * Removed unnecessary print statement * Bandaid fix for minor bug * Small fix * fix: proper detection for zero arguments * Upgraded grammar and text in alias-sampling * Only minor changes to the third tutorial * Typo fix. * Added visualisations module; needs depth parameter. * scratch notebook * Pausing work; creating issue in bartiq. * feat: visualisation improvement cleanup * feat: visualisation improvement cleanup * feat: create a method that can handle dataframe with redundant names * test: test the new method * chore: linting * chore: include pandas and plotly in dependencies * Update src/bartiq/visualisations.py Co-authored-by: Dr Brendan Reid <[email protected]> * chore: file removal and renaming from review * feat: added is_numeric method and visualization input validation check logic * test: added compiled routine is_numeric tests and input validation for visualization * chore: remove scale_to * chore: delete changes to sympy backend * chore: private function instead of classmethod * chore: reset advanced example * chore: validation checking invalid resource to plot * chore: avoid duplication of strings when calling px.treemap * test: output data frame is as expected * test: test plot output type * chore: adjust docstring and test function signatures * chore: linting * chore: linting * chore: address review comments * chore: address review comment --------- Co-authored-by: brendan reid <[email protected]> Co-authored-by: Brendan Reid <[email protected]> Co-authored-by: Dr Brendan Reid <[email protected]> * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * Removed reference to ._expr * improved typing * Modifying Basic -> Expr as generic type. * Modified fixture * improved typing * Moved expand test to be sympy specific * changed fixture scope from 'class' to 'function' * renamed as_individual_terms - > individual_terms * Renamed property; ran isort * renamed as_individual_terms -> individual_terms * typo fix * Removed fixtures from tests and restructured them * chore: update poetry.lock file for dependabot (#227) * chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock * refactor: made pandas and plotly optional installs (#226) * refactor: made pandas and plotly optional installs * Added checks to ensure tests do not fail unexpectedly * ran isort * Added .venv to .gitignore * Addition of pandas stubs changed behaviour of scipy stubs; quick fix * renamed visualization->interactive * updated extras flag * renamed vis->viz * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * added plotly-stubs; may revert * Removed type: ignore * removed type: ignore; updated error message * fixing plotly-stubs install * Removed plotly-stubs entirely. * added pytest.importorskip to module * Added noqa to pass flake8 * Ran isort * isort versioning mismatch * Streamlined some aspects of the TreeMap class; removed unnecessary checks * Removing unused imports * fix: Fix typing in analysis module --------- Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]> * updated substitute function to account for symbols with assumptions on them * attempting to consolidate the typing * Added sequence of commands as a test * removing unused import * Updating typing * Implementing Konrads changes * remove trailing whitespace * added return statement * reimplementing lost changes * Implementing SympyAssumption * made it so child classes of ExpressionRewriters do not need the decorator * moved evaluation check into Assumptions _post_init_ * started assumptions tracking * quick fix for custom max problem * improved docstrings and added comments * added reapply_all_assumptions * formatting * improving properties dict * isort * formatting * began tests * updated properties dict * added tests * formatting * added comment on _add_assumption * deleted test file * fixing mypy issues * fixing mypy issues * fixing import for py3.10 * isort * minor typo fix * Added substitution methods * implemented sympy substitutions,including wildcards * modified substitute to allow arbitrary substitutions" * improvements to wildcard subs * fixed final bug in wildcard subs * added hash to assumptions * minor refactor * added decorator to override custom max * minor refactor after removing custom max * began improving tests * added classmethod to sympy_backend * added classmethod to sympy_backend * added tests for .with_sympy_max * rename Relationals -> Comparators * rename relationship->comparator * minor typo fix * re-adding assumptions after mistaken deletion * changed from using float to literal_eval * added more tests for assumptions * minor fixes * mypy fixes * docstring updates;mypy fixes;wildcard improvements * mypy fixes * improved typehinting * improved tracking of assumptions * improved tracking of assumptions * updating evaluate from main * minor fixes * gave _substitute default behaviour * streamlined dataclass interactions * deleting test file * added_named_tuple * bug fixes * change from all caps to snake case * minor refactor * started testing substitutions * moving some assumptions tests into basic tests * updated focus + substitution logic * added tests * fixing docstring inconsistencies * quick fixes from michals review * Removed classmethod; moved logic to `parse_to_sympy` * modified interpreter to override certain functions * modified rewriter backend def * removed test until we settle on impl * bug fixes, test fixes * deleted unwanted file * mypy fix * minor change * refactor * added function_overrides to sympyinterpreter * updated sympybackend with new properties * updated rewriter after changes to sympy backend * modified backend after changes to interpreter * removing unnecessary kwargs * improved docstrings * added tests for sympy_backend when using sympy max * rename assume->assumption * fix typing error * test renaming * refactored into dataclasses * removing tests from downstream branch * added instruction set * renaming assumption->assume * typo * another typo * renamed kwarg to assumption * fixing typing & usability * updated tests to pass * fixing imports * deleted erroneous line * added tests for history tracking * deleted duplicate fn * removed revert_to in favour of undo_previous; renamed show_history; improved docstrings * fixed implementation error in reapply_all_assumptions * fixed implementation error in focus * added original; hardcoded sympy backend to prevent reinstantiation * modified history methods; updated tests * reverting change to sympy_backend --------- Co-authored-by: Avin Divakara <[email protected]> Co-authored-by: antalszava <[email protected]> Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]>
* chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * feat: Began work on sympy manipulator * feat: added instruction types enum; adding functionality to SM * refactor: split base class + sympyManipulator into separate modules * chore: removed generic types * refactor: Moved InstructionsType enum * feat: Added `focus` method. Generic types added * refactor: Renamed SympyManipulation -> SympyManipulator * fix: removed testing code * refactor: renamed analysis.py -> optimization.py * refactor: created analysis module * feat: created rewriters module * feat: added expressionwriter abc * feat: subclassed from expressionwriter * chore: improving typing * feat: Added basic tests for rewriters * chore: improved typing, added docstrings * feat: improved typing; added docstrings * chore: ran isort * chore: fixed typing issues * chore: added module level docstrings * chore: removed unused import * chore: erroneous line introduced * chore: added module level docstring * chore: improved typing in update_expression * chore: added module level docstring; removed return section of docstring and improved descriptions * chore: Type -> type * chore: made expression_rewriter.py public * refactor: renamed variables -> free_symbols * refactor: improved docstrings * chore: correcting imports * refactor: renamed test_variables, and improved it such that it will work for all backends * chore: added copyright message * refactor: renamed free_symbols_in -> free_symbols * chore: updated docstrings * chore: isort fix * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * feat: began development on assumptions * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: resolving conflicts * chore: free_symbols_in -> free_symbols * chore: free_symbols_in -> free_symbols * Resolving conflicts * Improving assumptions handling * began typing fixes * Removed expression getter/setter. Updated typing * Removed commented out code * feat: added treemap visualisation class (#216) * Added GSE prototype * Trialling a decorator function * Added warning if no update applied; added methods to isolate functions and their arguments * Minor fix * Removed userwarning due to bug * Added catch for top level expression * Added better support for parsing assumptions and redefining symbols * Potential bugfix; Symbols now updated correctly * Improved logic parsing * bug fix * Improved detection of nonzero Symbols * Added warning if an expression does not change * defaulting suppress_warnings to true; still experimental * Updated check_expression_update to catch edge cases * bug fix: when parsing known symbols with reference values!=0 * Undoing code removal * Minor change for readaility * more bug fixes * More bug fixes * Hopefully the last bug fix * tbd * tbd * Updated imports after merge * Minor improvements * Added ability to evaluate gnarly * Attempting to fix evaluation bug * bug fix * bug found on substitute * Removed unused import * Added fix to allow substitute to refer to symbols rather than symbol names * Removed unnecessary print statement * Bandaid fix for minor bug * Small fix * fix: proper detection for zero arguments * Upgraded grammar and text in alias-sampling * Only minor changes to the third tutorial * Typo fix. * Added visualisations module; needs depth parameter. * scratch notebook * Pausing work; creating issue in bartiq. * feat: visualisation improvement cleanup * feat: visualisation improvement cleanup * feat: create a method that can handle dataframe with redundant names * test: test the new method * chore: linting * chore: include pandas and plotly in dependencies * Update src/bartiq/visualisations.py Co-authored-by: Dr Brendan Reid <[email protected]> * chore: file removal and renaming from review * feat: added is_numeric method and visualization input validation check logic * test: added compiled routine is_numeric tests and input validation for visualization * chore: remove scale_to * chore: delete changes to sympy backend * chore: private function instead of classmethod * chore: reset advanced example * chore: validation checking invalid resource to plot * chore: avoid duplication of strings when calling px.treemap * test: output data frame is as expected * test: test plot output type * chore: adjust docstring and test function signatures * chore: linting * chore: linting * chore: address review comments * chore: address review comment --------- Co-authored-by: brendan reid <[email protected]> Co-authored-by: Brendan Reid <[email protected]> Co-authored-by: Dr Brendan Reid <[email protected]> * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * Removed reference to ._expr * improved typing * Modifying Basic -> Expr as generic type. * Modified fixture * improved typing * Moved expand test to be sympy specific * changed fixture scope from 'class' to 'function' * renamed as_individual_terms - > individual_terms * Renamed property; ran isort * renamed as_individual_terms -> individual_terms * typo fix * Removed fixtures from tests and restructured them * chore: update poetry.lock file for dependabot (#227) * chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock * refactor: made pandas and plotly optional installs (#226) * refactor: made pandas and plotly optional installs * Added checks to ensure tests do not fail unexpectedly * ran isort * Added .venv to .gitignore * Addition of pandas stubs changed behaviour of scipy stubs; quick fix * renamed visualization->interactive * updated extras flag * renamed vis->viz * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * added plotly-stubs; may revert * Removed type: ignore * removed type: ignore; updated error message * fixing plotly-stubs install * Removed plotly-stubs entirely. * added pytest.importorskip to module * Added noqa to pass flake8 * Ran isort * isort versioning mismatch * Streamlined some aspects of the TreeMap class; removed unnecessary checks * Removing unused imports * fix: Fix typing in analysis module --------- Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]> * updated substitute function to account for symbols with assumptions on them * attempting to consolidate the typing * Added sequence of commands as a test * removing unused import * Updating typing * Implementing Konrads changes * remove trailing whitespace * added return statement * reimplementing lost changes * Implementing SympyAssumption * made it so child classes of ExpressionRewriters do not need the decorator * moved evaluation check into Assumptions _post_init_ * started assumptions tracking * quick fix for custom max problem * improved docstrings and added comments * added reapply_all_assumptions * formatting * improving properties dict * isort * formatting * began tests * updated properties dict * added tests * formatting * added comment on _add_assumption * deleted test file * fixing mypy issues * fixing mypy issues * fixing import for py3.10 * isort * minor typo fix * Added substitution methods * implemented sympy substitutions,including wildcards * modified substitute to allow arbitrary substitutions" * improvements to wildcard subs * fixed final bug in wildcard subs * added hash to assumptions * minor refactor * added decorator to override custom max * minor refactor after removing custom max * began improving tests * added classmethod to sympy_backend * added classmethod to sympy_backend * added tests for .with_sympy_max * rename Relationals -> Comparators * rename relationship->comparator * minor typo fix * re-adding assumptions after mistaken deletion * changed from using float to literal_eval * added more tests for assumptions * minor fixes * mypy fixes * docstring updates;mypy fixes;wildcard improvements * mypy fixes * improved typehinting * improved tracking of assumptions * improved tracking of assumptions * updating evaluate from main * minor fixes * gave _substitute default behaviour * streamlined dataclass interactions * deleting test file * added_named_tuple * bug fixes * change from all caps to snake case * minor refactor * started testing substitutions * moving some assumptions tests into basic tests * updated focus + substitution logic * added tests * fixing docstring inconsistencies * quick fixes from michals review * Removed classmethod; moved logic to `parse_to_sympy` * modified interpreter to override certain functions * modified rewriter backend def * removed test until we settle on impl * bug fixes, test fixes * deleted unwanted file * mypy fix * minor change * refactor * added function_overrides to sympyinterpreter * updated sympybackend with new properties * updated rewriter after changes to sympy backend * modified backend after changes to interpreter * removing unnecessary kwargs * improved docstrings * added tests for sympy_backend when using sympy max * rename assume->assumption * fix typing error * test renaming * typing fixes * refactored into dataclasses * removing tests from downstream branch * added instruction set * renaming assumption->assume * typo * another typo * renamed kwarg to assumption * fixing typing & usability * updated tests to pass * fixing imports * deleted erroneous line * added tests for history tracking * fixing mypy issues * refactored instructions * refactored assumptions as child of dummy class * modified tests after refactor * made rewriters public * made rewriters public * deleting files * exposed rewriter factory * modified how substitutions are added * minor refactor on substitutions; added factory method * improved logic on linked parameters * updated tests after refactor * added new ignore code to flake8 * remove unnecessary guards * improving docstrings * improving tests * tighting typing * added tests for linked parameters in focus * added per-file ignore code for lambdas * made wild chars stored in tuples rather than list * removed None type from original_expression * removed noqa * simplified logic after Konrads comments * minor typing typo (typ-o) * fixing typos in docstring * updating docstrings * minor factor on substitutions * updating tests * fixing attr error * fixing tests * removed testig code * updated assumption properties derivation; improved docstrings * updated tests * missing word in docstring --------- Co-authored-by: Avin Divakara <[email protected]> Co-authored-by: antalszava <[email protected]> Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]>
…ines (#239) * chore: added module level docstrings * chore: removed unused import * chore: erroneous line introduced * chore: added module level docstring * chore: improved typing in update_expression * chore: added module level docstring; removed return section of docstring and improved descriptions * chore: Type -> type * chore: made expression_rewriter.py public * refactor: renamed variables -> free_symbols * refactor: improved docstrings * chore: correcting imports * refactor: renamed test_variables, and improved it such that it will work for all backends * chore: added copyright message * refactor: renamed free_symbols_in -> free_symbols * chore: updated docstrings * chore: isort fix * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * feat: began development on assumptions * chore: Added a comment about allow_transitive_resources to tutorial #1 * chore: added allow_transitive_resources=False; added quotes to Note about interactive tools * chore: updated tutorial 3 * chore: Added sentences about transitive compilation of resources * refactor: Created `CompilationFlags` enum * refactor: Replaced asserts with Exceptions; added fix for repetitions + transitive resources * chore: Updated docstrings * chore: updating tests for CompilationFlags * chore: Modified tests to catch edge case errors (previously assertions) * chore: Updated tutorials with Compilation Flags * refactor: creating analysis submodule. * docs: improve the API docs (#209) * docs: Added the list of possible values for `ResourceType` and `PortDirection` on docstring * docs: Added missing `Raises` sections in existing docstrings * docs: Improved styling of function segments in docs for easy navigation * docs: Added clickable reference links to parts of documentations in doc strings * fix: Fixed the formatting and lint issues * fix(docs): Fixed docs reference issues on`_compile.py`, `_evaluate.py` & `_routine.py` * fix: Exposed `SymbolicBackend` through `bartiq.symbolics` * fix: Exposed `Port` at top level (`bartiq.Port`) * docs: Adding doc-string for `Port` class * fix(docs): Added missing Args, and references in modified docs * fix(docs): Added External references * fix(docs): Fixed issues of long `Return` descriptions * fix(docs): Reverting `symbolics` concept markdown content * fix(docs): Improved styling of overload functions displayed in docs & removed type hints for `postorder_transform` * fix(docs): Fixed a formatting issue in the module doc-string * fix(docs): Removed `SymbolicBackend` from exposing to top-level, and added submodule rendering and extra styling for documentation * fix(docs): Removed unnecessary doc-strings in each `postorder_transform` overload function * fix(docs): Extended `module` & `method` annotations in docs * chore: resolving conflicts * chore: free_symbols_in -> free_symbols * chore: free_symbols_in -> free_symbols * Resolving conflicts * Improving assumptions handling * began typing fixes * Removed expression getter/setter. Updated typing * Removed commented out code * feat: added treemap visualisation class (#216) * Added GSE prototype * Trialling a decorator function * Added warning if no update applied; added methods to isolate functions and their arguments * Minor fix * Removed userwarning due to bug * Added catch for top level expression * Added better support for parsing assumptions and redefining symbols * Potential bugfix; Symbols now updated correctly * Improved logic parsing * bug fix * Improved detection of nonzero Symbols * Added warning if an expression does not change * defaulting suppress_warnings to true; still experimental * Updated check_expression_update to catch edge cases * bug fix: when parsing known symbols with reference values!=0 * Undoing code removal * Minor change for readaility * more bug fixes * More bug fixes * Hopefully the last bug fix * tbd * tbd * Updated imports after merge * Minor improvements * Added ability to evaluate gnarly * Attempting to fix evaluation bug * bug fix * bug found on substitute * Removed unused import * Added fix to allow substitute to refer to symbols rather than symbol names * Removed unnecessary print statement * Bandaid fix for minor bug * Small fix * fix: proper detection for zero arguments * Upgraded grammar and text in alias-sampling * Only minor changes to the third tutorial * Typo fix. * Added visualisations module; needs depth parameter. * scratch notebook * Pausing work; creating issue in bartiq. * feat: visualisation improvement cleanup * feat: visualisation improvement cleanup * feat: create a method that can handle dataframe with redundant names * test: test the new method * chore: linting * chore: include pandas and plotly in dependencies * Update src/bartiq/visualisations.py Co-authored-by: Dr Brendan Reid <[email protected]> * chore: file removal and renaming from review * feat: added is_numeric method and visualization input validation check logic * test: added compiled routine is_numeric tests and input validation for visualization * chore: remove scale_to * chore: delete changes to sympy backend * chore: private function instead of classmethod * chore: reset advanced example * chore: validation checking invalid resource to plot * chore: avoid duplication of strings when calling px.treemap * test: output data frame is as expected * test: test plot output type * chore: adjust docstring and test function signatures * chore: linting * chore: linting * chore: address review comments * chore: address review comment --------- Co-authored-by: brendan reid <[email protected]> Co-authored-by: Brendan Reid <[email protected]> Co-authored-by: Dr Brendan Reid <[email protected]> * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * Removed reference to ._expr * improved typing * Modifying Basic -> Expr as generic type. * Modified fixture * improved typing * Moved expand test to be sympy specific * changed fixture scope from 'class' to 'function' * renamed as_individual_terms - > individual_terms * Renamed property; ran isort * renamed as_individual_terms -> individual_terms * typo fix * Removed fixtures from tests and restructured them * chore: update poetry.lock file for dependabot (#227) * chore: update poetry.lock file for dependabot * chore: update lock file * chore: remove h11 as transient dependency * chore: update poetry lock * refactor: made pandas and plotly optional installs (#226) * refactor: made pandas and plotly optional installs * Added checks to ensure tests do not fail unexpectedly * ran isort * Added .venv to .gitignore * Addition of pandas stubs changed behaviour of scipy stubs; quick fix * renamed visualization->interactive * updated extras flag * renamed vis->viz * chore: rename nlz to ntz (#225) * chore: rename nlz to ntz * chore: add deprecated class alias. * fix: test and linter * added plotly-stubs; may revert * Removed type: ignore * removed type: ignore; updated error message * fixing plotly-stubs install * Removed plotly-stubs entirely. * added pytest.importorskip to module * Added noqa to pass flake8 * Ran isort * isort versioning mismatch * Streamlined some aspects of the TreeMap class; removed unnecessary checks * Removing unused imports * fix: Fix typing in analysis module --------- Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]> * updated substitute function to account for symbols with assumptions on them * attempting to consolidate the typing * Added sequence of commands as a test * removing unused import * Updating typing * Implementing Konrads changes * remove trailing whitespace * added return statement * reimplementing lost changes * Implementing SympyAssumption * made it so child classes of ExpressionRewriters do not need the decorator * moved evaluation check into Assumptions _post_init_ * started assumptions tracking * quick fix for custom max problem * improved docstrings and added comments * added reapply_all_assumptions * formatting * improving properties dict * isort * formatting * began tests * updated properties dict * added tests * formatting * added comment on _add_assumption * deleted test file * fixing mypy issues * fixing mypy issues * fixing import for py3.10 * isort * minor typo fix * Added substitution methods * implemented sympy substitutions,including wildcards * modified substitute to allow arbitrary substitutions" * improvements to wildcard subs * fixed final bug in wildcard subs * added hash to assumptions * minor refactor * added decorator to override custom max * minor refactor after removing custom max * began improving tests * added classmethod to sympy_backend * added classmethod to sympy_backend * added tests for .with_sympy_max * rename Relationals -> Comparators * rename relationship->comparator * minor typo fix * re-adding assumptions after mistaken deletion * changed from using float to literal_eval * added more tests for assumptions * minor fixes * mypy fixes * docstring updates;mypy fixes;wildcard improvements * mypy fixes * improved typehinting * improved tracking of assumptions * improved tracking of assumptions * updating evaluate from main * minor fixes * gave _substitute default behaviour * streamlined dataclass interactions * deleting test file * added_named_tuple * bug fixes * change from all caps to snake case * minor refactor * started testing substitutions * moving some assumptions tests into basic tests * updated focus + substitution logic * added tests * fixing docstring inconsistencies * quick fixes from michals review * Removed classmethod; moved logic to `parse_to_sympy` * modified interpreter to override certain functions * modified rewriter backend def * removed test until we settle on impl * bug fixes, test fixes * deleted unwanted file * mypy fix * minor change * refactor * added function_overrides to sympyinterpreter * updated sympybackend with new properties * updated rewriter after changes to sympy backend * modified backend after changes to interpreter * removing unnecessary kwargs * improved docstrings * added tests for sympy_backend when using sympy max * rename assume->assumption * fix typing error * test renaming * typing fixes * refactored into dataclasses * removing tests from downstream branch * added instruction set * renaming assumption->assume * typo * another typo * renamed kwarg to assumption * fixing typing & usability * updated tests to pass * fixing imports * deleted erroneous line * added tests for history tracking * fixing mypy issues * refactored instructions * refactored assumptions as child of dummy class * modified tests after refactor * made rewriters public * made rewriters public * deleting files * exposed rewriter factory * modified how substitutions are added * minor refactor on substitutions; added factory method * improved logic on linked parameters * updated tests after refactor * added new ignore code to flake8 * remove unnecessary guards * improving docstrings * improving tests * tighting typing * added tests for linked parameters in focus * added per-file ignore code for lambdas * made wild chars stored in tuples rather than list * removed None type from original_expression * removed noqa * simplified logic after Konrads comments * minor typing typo (typ-o) * fixing typos in docstring * removed rewriter suffix from filename * added rewriter instance for routines * tightend up symbol retrieval logic * improved docstrings * fixing imports * fixing imports * clarified docstring * removed guard on sympy type * removed guard * renamed routine.py > resources.py * tidied docstring * added tests * added guard * removed Generic parent class from ResourceRewriter * fixing mypy * updating docstrings * minor factor on substitutions * updating tests * fixing attr error * fixing tests * once more * previous commit was made in err * removed testig code * michals comments * updated assumption properties derivation; improved docstrings * updated tests * updated apply_to_whole_routine and tests --------- Co-authored-by: Avin Divakara <[email protected]> Co-authored-by: antalszava <[email protected]> Co-authored-by: pqvr <[email protected]> Co-authored-by: Konrad Jałowiecki <[email protected]>
Description
Resolving the (closed) dependabot issues in one MR (which was done by regenerating the
poetry.lockfile from scratch:Please verify that you have completed the following steps