Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0a376a9
update dev container
DaveSkender Jan 2, 2025
fcab0c4
fix: editor config and git attributes
DaveSkender Jan 2, 2025
eac4ec0
code cleanup with settings
DaveSkender Jan 2, 2025
a3f6d09
simplify settings and setup
DaveSkender Jan 2, 2025
afff24a
add benchmark test marker and rename test quote defs
DaveSkender Jan 2, 2025
ca887bd
update test and lint settings
DaveSkender Jan 2, 2025
50939f6
separate localization and coverage test jobs
DaveSkender Jan 2, 2025
1928255
refactor GitHub Actions workflows, fix localation
DaveSkender Jan 2, 2025
e4a6fe6
update localization tests
DaveSkender Jan 2, 2025
9e26bdd
update docs website actions
DaveSkender Jan 2, 2025
d205047
temp remove macOS, locales from test runner
DaveSkender Jan 2, 2025
4490693
update doc site packages
DaveSkender Jan 2, 2025
e339d8a
update a11y test config
DaveSkender Jan 2, 2025
4a92a87
tweak Linux locale setup
DaveSkender Jan 2, 2025
9fe9ffd
update markdown rules
DaveSkender Jan 2, 2025
b5d7f3e
allow workflows to be manual
DaveSkender Jan 2, 2025
7a6430d
improve locale setup error handline
DaveSkender Jan 2, 2025
29fc65b
simplify locale test runner (temp)
DaveSkender Jan 2, 2025
e3b3739
add `act` GitHub Actions emulator
DaveSkender Jan 2, 2025
c652625
setup local GH Action runner (partially)
DaveSkender Jan 3, 2025
71f4906
Update config and workflow formatting
DaveSkender Jan 3, 2025
2cdb930
Merge branch 'main' into update-dev-container
DaveSkender May 27, 2025
0104c9e
update dotnet in dev container
DaveSkender May 27, 2025
be40d0b
code cleanup
DaveSkender May 27, 2025
d43bdad
simpler extensions
DaveSkender May 27, 2025
e8abb5b
update docs
DaveSkender May 27, 2025
82cb22c
Merge branch 'main' into update-dev-container
DaveSkender May 27, 2025
8022c8d
fix typo in tasks.json
DaveSkender May 27, 2025
10c13ab
fix: launch, tasks configurations
DaveSkender May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 70 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,73 @@
/* CONTAINER for Python Development
* references:
* » https://containers.dev/implementors/json_reference
* » https://github.com/devcontainers/features/tree/main/src
* » https://code.visualstudio.com/docs/remote/containers
* » https://github.com/devcontainers/images/blob/main/src/python
*
* » F1 > Dev Containers: Rebuild Container
*/
{
"name": "Python Dev Container",
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.9",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"name": "Stock Indicators for Python",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"forwardPorts": [],
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided"
},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "lts"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts",
"pnpmVersion": "none",
"nvmVersion": "none"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/azure-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/ruby:1": {
"version": "3.3"
},
"ghcr.io/devcontainers-extra/features/isort:2": {
"version": "latest"
},
"ghcr.io/devcontainers-extra/features/pylint:2": {
"version": "latest"
}
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.flake8",
"ms-python.black-formatter",
"ms-python.isort",
"ms-toolsai.jupyter",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"github.copilot",
"ms-vscode-remote.remote-containers"
],
"postCreateCommand": "pip install -r requirements.txt -r requirements-test.txt",
"workspaceFolder": "/workspace",
"tasks": {
"build": "pip install -r requirements.txt && pip install -r requirements-test.txt",
"test": "pytest -vr A tests -m \"not locale_specific\""
}
// Use 'settings' to set *default* container specific settings.json
// values on container create.
"customizations": {
"vscode": {
// container overrides only
// otherwise use .vscode/settings.json
"settings": {
"pylint.importStrategy": "fromEnvironment",
"python.defaultInterpreterPath": "/usr/local/bin/python"
},
// required extensions
// for recommended, see .vscode/extensions.json
"extensions": [
"donjayamanne.python-extension-pack",
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"ms-python.black-formatter",
"ms-python.debugpy",
"ms-python.isort",
"ms-python.python",
"ms-python.pylint",
"ms-python.vscode-pylance"
]
}
},
// Runs after the container is created
"postCreateCommand": "chmod +x .devcontainer/setup.sh && .devcontainer/setup.sh",
// Runs every time the container starts
"postStartCommand": "echo 'Container started'"
}
10 changes: 10 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# install or upgrade pip
python -m ensurepip --upgrade

