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 51 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 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
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
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,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 @@ -148,8 +149,7 @@ 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
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'
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Normalize line endings.
* text=lf
* text=auto eol=lf
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
23 changes: 8 additions & 15 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
with:
fetch-depth: 0

- 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 All @@ -51,21 +57,8 @@ jobs:
- name: Compose version
id: compose
run: |
ver=${{ steps.gitversion.outputs.majorMinorPatch }}${{ inputs.preview && '-preview.' || '' }}${{ inputs.preview && steps.gitversion.outputs.preReleaseNumber || inputs.preview && github.run_number || '' }}
echo "version=$ver" >> "$GITHUB_OUTPUT"

- name: Update release notes URL
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "<PackageReleaseNotes>https://github.com/DaveSkender/Stock.Indicators/releases</PackageReleaseNotes>"
replace: "<PackageReleaseNotes>https://github.com/DaveSkender/Stock.Indicators/releases/tag/${{ steps.compose.outputs.version }}</PackageReleaseNotes>"
regex: false

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
dotnet-quality: "ga"
composed_version=${{ steps.gitversion.outputs.majorMinorPatch }}${{ inputs.preview && '-preview.' || '' }}${{ inputs.preview && steps.gitversion.outputs.preReleaseNumber || inputs.preview && github.run_number || '' }}
echo "version=$composed_version" >> "$GITHUB_OUTPUT"

- name: Build library
run: >
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Examples

on:
push:
branches: ["main"]
branches: ["main","v3"]
paths:
- docs/examples/**

pull_request:
branches: ["main"]
branches: ["main","v3"]
paths:
- docs/examples/**
- ".github/workflows/test-examples.yml"
Expand Down
39 changes: 10 additions & 29 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Indicators

on:
push:
branches: ["main"]
branches: ["main","v3"]

pull_request:
types: [opened, synchronize, reopened]
Expand All @@ -21,16 +21,17 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
dotnet-version: ["9.x"]
# TODO: restore when runners have 9.x on all
# TODO: restore when GitHub Action runners
# have .NET 9.x SDK default installed
# ["2.1.x", "6.x", "9.x"]

env:

# identifying primary configuration so only one reports coverage
IS_PRIMARY: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '9.x' }}

# .NET SDK versions in the matrix that support `ga` quality spec
# versions before 5.x do not support it
# .NET SDK versions in the matrix that support
# `dotnet-quality: 'ga'`, not supported before 5.x
SUPPORT_GA: ${{ contains(fromJson('["6.x", "9.x"]'), matrix.dotnet-version) }}

steps:
Expand All @@ -39,19 +40,11 @@ jobs:
uses: actions/checkout@v4

- name: Setup .NET
id: dotnet-new
uses: actions/setup-dotnet@v4
if: env.SUPPORT_GA == 'true'
with:
dotnet-version: ${{ matrix.dotnet-version }}
dotnet-quality: "ga"

- name: Setup .NET (older)
uses: actions/setup-dotnet@v4
if: env.SUPPORT_GA == 'false'
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Build library
run: >
dotnet build
Expand All @@ -60,41 +53,29 @@ jobs:
-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
--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 summary
uses: dorny/test-reporter@v1
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","v3"]

pull_request:
types: [opened, synchronize, reopened]

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
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
4 changes: 3 additions & 1 deletion .github/workflows/test-website-a11y.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Website

on:
push:
branches: ["v3"]
pull_request:
branches: [main]
branches: ["main"]
paths:
- 'docs/**'
- ".github/workflows/test-website-a11y.yml"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-website-links.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Website

on:
push:
branches: ["v3"]
pull_request:
branches: [main]
branches: ["main"]
paths:
- 'docs/**'
- ".github/workflows/test-website-links.yml"
Expand Down
13 changes: 7 additions & 6 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 Expand Up @@ -218,7 +219,7 @@ ClientBin/
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

Expand Down Expand Up @@ -314,7 +315,7 @@ __pycache__/
# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
Expand All @@ -323,11 +324,11 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Jekyll site
_site/

# zip artifacts
.DS_Store
.DS_Store
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"
]
}
Loading