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

feat: Incremental & streaming quotes, v3.0.0 #1014

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1791086
rebase version branch (#1013)
DaveSkender Jan 28, 2023
39bf115
streaming preview: quotes, use, EMA, SMA (#824)
DaveSkender Feb 5, 2023
235115e
Merge branch 'main' into v3
DaveSkender Feb 11, 2023
36e07c8
Merge branch 'main' into v3
DaveSkender Feb 26, 2023
2509522
Merge branch 'main' into v3
DaveSkender Apr 6, 2023
520a454
Merge remote-tracking branch 'origin/main' into v3
DaveSkender Apr 8, 2023
39c8419
Merge remote-tracking branch 'origin/main' into v3
DaveSkender Apr 20, 2023
fc34f3d
fix merge conflict
DaveSkender Apr 20, 2023
38aa771
Merge branch 'main' into v3
DaveSkender Jul 1, 2023
b5a8a89
Merge branch 'main' into v3
DaveSkender Aug 31, 2023
ce2e6df
Merge branch 'main' into v3
DaveSkender Oct 12, 2023
2f5e393
Merge branch 'main' into v3
DaveSkender Nov 5, 2023
187b144
Merge branch 'main' into v3
DaveSkender Nov 11, 2023
e6bc7eb
Merge branch 'main' into v3
DaveSkender Nov 13, 2023
2fbb7e9
Merge branch 'main' into v3
DaveSkender Nov 16, 2023
472f2ef
Merge branch 'main' into v3
DaveSkender Dec 19, 2023
5ab1dfd
Merge branch 'main' into v3
DaveSkender Jan 1, 2024
e38b43b
chore: Update packages (#1139)
DaveSkender Jan 3, 2024
ad39bc9
fix: Merge `main` into `v3` (#1142)
DaveSkender Jan 3, 2024
5d7714b
Merge branch 'main' into v3
DaveSkender Jan 3, 2024
41f314f
remove duplicate reference
DaveSkender Jan 3, 2024
92d50d6
Merge branch 'main' into v3
DaveSkender Jan 3, 2024
0faa3f4
fix Sln file references
DaveSkender Jan 3, 2024
852d57a
Merge branch 'main' into v3
DaveSkender Jan 4, 2024
2e5ffa3
Merge branch 'main' into v3
DaveSkender Jan 28, 2024
0b57cb5
Merge branch 'main' into v3
DaveSkender Jan 28, 2024
90af694
Merge branch 'main' into v3
DaveSkender Jan 29, 2024
8c18cf1
Merge branch 'main' into v3
DaveSkender Mar 2, 2024
d99f14d
Merge branch 'main' into v3
DaveSkender Mar 5, 2024
ab62ddc
Merge branch 'main' into v3
DaveSkender Mar 17, 2024
49f5eb3
fix: Accommodate base merge changes (#1177)
DaveSkender Mar 17, 2024
6dc2e68
Merge branch 'main' into v3
DaveSkender Mar 17, 2024
1c758cb
Merge branch 'main' into v3
DaveSkender Mar 24, 2024
92ed407
Merge branch 'main' into v3
DaveSkender Apr 1, 2024
7a13100
Merge branch 'main' into v3
DaveSkender Jul 1, 2024
d970690
Merge branch 'main' into v3
DaveSkender Jul 5, 2024
c95bc92
Merge branch 'main' into v3
DaveSkender Jul 6, 2024
807f1fe
Merge branch 'main' into v3
DaveSkender Jul 16, 2024
1aae1a9
Merge branch 'main' into v3
DaveSkender Jul 28, 2024
259e5cc
Merge branch 'main' into v3
DaveSkender Jul 30, 2024
8599be6
Merge branch 'main' into v3
DaveSkender Aug 12, 2024
56174ac
Merge branch 'main' into v3
DaveSkender Oct 6, 2024
eeb02bc
Merge branch 'main' into v3
DaveSkender Oct 27, 2024
0605107
feat: Full chain streaming prototypes (#1092)
DaveSkender Oct 27, 2024
070a00e
test: Isolate integration, external tests (#1156)
DaveSkender Nov 3, 2024
9b48884
Merge branch 'main' into v3
DaveSkender Nov 3, 2024
c676ed9
docs: Add inline comments, remove `info.xml` (#1155)
DaveSkender Nov 11, 2024
a034f48
Merge branch 'main' into v3
DaveSkender Nov 11, 2024
3d7bbf6
feat: Buffer-style ADX incremental (#1271)
DaveSkender Nov 11, 2024
75b9e9c
Merge branch 'main' into v3
DaveSkender Nov 16, 2024
9833468
ci: Add .NET 9 build actions (#1275)
DaveSkender Nov 16, 2024
5cf7165
Merge branch 'main' into v3
DaveSkender Nov 27, 2024
b86593b
Merge branch 'main' into v3
DaveSkender Nov 29, 2024
9baa3ad
Merge branch 'main' into v3
DaveSkender Nov 29, 2024
204e959
refactor: Naming standardization (#1273)
DaveSkender Dec 1, 2024
55e521b
minor update to ADL docs
DaveSkender Dec 1, 2024
cf91af3
Merge branch 'main' into v3
DaveSkender Dec 12, 2024
630bcdf
feat: Max cache size for StreamHub (#1290)
DaveSkender Dec 16, 2024
5570134
Merge branch 'main' into v3
DaveSkender Dec 16, 2024
ab01d67
feat: ToStringOut() for series (#1150)
DaveSkender Dec 24, 2024
b326fc5
ci: Update build triggers (#1295)
DaveSkender Dec 24, 2024
4ac871f
Merge branch 'main' into v3
DaveSkender Dec 24, 2024
e8e6431
Merge branch 'main' into v3
DaveSkender Dec 26, 2024
f506613
Merge branch 'main' into v3
DaveSkender Dec 26, 2024
cb44c92
Merge branch 'main' into v3
DaveSkender Dec 26, 2024
6beff99
Merge branch 'main' into v3
DaveSkender Dec 26, 2024
98ef321
Merge branch 'main' of https://github.com/DaveSkender/Stock.Indicator…
DaveSkender Jan 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
99 changes: 68 additions & 31 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,34 +1,67 @@
# top-most EditorConfig file
# EditorConfig: https://EditorConfig.org

# Top-level EditorConfig file
root = true

#### Core EditorConfig Options ####

# Global settings for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
indent_size = 2
tab_width = 2

line_length = 150
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150

# .NET Globals
[*.cs]
#### File Type Overrides ####

# Markdown files
[*.md]

# Allow trailing whitespace for line breaks
trim_trailing_whitespace = false

# Batch and command files
[*.{cmd,bat}]

# Use CRLF for Windows specific files
end_of_line = crlf

# .NET source files
[*.{cs,vb}]

# set indentation to 4 spaces
indent_size = 4
tab_width = 4

#### .NET Coding Conventions ####
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/

# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
# File headers are disabled
file_header_template = unset

# Organize 'using' directives
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

# Simplify type names and remove unnecessary qualifiers
dotnet_diagnostic.IDE0001.severity = warning # Simplify type names
dotnet_style_qualification_for_field = false:warning # Prefer 'field' over 'this.field'
dotnet_style_qualification_for_property = false:warning # Prefer 'property' over 'this.property'
dotnet_style_qualification_for_method = false:warning # Prefer 'method()' over 'this.method()'
dotnet_style_qualification_for_event = false:warning # Prefer 'event' over 'this.event'

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning # Require modifiers except for interface members

# Ensure space around colon in named arguments
dotnet_style_space_around_colon_in_named_argument = true:suggestion
dotnet_diagnostic.IDE0040.severity = suggestion

# Expression-level preferences
dotnet_style_coalesce_expression = true:suggestion
Expand All @@ -38,19 +71,21 @@ dotnet_style_namespace_match_folder = false:none
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_simplified_interpolation = true
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion # Prefer 'int' over 'Int32'

# Collection expression preferences
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_diagnostic.IDE0305.severity = none # exclude collection expression for fluent
dotnet_diagnostic.IDE0305.severity = none # Exclude collection expression for fluent APIs

csharp_space_between_square_brackets = false
csharp_space_between_empty_square_brackets = false

Expand Down Expand Up @@ -87,13 +122,21 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_code_quality_explicit_tuple_names = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion

# Diagnostic analyzer suppressions
dotnet_diagnostic.IDE0058.severity = none # Unused expression value, use _ discard variable

# remove this when no-longer supporting pre-9.0 frameworks
dotnet_diagnostic.IDE0330.severity = none # Prefer 'System.Threading.Lock'

#### C# Coding Conventions ####
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options

[*.cs]

# var preferences
csharp_style_var_elsewhere = false
csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = false
csharp_style_var_elsewhere = false # Do not prefer 'var' elsewhere
csharp_style_var_for_built_in_types = false # Do not prefer 'var' for built-in types
csharp_style_var_when_type_is_apparent = false # Do not prefer 'var' when type is apparent

# Labeling and using directives
csharp_indent_labels = one_less_than_current
Expand All @@ -106,8 +149,9 @@ csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion

# Expression-bodied Members
# Expression-bodied members
csharp_style_expression_bodied_methods = true:silent
csharp_style_expression_bodied_operators = true:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
Expand Down Expand Up @@ -146,10 +190,3 @@ csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_between_query_expression_clauses = false

# Diagnostic analyzer suppressions
dotnet_diagnostic.CA1303.severity = none # Passing literals as localized parameters
dotnet_diagnostic.CA2263.severity = none # Prefer generic overload type parameter
dotnet_diagnostic.CS1591.severity = silent # Missing XML comment for publicly visible type or member
dotnet_diagnostic.IDE0058.severity = none # Unused expression value
dotnet_diagnostic.IDE0072.severity = silent # Missing cases in switch statement
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
render: csharp
placeholder: |
// example (put your own code here)
IEnumerable<EmaResult> results = quotes.GetEma(14);
IReadOnlyList<EmaResult> results = quotes.GetEma(14);
validations:
required: false
- type: textarea
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
dotnet-version: "9.x"
dotnet-quality: "ga"

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
dotnet-quality: "ga"

- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: ["*"]
paths:
- docs/examples/**
- ".github/workflows/test-examples.yml"
- .github/workflows/test-examples.yml

jobs:
build:
Expand Down
26 changes: 7 additions & 19 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,30 @@
-warnAsError

- name: Test indicators
env:
ALPACA_KEY: ${{ secrets.ALPACA_KEY }}
ALPACA_SECRET: ${{ secrets.ALPACA_SECRET }}
run: >
dotnet test tests/indicators/Tests.Indicators.csproj
dotnet test
--configuration Release
--settings tests/tests.unit.runsettings
--results-directory ./test-results
--property:TestFramework="${{ env.TARGET_FRAMEWORK }}"
--no-build
--verbosity normal
--logger trx
--collect:"XPlat Code Coverage"
--results-directory ./test-indicators

# the remaining steps are only needed from one primary instance

- name: Test other items
if: env.IS_PRIMARY == 'true'
run: >
dotnet test tests/other/Tests.Other.csproj
--configuration Release
--no-build
--verbosity normal
--logger trx
--results-directory ./test-other

- name: Post test results
uses: dorny/[email protected]
- name: Post test summary
uses: dorny/test-reporter@v1
Dismissed Show dismissed Hide dismissed
if: env.IS_PRIMARY == 'true' && always()
with:
name: Test results
path: ./test-indicators/**/*.trx
path: ./test-results/**/*.trx
reporter: dotnet-trx

- name: Publish coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
if: env.IS_PRIMARY == 'true'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./test-indicators/**/coverage.cobertura.xml
coverage-reports: ./test-results/**/coverage.cobertura.xml
58 changes: 58 additions & 0 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Indicators

on:
push:
branches: ["main"]

pull_request:
branches: ["*"]

jobs:
test:
name: integration tests
runs-on: ubuntu-latest

permissions:
contents: read
actions: read
checks: write

steps:

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

- name: Setup .NET
id: dotnet-new
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
dotnet-quality: "ga"

- name: Build library
run: >
dotnet build
--configuration Release
--property:ContinuousIntegrationBuild=true
-warnAsError

- name: Test integrations
env:
ALPACA_KEY: ${{ secrets.ALPACA_KEY }}
ALPACA_SECRET: ${{ secrets.ALPACA_SECRET }}
run: >
dotnet test
--configuration Release
--settings tests/tests.integration.runsettings
--results-directory ./test-results
--no-build
--verbosity normal
--logger trx

- name: Post test summary
uses: dorny/test-reporter@v1
Dismissed Show dismissed Hide dismissed
if: always()
with:
name: Test results
path: ./test-results/**/*.trx
reporter: dotnet-trx
21 changes: 19 additions & 2 deletions .github/workflows/test-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,29 @@ jobs:
--configuration Release
--property:ContinuousIntegrationBuild=true

- name: Benchmark indicators
- name: Test performance
working-directory: tests/performance
run: dotnet run -c Release

- name: Save test results
uses: actions/upload-artifact@v4
with:
name: test-summaries
path: tests/performance/BenchmarkDotNet.Artifacts/results

- name: Publish summary
working-directory: tests/performance/BenchmarkDotNet.Artifacts/results
run: |
echo "### Package version ${{ steps.gitversion.outputs.fullSemVer }}" >> $GITHUB_STEP_SUMMARY
cat Tests.Performance.IndicatorPerformance-report-github.md >> $GITHUB_STEP_SUMMARY

echo "## Series indicators" >> $GITHUB_STEP_SUMMARY
cat Performance.SeriesIndicators-report-github.md >> $GITHUB_STEP_SUMMARY

echo "## Stream indicators (with Quote caching)" >> $GITHUB_STEP_SUMMARY
cat Performance.StreamIndicators-report-github.md >> $GITHUB_STEP_SUMMARY

echo "## Incrementing buffer-style indicators" >> $GITHUB_STEP_SUMMARY
cat Performance.BufferLists-report-github.md >> $GITHUB_STEP_SUMMARY

echo "## Utilities" >> $GITHUB_STEP_SUMMARY
cat Performance.Utility-report-github.md >> $GITHUB_STEP_SUMMARY
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ $tf/
# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
# ReSharper IDE extension
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
*.DotSettings

# JustCode is a .NET coding add-in
# JustCode IDE extension
.JustCode

# TeamCity is a build add-in
Expand Down
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"codacy-app.codacy",
"adrianwilczynski.user-secrets",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mechatroner.rainbow-csv",
"dotjoshjohnson.xml",
"redhat.vscode-yaml",
"vunguyentuan.vscode-css-variables"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// file settings
"files.autoSave": "afterDelay",
"files.autoSave": "off",
"files.autoSaveDelay": 3000,
"files.encoding": "utf8",
"files.exclude": {
Expand Down
Loading
Loading