# install core dependencies
pip install -r requirements.txt

# install test dependencies
pip install -r requirements-test.txt
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ dmypy.json

# personal editor configs
.vs
.vscode

# Jekyll site
_site/
Expand Down
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"donjayamanne.python-extension-pack",
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"ms-python.black-formatter",
"ms-python.debugpy",
"ms-python.isort",
"ms-python.python",
"ms-python.pylint",
"ms-python.vscode-pylance"
]
}
38 changes: 38 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}"
},
{
"name": "Python: Run Tests",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"console": "integratedTerminal",
"args": ["-svr", "A"],
"cwd": "${workspaceFolder}"
},
{
"name": "Python: Debug Current Test File",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"console": "integratedTerminal",
"args": ["-svr", "A", "${file}"],
"cwd": "${workspaceFolder}"
}
],
"inputs": [
{
"type": "promptString",
"id": "programPath",
"description": "Path to the Python file you want to debug"
}
]
}
34 changes: 34 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"isort.args": [
"--profile",
"black"
],
"isort.check": true,
"isort.importStrategy": "fromEnvironment", // default: "useBundled"
"markdownlint.config": {
"default": true, // Enable all default rules
"MD013": false, // Disable line length checking entirely
"MD025": false, // Allow multiple top level headers in the same document
"MD033": { // Allow specific HTML elements
"allowed_elements": [
"details",
"summary",
"h1" // we use h1 as a Jekyll-y page title
]
},
"MD041": false // Allow content before first heading
},
"pylint.importStrategy": "fromEnvironment", // default: "useBundled"
"python.testing.pytestArgs": [
"tests"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
"files.trimTrailingWhitespace": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
47 changes: 47 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "pip install -r requirements.txt && pip install -r requirements-test.txt",
"group": "build",
"problemMatcher": []
},
{
"label": "Test: Unit (default)",
"type": "shell",
"command": "pytest -vr A",
"group": "test",
"problemMatcher": []
},
{
"label": "Test: Performance",
"type": "shell",
"command": "pytest -m performance",
"group": "none",
"problemMatcher": []
},
{
"label": "Test: Localization",
"type": "shell",
"command": "pytest -m localization -vr A",
"group": "none",
"problemMatcher": []
},
{
"label": "Test: All",
"type": "shell",
"command": "pytest -m \"\"",
"group": "none",
"problemMatcher": []
},
{
"label": "Test: Coverage",
"type": "shell",
"command": "pytest --cov=stock_indicators --cov-report=term-missing",
"group": "none",
"problemMatcher": []
}
]
}
30 changes: 15 additions & 15 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (8.0.1)
activesupport (8.0.2)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -26,13 +26,13 @@ GEM
colorator (1.1.0)
commonmarker (0.23.11)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
connection_pool (2.5.3)
cssminify2 (2.0.1)
csv (3.3.2)
csv (3.3.4)
dnsruby (1.72.3)
base64 (~> 0.2.0)
simpleidn (~> 0.2.1)
drb (2.2.1)
drb (2.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
Expand All @@ -41,13 +41,13 @@ GEM
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
execjs (2.10.0)
faraday (2.12.2)
faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.17.1)
ffi (1.17.2)
forwardable-extended (2.6.0)
gemoji (4.1.0)
github-pages (232)
Expand Down Expand Up @@ -227,7 +227,7 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
json (2.9.1)
json (2.12.2)
json-minify (0.0.3)
json (> 0)
kramdown (2.4.0)
Expand All @@ -238,22 +238,22 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.5)
logger (1.7.0)
mercenary (0.3.6)
mini_portile2 (2.8.8)
mini_portile2 (2.8.9)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.25.4)
minitest (5.25.5)
net-http (0.6.0)
uri
nokogiri (1.18.2)
nokogiri (1.18.8)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.2-x64-mingw-ucrt)
nokogiri (1.18.8-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.18.2-x86_64-linux-gnu)
nokogiri (1.18.8-x86_64-linux-gnu)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
Expand All @@ -265,7 +265,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.4.0)
rexml (3.4.1)
rouge (3.30.0)
rubyzip (2.4.1)
safe_yaml (1.0.5)
Expand All @@ -288,7 +288,7 @@ GEM
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.8.0)
uri (1.0.2)
uri (1.0.3)
wdm (0.2.0)
webrick (1.9.1)

