Skip to content
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

Significant refactoring to dedicated trends subpakcage #86

Merged
merged 13 commits into from
Nov 11, 2023
Merged

Significant refactoring to dedicated trends subpakcage #86

merged 13 commits into from
Nov 11, 2023

Conversation

maread99
Copy link
Owner

Functionality unchanged. Usage through Analysis unchanged. Locations of classes related to trends have changed, with all these classes now maintained within a dedicated subpackage (although redirects should maintain legacy paths to the principle classes).

Refactoring undertaken with the intention of providing a better foundation off which to create other analyses over OHLC charts. The abstract common functionality is referred to as 'case' and 'cases' (a trend Movement is an concrete version of an analysis case).

New functionality eases the adding and management of marks over a OHLC chart.

Refactoring within the new trends subpackage has moved classes related to each of movements, charts and guis out of from trends.py and trends_alt.py and to dedicated modules. The Trends and TrendsAlt classes have in turn been consolidated to the analy module.

Refactors functionality to add and remove extra marks to a chart. Moved
from `charts.OHLCTrends` to `charts.Base`.
Refactors to a base `CaseControls` class those controls of
`TrendControls` that can be used for any analysis that outputs
sequential cases (be those outputs trends, positions,, etc...).
Refactors from `OHLCTrends` to `OHLCCaseBase` base functionality to
overlay an OHLC chart with marks representing multi event analysis.
Provides for subclasses of `guis.BasePrice` to directly
`set_initial_prices` so that subclass can get access to charted data.
On `guis` module, refactors out of `TrendsGuiBase`, to
`ChartOHLCCaseBase`, common functionality to create a gui that provides
for selecting and navigating between cases of multi event analysis,
where those cases are displayed on a chart with base
`charts.OHLCCaseBase`.
Refactoring and renaming to provide a clearner base off which to
develop analyses that can be displayed over OHLC charts.

Adds `cases` module.
Moves code specific to trends analysis to dedicated `trends`
submodule (maintains access via legacy endpoints).
Refactors classes on `analy` and `analy_alt` out to `movements` and
`guis` modules. Consolidates the Trend classes that remain to
`analy` module, as `Trends` and `TrendAlt`. Removes `analy_alt`.
Moves code to handle selection of a specific trend case
from Movement classes to Chart classes.
Renames from 'Chart*' to 'Gui*'.
Refactors update_trend_mark funcationality from `trends` subpackage to
`charts.OHLCCaseBase`.
Makes members of `charts.Groups` enum abstract concepts and extends functionality
of `charts.OHLCCaseBase` based on those concepts.

Also refactors back from `trends` subpackage to `charts.OHLCCaseBase`
functionality to dampen underlying OHLC mark via extending
`_create_mark`.
@maread99 maread99 added the code improvement Efficiency improvement, efficacy unchanged (refactoring, speed improvements etc) label Nov 11, 2023
@maread99 maread99 merged commit b103e90 into main Nov 11, 2023
7 checks passed
@maread99 maread99 deleted the dev branch November 11, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code improvement Efficiency improvement, efficacy unchanged (refactoring, speed improvements etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant