-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI * remove old output * fix some (but not all) licenses * fix fmt * cleanup * fmt * disable bench * fix all licenses * rustfmt config
- Loading branch information
Showing
53 changed files
with
197 additions
and
6,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
POLYGON_API_KEY= | ||
FINANCIALMODELINGPREP_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for more information: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
name: CI | ||
|
||
on: | ||
|
@@ -18,6 +22,8 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-24.11 | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
connect-timeout = 60 | ||
stalled-download-timeout = 300 | ||
- uses: cachix/cachix-action@v13 | ||
with: | ||
|
@@ -27,8 +33,8 @@ jobs: | |
- name: Run unit tests with coverage | ||
run: | | ||
nix \ | ||
--extra-experimental-features "nix-command flakes" \ | ||
develop \ | ||
--extra-experimental-features "nix-command flakes" \ | ||
develop \ | ||
--command bash -c "cargo install cargo-tarpaulin && cargo tarpaulin --out lcov --output-dir coverage" | ||
- name: Upload coverage to Codecov | ||
|
@@ -40,10 +46,24 @@ jobs: | |
|
||
- name: Run unit tests | ||
run: | | ||
nix \ | ||
--extra-experimental-features "nix-command flakes" \ | ||
develop \ | ||
--command bash -c "cargo test" | ||
# Retry logic for nix develop | ||
max_attempts=3 | ||
attempt=1 | ||
while [ $attempt -le $max_attempts ]; do | ||
if nix \ | ||
--extra-experimental-features "nix-command flakes" \ | ||
develop \ | ||
--command bash -c "cargo test"; then | ||
break | ||
fi | ||
echo "Attempt $attempt failed. Waiting before retry..." | ||
sleep 30 | ||
attempt=$((attempt + 1)) | ||
done | ||
if [ $attempt -gt $max_attempts ]; then | ||
echo "All attempts failed" | ||
exit 1 | ||
fi | ||
check: | ||
name: 'Static Analysis: cargo check' | ||
|
@@ -59,6 +79,8 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-24.11 | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
connect-timeout = 60 | ||
stalled-download-timeout = 300 | ||
- uses: cachix/cachix-action@v13 | ||
with: | ||
|
@@ -177,6 +199,8 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-24.11 | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
connect-timeout = 60 | ||
stalled-download-timeout = 300 | ||
- uses: cachix/cachix-action@v13 | ||
with: | ||
|
@@ -190,48 +214,48 @@ jobs: | |
develop \ | ||
--command bash -c "reuse lint" | ||
benchmark: | ||
name: Benchmark | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run cargo bench | ||
# note that we explictly have to mention which benches to run, because | ||
# otherwise | ||
run: | ||
cargo +nightly bench | ||
--bench shuffle | ||
--bench encrypt | ||
-- --output-format bencher | tee output.txt | ||
|
||
- name: Download previous benchmark data | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./cache | ||
key: cargo-bench | ||
|
||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: cargo-bench | ||
tool: 'cargo' | ||
output-file-path: ./output.txt | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
external-data-json-path: ./cache/benchmark-data.json | ||
alert-threshold: '150%' | ||
comment-on-alert: true | ||
fail-on-alert: false | ||
# benchmark: | ||
# name: Benchmark | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Install stable toolchain | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# profile: minimal | ||
# toolchain: nightly | ||
# override: true | ||
|
||
# - uses: Swatinem/rust-cache@v2 | ||
|
||
# - name: Run cargo bench | ||
# # note that we explictly have to mention which benches to run, because | ||
# # otherwise | ||
# run: | ||
# cargo +nightly bench | ||
# --bench shuffle | ||
# --bench encrypt | ||
# -- --output-format bencher | tee output.txt | ||
|
||
# - name: Download previous benchmark data | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: ./cache | ||
# key: cargo-bench | ||
|
||
# - name: Store benchmark result | ||
# uses: benchmark-action/github-action-benchmark@v1 | ||
# with: | ||
# name: cargo-bench | ||
# tool: 'cargo' | ||
# output-file-path: ./output.txt | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# external-data-json-path: ./cache/benchmark-data.json | ||
# alert-threshold: '150%' | ||
# comment-on-alert: true | ||
# fail-on-alert: false | ||
|
||
nix_flake_info: | ||
name: Register Nix Flake Information | ||
|
@@ -247,6 +271,8 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-24.11 | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
connect-timeout = 60 | ||
stalled-download-timeout = 300 | ||
- uses: cachix/cachix-action@v13 | ||
with: | ||
|
@@ -285,6 +311,8 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-24.11 | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
connect-timeout = 60 | ||
stalled-download-timeout = 300 | ||
- uses: cachix/cachix-action@v13 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
name: Daily Data Collection | ||
|
||
on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
|
@@ -27,3 +31,6 @@ tmp/ | |
.direnv/ | ||
.direnv | ||
.direnv/* | ||
|
||
output/* | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-only |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
[package] | ||
name = "top200-rs" | ||
version = "0.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
SPDX-License-Identifier: AGPL-3.0-only | ||
--> | ||
|
||
[![CI](https://github.com/javdl/top200-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/javdl/top200-rs/actions/workflows/ci.yml)[![Daily Data Collection](https://github.com/javdl/top200-rs/actions/workflows/daily-run.yml/badge.svg)](https://github.com/javdl/top200-rs/actions/workflows/daily-run.yml) | ||
|
||
# top200-rs | ||
|
@@ -8,8 +14,13 @@ | |
|
||
## License | ||
|
||
To set license and copyright information, run: | ||
|
||
```sh | ||
reuse annotate --copyright="Joost van der Laan <[email protected]>" --license="AGPL-3.0-only" --skip-unrecognised src/* | ||
reuse annotate --copyright="Joost van der Laan <[email protected]>" --license="AGPL-3.0-only" --skip-unrecognised * | ||
|
||
# or to check if all files are annotated correctly | ||
reuse lint | ||
``` | ||
|
||
## Changelog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
# Codecov repository config file | ||
# https://docs.codecov.com/docs/codecov-yaml#repository-yaml | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
non_us_tickers = [ | ||
"MC.PA", # LVMH | ||
"ITX.MC", # Inditex | ||
|
Oops, something went wrong.