Expand Down
21 changes: 15 additions & 6 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,21 @@ For new features, submit an issue with the `enhancement` label.
- Work items are primarily [entered as Notes](https://docs.github.com/issues/organizing-your-work-with-project-boards/tracking-work-with-project-boards/adding-notes-to-a-project-board) (not Issues), except where an issue or feature is user reported. With that said, Notes can be converted to Issues if in-progress and collaborative discussion is needed.
- Use the [Discussions](https://github.com/DaveSkender/Stock.Indicators/discussions) area for general ideation and unrelated questions.

## Developing
## Development Environment (Quick Setup)

- Read this first: [A Step by Step Guide to Making Your First GitHub Contribution](https://codeburst.io/a-step-by-step-guide-to-making-your-first-github-contribution-5302260a2940). I also have a discussion [on Forking](https://github.com/DaveSkender/Stock.Indicators/discussions/503) if you have questions.
- If you are adding a new indicator, the easiest way to do this is to copy the folder of an existing indicator and rename everything using the same naming conventions and taxonomy. All new indicators should include unit and performance tests.
- Do not commingle multiple contributions. Please keep changes small and separate.
- If you're just getting started, [install and setup](https://python.stockindicators.dev/guide/#installation-and-setup) language SDKs for Python and .NET.
- Recommended tools: Git, Node.js, npm, Docker, Python, Docker Desktop, Visual Studio Code (see `.vscode/extensions.json` for recommended extensions).
- This project supports [VS Code Dev Containers](https://code.visualstudio.com/docs/remote/containers) for a consistent development environment. Open the project in VS Code and select "Reopen in Container" (requires the Remote - Containers extension).
- You can test GitHub Actions workflows locally using [`act`](https://github.com/nektos/act), which is preinstalled in the devcontainer. Example: `act -l` to list workflows, `act` to run all workflows.

For more details, see the [official documentation](https://github.com/nektos/act#readme) and the project README.

---

### New to contributing?

- Read this first: [A Step by Step Guide to Making Your First GitHub Contribution](https://codeburst.io/a-step-by-step-guide-to-making-your-first-github-contribution-5302260a2940). If you have questions about forking, see [this discussion](https://github.com/DaveSkender/Stock.Indicators/discussions/503).
- Please keep contributions small and focused—avoid combining unrelated changes in one pull request.
- If you're just getting started, make sure to install and set up the language SDKs for Python and .NET (see below for setup instructions).

## Development Environment Setup

Expand Down Expand Up @@ -107,7 +116,7 @@ For new features, submit an issue with the `enhancement` label.
# install core dependencies
pip install -r requirements.txt

# install test dependencies
# install dependencies
pip install -r requirements-test.txt

# run standard unit tests
Expand Down