hoox-pyne 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hoox_pyne-0.3.0/.dockerignore +108 -0
- hoox_pyne-0.3.0/.editorconfig +21 -0
- hoox_pyne-0.3.0/.env.example +50 -0
- hoox_pyne-0.3.0/.flake8 +4 -0
- hoox_pyne-0.3.0/.gitattributes +1 -0
- hoox_pyne-0.3.0/.gitignore +157 -0
- hoox_pyne-0.3.0/.readthedocs.yml +12 -0
- hoox_pyne-0.3.0/AGENTS.md +335 -0
- hoox_pyne-0.3.0/CHANGELOG.md +97 -0
- hoox_pyne-0.3.0/CODE_OF_CONDUCT.md +75 -0
- hoox_pyne-0.3.0/COMPATIBILITY.md +449 -0
- hoox_pyne-0.3.0/CONTRIBUTING.md +106 -0
- hoox_pyne-0.3.0/DESIGN.md +409 -0
- hoox_pyne-0.3.0/Dockerfile +216 -0
- hoox_pyne-0.3.0/LICENSE +661 -0
- hoox_pyne-0.3.0/MARKETING.md +325 -0
- hoox_pyne-0.3.0/Makefile +210 -0
- hoox_pyne-0.3.0/NOTICE +25 -0
- hoox_pyne-0.3.0/PKG-INFO +436 -0
- hoox_pyne-0.3.0/README.md +377 -0
- hoox_pyne-0.3.0/SECURITY.md +25 -0
- hoox_pyne-0.3.0/backend/__init__.py +0 -0
- hoox_pyne-0.3.0/backend/alert_forwarder.py +279 -0
- hoox_pyne-0.3.0/backend/api/__init__.py +0 -0
- hoox_pyne-0.3.0/backend/api/git_oauth.py +278 -0
- hoox_pyne-0.3.0/backend/api/lsp_http.py +178 -0
- hoox_pyne-0.3.0/backend/api/preview.py +360 -0
- hoox_pyne-0.3.0/backend/app.py +958 -0
- hoox_pyne-0.3.0/backend/evaluator.py +545 -0
- hoox_pyne-0.3.0/backend/middleware/__init__.py +0 -0
- hoox_pyne-0.3.0/backend/middleware/auth.py +463 -0
- hoox_pyne-0.3.0/backend/middleware/key_store_redis.py +144 -0
- hoox_pyne-0.3.0/backend/middleware/key_store_sqlite.py +152 -0
- hoox_pyne-0.3.0/backend/middleware/schemas.py +240 -0
- hoox_pyne-0.3.0/backend/requirements.txt +11 -0
- hoox_pyne-0.3.0/backend/runtime.py +2028 -0
- hoox_pyne-0.3.0/backend/series.py +415 -0
- hoox_pyne-0.3.0/backend/services/__init__.py +0 -0
- hoox_pyne-0.3.0/backend/services/backtest.py +337 -0
- hoox_pyne-0.3.0/backend/services/chart_renderer.py +262 -0
- hoox_pyne-0.3.0/bun.lock +48 -0
- hoox_pyne-0.3.0/clients/README.md +170 -0
- hoox_pyne-0.3.0/clients/emacs.el +46 -0
- hoox_pyne-0.3.0/clients/neovim.lua +49 -0
- hoox_pyne-0.3.0/clients/zed.json +27 -0
- hoox_pyne-0.3.0/cloudbuild.yaml +89 -0
- hoox_pyne-0.3.0/debug_evaluator.py +17 -0
- hoox_pyne-0.3.0/docker/entrypoint-api.sh +40 -0
- hoox_pyne-0.3.0/docker/entrypoint-cli.sh +23 -0
- hoox_pyne-0.3.0/docker-bake.hcl +148 -0
- hoox_pyne-0.3.0/docker-compose.prod.yml +50 -0
- hoox_pyne-0.3.0/docker-compose.yml +147 -0
- hoox_pyne-0.3.0/docs/COMPILER_PLAN.md +198 -0
- hoox_pyne-0.3.0/docs/PROGRESS_REPORT.md +334 -0
- hoox_pyne-0.3.0/docs/README.md +91 -0
- hoox_pyne-0.3.0/docs/REFACTORING_EXECUTIVE_SUMMARY.md +269 -0
- hoox_pyne-0.3.0/docs/ROADMAP.md +193 -0
- hoox_pyne-0.3.0/docs/WRITING.md +70 -0
- hoox_pyne-0.3.0/docs/assets/brand/hoox-logo-dark.svg +44 -0
- hoox_pyne-0.3.0/docs/assets/brand/hoox-logo-light.svg +44 -0
- hoox_pyne-0.3.0/docs/axis/README.md +25 -0
- hoox_pyne-0.3.0/docs/compatibility_guarantee.md +435 -0
- hoox_pyne-0.3.0/docs/conf.py +94 -0
- hoox_pyne-0.3.0/docs/gcp_cost_estimate.md +130 -0
- hoox_pyne-0.3.0/docs/index.md +41 -0
- hoox_pyne-0.3.0/docs/license.md +26 -0
- hoox_pyne-0.3.0/docs/missing_features.md +453 -0
- hoox_pyne-0.3.0/docs/numerical_validation_report.md +543 -0
- hoox_pyne-0.3.0/docs/optimization_notes.md +289 -0
- hoox_pyne-0.3.0/docs/parity_round8/00_summary.md +83 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_01_inventory.md +29 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_02_numba_kernels.md +27 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_03_compiler_emit.md +50 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_04_compile_engine.md +86 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_05_interpret_ta.md +32 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_06_strategy.md +114 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_07_plot_keys.md +134 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_08_request_mtf.md +100 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_09_collections.md +27 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_10_expressions.md +108 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_11_runtime_host.md +98 -0
- hoox_pyne-0.3.0/docs/parity_round8/AGENT_12_harness.md +107 -0
- hoox_pyne-0.3.0/docs/parity_round8/PROMPT.md +135 -0
- hoox_pyne-0.3.0/docs/parity_round8/STATUS.md +40 -0
- hoox_pyne-0.3.0/docs/perf_agent_compile_execute.md +143 -0
- hoox_pyne-0.3.0/docs/perf_agent_compile_round2.md +137 -0
- hoox_pyne-0.3.0/docs/perf_agent_compile_round3.md +145 -0
- hoox_pyne-0.3.0/docs/perf_agent_dispatch_round2.md +130 -0
- hoox_pyne-0.3.0/docs/perf_agent_evaluate.md +123 -0
- hoox_pyne-0.3.0/docs/perf_agent_evaluate_round2.md +1 -0
- hoox_pyne-0.3.0/docs/perf_agent_evaluate_round3.md +52 -0
- hoox_pyne-0.3.0/docs/perf_agent_objectmode_round3.md +105 -0
- hoox_pyne-0.3.0/docs/perf_agent_parse.md +140 -0
- hoox_pyne-0.3.0/docs/perf_agent_plot_round3.md +80 -0
- hoox_pyne-0.3.0/docs/perf_agent_runtime_round2.md +78 -0
- hoox_pyne-0.3.0/docs/perf_agent_unparse.md +94 -0
- hoox_pyne-0.3.0/docs/perf_agents_summary.md +102 -0
- hoox_pyne-0.3.0/docs/perf_round4/00_summary.md +72 -0
- hoox_pyne-0.3.0/docs/perf_round4/01_corpus_coverage.md +207 -0
- hoox_pyne-0.3.0/docs/perf_round4/02_parser_perf.md +181 -0
- hoox_pyne-0.3.0/docs/perf_round4/03_unparser_perf.md +127 -0
- hoox_pyne-0.3.0/docs/perf_round4/04_interpreter_ta.md +149 -0
- hoox_pyne-0.3.0/docs/perf_round4/05_compiler_numba.md +180 -0
- hoox_pyne-0.3.0/docs/perf_round4/06_runtime_host.md +154 -0
- hoox_pyne-0.3.0/docs/perf_round4/07_dispatch_expressions.md +206 -0
- hoox_pyne-0.3.0/docs/perf_round4/08_v6_coverage_matrix.md +209 -0
- hoox_pyne-0.3.0/docs/perf_round4/09_strategy_plot.md +137 -0
- hoox_pyne-0.3.0/docs/perf_round4/10_bottleneck_map.md +319 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_matrix_compile.md +114 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_missing_names.md +118 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_none_arith.md +123 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_none_callable.md +117 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_numba_fallback.md +161 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_oob_list.md +133 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_pineseries_float.md +126 -0
- hoox_pyne-0.3.0/docs/perf_round4/set05_fix_sanitize_rest.md +75 -0
- hoox_pyne-0.3.0/docs/perf_round5/00_summary.md +177 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_01_dispatch.md +119 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_02_series.md +129 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_03_ta_incremental.md +91 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_04_plot_draw.md +110 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_05_runtime_host.md +144 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_06_compiler_numba.md +105 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_07_strategy.md +76 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_08_parser_sanitize.md +141 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_09_collections_udt.md +72 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_10_v6_surface.md +88 -0
- hoox_pyne-0.3.0/docs/perf_round5/AGENT_11_lsp.md +84 -0
- hoox_pyne-0.3.0/docs/perf_round5/PROMPT.md +294 -0
- hoox_pyne-0.3.0/docs/perf_round5/STATUS.md +53 -0
- hoox_pyne-0.3.0/docs/perf_round6/00_summary.md +58 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_01_interpret_dispatch.md +129 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_02_series.md +142 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_03_ta_incremental.md +105 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_04_compiler_numba.md +96 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_05_compiler_surface.md +125 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_06_compiler_engine.md +92 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_07_strategy.md +79 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_08_error_handling.md +103 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_09_collections.md +73 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_10_na_safety.md +75 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_11_parser_sanitize.md +121 -0
- hoox_pyne-0.3.0/docs/perf_round6/AGENT_12_runtime_host.md +147 -0
- hoox_pyne-0.3.0/docs/perf_round6/PROMPT.md +195 -0
- hoox_pyne-0.3.0/docs/perf_round6/STATUS.md +40 -0
- hoox_pyne-0.3.0/docs/perf_round7/00_summary.md +71 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_01_research_newest.md +315 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_02_bottleneck_map.md +310 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_03_series_cap.md +102 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_04_ta_incremental.md +102 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_05_parse_cache.md +111 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_06_dual_host.md +105 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_07_warm_compile.md +77 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_08_corpus_residual.md +93 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_09_ring_buffer.md +217 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_10_pending_fill.md +95 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_11_lazy_calendar_plots.md +105 -0
- hoox_pyne-0.3.0/docs/perf_round7/AGENT_12_compiler_phase3.md +195 -0
- hoox_pyne-0.3.0/docs/perf_round7/H1_unify_checklist.md +59 -0
- hoox_pyne-0.3.0/docs/perf_round7/PROMPT.md +88 -0
- hoox_pyne-0.3.0/docs/perf_round7/STATUS.md +39 -0
- hoox_pyne-0.3.0/docs/perf_round7/bench_r7_agent02.json +223 -0
- hoox_pyne-0.3.0/docs/pine_v6_full_surface_inventory.md +2320 -0
- hoox_pyne-0.3.0/docs/pinescript_implementation_status.md +1869 -0
- hoox_pyne-0.3.0/docs/pyne/api/app-lifecycle.mdx +150 -0
- hoox_pyne-0.3.0/docs/pyne/api/auth-and-keys.mdx +182 -0
- hoox_pyne-0.3.0/docs/pyne/api/contract.mdx +254 -0
- hoox_pyne-0.3.0/docs/pyne/api/endpoints/backtest.mdx +180 -0
- hoox_pyne-0.3.0/docs/pyne/api/endpoints/preview.mdx +175 -0
- hoox_pyne-0.3.0/docs/pyne/api/endpoints/run.mdx +223 -0
- hoox_pyne-0.3.0/docs/pyne/api/index.mdx +120 -0
- hoox_pyne-0.3.0/docs/pyne/api/runtime-bridge.mdx +160 -0
- hoox_pyne-0.3.0/docs/pyne/api/services/chart-renderer.mdx +116 -0
- hoox_pyne-0.3.0/docs/pyne/contributing.mdx +186 -0
- hoox_pyne-0.3.0/docs/pyne/core/asdl-schema.mdx +223 -0
- hoox_pyne-0.3.0/docs/pyne/core/builder.mdx +193 -0
- hoox_pyne-0.3.0/docs/pyne/core/error-model.mdx +233 -0
- hoox_pyne-0.3.0/docs/pyne/core/grammar-antlr4.mdx +236 -0
- hoox_pyne-0.3.0/docs/pyne/core/helper-api.mdx +208 -0
- hoox_pyne-0.3.0/docs/pyne/core/index.mdx +185 -0
- hoox_pyne-0.3.0/docs/pyne/core/linter.mdx +216 -0
- hoox_pyne-0.3.0/docs/pyne/core/type-system.mdx +260 -0
- hoox_pyne-0.3.0/docs/pyne/core/unparser.mdx +181 -0
- hoox_pyne-0.3.0/docs/pyne/core/visitor-transformer.mdx +233 -0
- hoox_pyne-0.3.0/docs/pyne/devops/ci.mdx +154 -0
- hoox_pyne-0.3.0/docs/pyne/devops/docker.mdx +245 -0
- hoox_pyne-0.3.0/docs/pyne/devops/gcp.mdx +152 -0
- hoox_pyne-0.3.0/docs/pyne/devops/index.mdx +139 -0
- hoox_pyne-0.3.0/docs/pyne/devops/local-dev.mdx +169 -0
- hoox_pyne-0.3.0/docs/pyne/devops/metadata-crypto.mdx +156 -0
- hoox_pyne-0.3.0/docs/pyne/devops/nuitka-build.mdx +176 -0
- hoox_pyne-0.3.0/docs/pyne/devops/observability.mdx +160 -0
- hoox_pyne-0.3.0/docs/pyne/devops/publish-checklist.mdx +176 -0
- hoox_pyne-0.3.0/docs/pyne/devops/pypi-publish.mdx +144 -0
- hoox_pyne-0.3.0/docs/pyne/devops/release.mdx +195 -0
- hoox_pyne-0.3.0/docs/pyne/devops/security.mdx +159 -0
- hoox_pyne-0.3.0/docs/pyne/docs.json +217 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/getting-started/configuration.mdx +279 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/getting-started/installation.mdx +247 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/getting-started/quick-start.mdx +226 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/cli.mdx +219 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/editors.mdx +272 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/evaluate-scripts.mdx +345 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/library-api.mdx +266 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/pro-api-usage.mdx +339 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/guides/troubleshooting.mdx +225 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/index.mdx +211 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/reference/cli-commands.mdx +273 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/reference/faq.mdx +242 -0
- hoox_pyne-0.3.0/docs/pyne/enduser/reference/glossary.mdx +242 -0
- hoox_pyne-0.3.0/docs/pyne/index.mdx +128 -0
- hoox_pyne-0.3.0/docs/pyne/llm.txt +9567 -0
- hoox_pyne-0.3.0/docs/pyne/llms.txt +139 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/architecture.mdx +201 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/builtin-metadata.mdx +184 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/clients.mdx +200 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/completion.mdx +134 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/diagnostics.mdx +154 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/formatting.mdx +118 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/hover.mdx +110 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/inlay-hints.mdx +137 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/navigation.mdx +137 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/features/semantic-tokens.mdx +106 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/index.mdx +116 -0
- hoox_pyne-0.3.0/docs/pyne/lsp/vscode-extension.mdx +184 -0
- hoox_pyne-0.3.0/docs/pyne/pine-worker/converter.mdx +133 -0
- hoox_pyne-0.3.0/docs/pyne/pine-worker/index.mdx +140 -0
- hoox_pyne-0.3.0/docs/pyne/pine-worker/testing.mdx +156 -0
- hoox_pyne-0.3.0/docs/pyne/reference/compatibility.mdx +170 -0
- hoox_pyne-0.3.0/docs/pyne/reference/implementation-status.mdx +138 -0
- hoox_pyne-0.3.0/docs/pyne/reference/missing-features.mdx +203 -0
- hoox_pyne-0.3.0/docs/pyne/reference/numerical-validation.mdx +159 -0
- hoox_pyne-0.3.0/docs/pyne/reference/pine-v6-surface.mdx +152 -0
- hoox_pyne-0.3.0/docs/pyne/reference/roadmap.mdx +175 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/alerts.mdx +182 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/collections.mdx +149 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/drawing-plotting.mdx +239 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/index.mdx +130 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/request-input.mdx +226 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/strategy.mdx +183 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/builtins/technical.mdx +204 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/compiler/numba.mdx +185 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/compiler/overview.mdx +282 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/compiler/parity.mdx +131 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/compiler/strategy-broker.mdx +161 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/events.mdx +157 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/expressions-statements.mdx +171 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/index.mdx +175 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/libraries.mdx +140 -0
- hoox_pyne-0.3.0/docs/pyne/runtime/series-and-history.mdx +227 -0
- hoox_pyne-0.3.0/docs/rating.md +58 -0
- hoox_pyne-0.3.0/docs/reference.md +28 -0
- hoox_pyne-0.3.0/docs/requirements.txt +4 -0
- hoox_pyne-0.3.0/docs/superpowers/specs/2026-05-11-pine-script-v6-features-design.md +577 -0
- hoox_pyne-0.3.0/docs/usage.md +93 -0
- hoox_pyne-0.3.0/examples/.gitignore +1 -0
- hoox_pyne-0.3.0/examples/evaluate_expressions.py +216 -0
- hoox_pyne-0.3.0/examples/execute_script.py +465 -0
- hoox_pyne-0.3.0/examples/historical_data.py +49 -0
- hoox_pyne-0.3.0/examples/parse_dump_unparse.py +55 -0
- hoox_pyne-0.3.0/examples/realtime_datafeed.py +72 -0
- hoox_pyne-0.3.0/examples/rsi_strategy.pine +19 -0
- hoox_pyne-0.3.0/package.json +30 -0
- hoox_pyne-0.3.0/pine-worker/README.md +71 -0
- hoox_pyne-0.3.0/pine-worker/bun.lock +20 -0
- hoox_pyne-0.3.0/pine-worker/package.json +21 -0
- hoox_pyne-0.3.0/pine-worker/scripts/convert-python-to-ts.py +200 -0
- hoox_pyne-0.3.0/pine-worker/src/ast/types.ts +212 -0
- hoox_pyne-0.3.0/pine-worker/src/evaluator/evaluator.ts +565 -0
- hoox_pyne-0.3.0/pine-worker/src/evaluator/series.ts +80 -0
- hoox_pyne-0.3.0/pine-worker/src/evaluator/types.ts +73 -0
- hoox_pyne-0.3.0/pine-worker/test/ast.test.ts +405 -0
- hoox_pyne-0.3.0/pine-worker/test/evaluator.test.ts +814 -0
- hoox_pyne-0.3.0/pine-worker/test/series.test.ts +119 -0
- hoox_pyne-0.3.0/pine-worker/tsconfig.json +21 -0
- hoox_pyne-0.3.0/pyproject.toml +331 -0
- hoox_pyne-0.3.0/scripts/bench_pipeline.py +507 -0
- hoox_pyne-0.3.0/scripts/build/README.md +167 -0
- hoox_pyne-0.3.0/scripts/build/ci_build.py +340 -0
- hoox_pyne-0.3.0/scripts/build/compile.py +513 -0
- hoox_pyne-0.3.0/scripts/collect_pine_corpus.py +560 -0
- hoox_pyne-0.3.0/scripts/compare_interp_compile.py +1116 -0
- hoox_pyne-0.3.0/scripts/convert_pine_version.py +63 -0
- hoox_pyne-0.3.0/scripts/corpus_parse_sets.py +390 -0
- hoox_pyne-0.3.0/scripts/corpus_rerun_fails.py +160 -0
- hoox_pyne-0.3.0/scripts/corpus_run_runtime.py +535 -0
- hoox_pyne-0.3.0/scripts/deploy_vps.sh +161 -0
- hoox_pyne-0.3.0/scripts/docs/generate-exports.mjs +1157 -0
- hoox_pyne-0.3.0/scripts/generate_builtin_metadata.py +232 -0
- hoox_pyne-0.3.0/scripts/regenerate_inventory_summary.py +83 -0
- hoox_pyne-0.3.0/scripts/showcase.py +1092 -0
- hoox_pyne-0.3.0/scripts/update_copyright.py +480 -0
- hoox_pyne-0.3.0/src/pynescript/__about__.py +33 -0
- hoox_pyne-0.3.0/src/pynescript/__init__.py +54 -0
- hoox_pyne-0.3.0/src/pynescript/__main__.py +1065 -0
- hoox_pyne-0.3.0/src/pynescript/ast/__init__.py +61 -0
- hoox_pyne-0.3.0/src/pynescript/ast/__main__.py +67 -0
- hoox_pyne-0.3.0/src/pynescript/ast/builder.py +1422 -0
- hoox_pyne-0.3.0/src/pynescript/ast/collector.py +149 -0
- hoox_pyne-0.3.0/src/pynescript/ast/error.py +103 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/__init__.py +152 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/base.py +258 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/__init__.py +168 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/alerts.py +343 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/arrays.py +1343 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/base.py +592 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/color.py +419 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/declarations.py +175 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/drawing.py +2037 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/input.py +757 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/logging.py +139 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/map.py +93 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/map_evaluator.py +213 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/matrix.py +914 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/matrix_evaluator.py +945 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/numeric.py +539 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/plotting.py +646 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/request.py +1140 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/strategy.py +2281 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/strategy_constants.py +96 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/strings.py +604 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical.py +274 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/README.md +207 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/__init__.py +42 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/advanced.py +1791 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/basic.py +1304 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/common.py +853 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/core.py +3569 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/economics.py +624 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/moving_averages.py +383 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/oscillators.py +806 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/patterns.py +395 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/strategies.py +398 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/synthesizer.py +202 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/volatility.py +689 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/technical_submodules/volume.py +884 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/ticker.py +497 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/timeframe.py +250 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/builtins/utility.py +935 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/events.py +125 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/expressions.py +1464 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/libraries.py +199 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/literals.py +70 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/names.py +629 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/series_buffer.py +430 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/statements.py +1903 -0
- hoox_pyne-0.3.0/src/pynescript/ast/evaluator/types.py +73 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/__init__.py +27 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/__init__.py +31 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/error_listener.py +147 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptLexer.interp +267 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptLexer.py +678 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptLexer.tokens +131 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptLexerBase.py +340 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParser.interp +267 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParser.py +8607 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParser.tokens +131 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParserBase.py +40 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParserListener.py +1084 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/PinescriptParserVisitor.py +617 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/__init__.py +33 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptLexer.interp +242 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptLexer.py +388 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptLexer.tokens +118 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptParser.interp +250 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptParser.py +7286 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptParser.tokens +118 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/generated/src/pynescript/ast/grammar/antlr4/resource/PinescriptParserVisitor.py +602 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/lexer.py +27 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/listener.py +27 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/parser.py +27 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/resource/PinescriptLexer.g4 +193 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/resource/PinescriptLexerBase.py +340 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/resource/PinescriptParser.g4 +371 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/resource/PinescriptParserBase.py +40 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/tool/__init__.py +26 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/tool/generate.py +58 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/antlr4/visitor.py +27 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/__init__.py +29 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/generated/PinescriptASTNode.py +494 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/generated/__init__.py +22 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/resource/Pinescript.asdl +72 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/tool/__init__.py +26 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/tool/asdlgen.py +283 -0
- hoox_pyne-0.3.0/src/pynescript/ast/grammar/asdl/tool/generate.py +66 -0
- hoox_pyne-0.3.0/src/pynescript/ast/helper.py +984 -0
- hoox_pyne-0.3.0/src/pynescript/ast/linter.py +221 -0
- hoox_pyne-0.3.0/src/pynescript/ast/node.py +54 -0
- hoox_pyne-0.3.0/src/pynescript/ast/transformer.py +81 -0
- hoox_pyne-0.3.0/src/pynescript/ast/type_system.py +369 -0
- hoox_pyne-0.3.0/src/pynescript/ast/unparser.py +1140 -0
- hoox_pyne-0.3.0/src/pynescript/ast/visitor.py +85 -0
- hoox_pyne-0.3.0/src/pynescript/compiler/__init__.py +94 -0
- hoox_pyne-0.3.0/src/pynescript/compiler/compiler.py +7777 -0
- hoox_pyne-0.3.0/src/pynescript/compiler/engine.py +1419 -0
- hoox_pyne-0.3.0/src/pynescript/compiler/numba_builtins.py +5211 -0
- hoox_pyne-0.3.0/src/pynescript/compiler/strategy_broker.py +1084 -0
- hoox_pyne-0.3.0/src/pynescript/ext/__init__.py +32 -0
- hoox_pyne-0.3.0/src/pynescript/ext/jupyter.py +213 -0
- hoox_pyne-0.3.0/src/pynescript/ext/nautilus_trader/__init__.py +26 -0
- hoox_pyne-0.3.0/src/pynescript/ext/nautilus_trader/strategy.py +61 -0
- hoox_pyne-0.3.0/src/pynescript/ext/pygments/__init__.py +26 -0
- hoox_pyne-0.3.0/src/pynescript/ext/pygments/lexers.py +117 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/__init__.py +61 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/__main__.py +47 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/config.py +133 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/__init__.py +47 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/completion.py +120 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/definitions.py +176 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/diagnostics.py +228 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/formatting.py +123 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/hover.py +201 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/inlay_hints.py +225 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/references.py +155 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/semantic_tokens.py +204 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/features/symbols.py +256 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/protocol/__init__.py +0 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/protocol/constants.py +54 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/protocol/utils.py +171 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/__init__.py +0 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/builtin_metadata.json +7832 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/builtin_metadata.json.enc +1 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/builtin_metadata.json.sha256 +1 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/builtin_metadata.py +180 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/completion_items.py +216 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/providers/metadata_decrypt.py +141 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/server.py +402 -0
- hoox_pyne-0.3.0/src/pynescript/langserver/workspace.py +285 -0
- hoox_pyne-0.3.0/src/pynescript/py.typed +0 -0
- hoox_pyne-0.3.0/src/pynescript/util/__init__.py +22 -0
- hoox_pyne-0.3.0/src/pynescript/util/corpus_sanitize.py +1886 -0
- hoox_pyne-0.3.0/src/pynescript/util/data.py +697 -0
- hoox_pyne-0.3.0/src/pynescript/util/datafeed.py +619 -0
- hoox_pyne-0.3.0/src/pynescript/util/itertools.py +36 -0
- hoox_pyne-0.3.0/src/pynescript/util/pine_facade.py +197 -0
- hoox_pyne-0.3.0/src/pynescript/util/time_parts.py +106 -0
- hoox_pyne-0.3.0/tests/__init__.py +37 -0
- hoox_pyne-0.3.0/tests/conftest.py +46 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/generate_fixtures.py +84 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_01_entry_long.json +952 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_02_entry_short.json +952 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_03_close_long.json +1902 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_04_close_short.json +1902 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_05_close_all.json +1902 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_06_exit_stop_limit.json +1902 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_07_cancel_order.json +1902 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_08_no_action.json +1 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/json/strategy_09_var_count.json +21 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/ohlcv.py +96 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_01_entry_long.pine +4 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_02_entry_short.pine +4 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_03_close_long.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_04_close_short.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_05_close_all.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_06_exit_stop_limit.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_07_cancel_order.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_08_no_action.pine +5 -0
- hoox_pyne-0.3.0/tests/fixtures/parity/pine/strategy_09_var_count.pine +9 -0
- hoox_pyne-0.3.0/tests/test_alert_forwarder.py +84 -0
- hoox_pyne-0.3.0/tests/test_alerts.py +92 -0
- hoox_pyne-0.3.0/tests/test_backend.py +700 -0
- hoox_pyne-0.3.0/tests/test_bgcolor_plotshape_export.py +203 -0
- hoox_pyne-0.3.0/tests/test_builtins.py +599 -0
- hoox_pyne-0.3.0/tests/test_cli.py +357 -0
- hoox_pyne-0.3.0/tests/test_collections.py +837 -0
- hoox_pyne-0.3.0/tests/test_compiler_engine_r8.py +239 -0
- hoox_pyne-0.3.0/tests/test_compiler_numba.py +4312 -0
- hoox_pyne-0.3.0/tests/test_compiler_objects.py +527 -0
- hoox_pyne-0.3.0/tests/test_compiler_strategy.py +347 -0
- hoox_pyne-0.3.0/tests/test_corpus_collections_r8.py +167 -0
- hoox_pyne-0.3.0/tests/test_corpus_runtime_residuals.py +1409 -0
- hoox_pyne-0.3.0/tests/test_corpus_sanitize.py +1107 -0
- hoox_pyne-0.3.0/tests/test_datafeed.py +174 -0
- hoox_pyne-0.3.0/tests/test_datafeed_wiring.py +142 -0
- hoox_pyne-0.3.0/tests/test_dividend_yield_parity.py +143 -0
- hoox_pyne-0.3.0/tests/test_drawing_all_and_last_bar.py +99 -0
- hoox_pyne-0.3.0/tests/test_drawing_gc.py +114 -0
- hoox_pyne-0.3.0/tests/test_error_handling.py +338 -0
- hoox_pyne-0.3.0/tests/test_evaluator.py +2457 -0
- hoox_pyne-0.3.0/tests/test_expr_parity_r8.py +320 -0
- hoox_pyne-0.3.0/tests/test_for_loop_syntax.py +108 -0
- hoox_pyne-0.3.0/tests/test_indicators.py +790 -0
- hoox_pyne-0.3.0/tests/test_interp_compile_parity.py +312 -0
- hoox_pyne-0.3.0/tests/test_langserver.py +225 -0
- hoox_pyne-0.3.0/tests/test_lazy_calendar_plots.py +198 -0
- hoox_pyne-0.3.0/tests/test_lexer_corpus_fixes.py +199 -0
- hoox_pyne-0.3.0/tests/test_library_export_import.py +202 -0
- hoox_pyne-0.3.0/tests/test_linter.py +98 -0
- hoox_pyne-0.3.0/tests/test_lsp_features.py +499 -0
- hoox_pyne-0.3.0/tests/test_lsp_http.py +48 -0
- hoox_pyne-0.3.0/tests/test_map_collections.py +410 -0
- hoox_pyne-0.3.0/tests/test_matrix_collections.py +605 -0
- hoox_pyne-0.3.0/tests/test_matrix_v6_surface.py +257 -0
- hoox_pyne-0.3.0/tests/test_multi_plot_cross.py +199 -0
- hoox_pyne-0.3.0/tests/test_oca_commission.py +235 -0
- hoox_pyne-0.3.0/tests/test_order_fills.py +287 -0
- hoox_pyne-0.3.0/tests/test_parity.py +220 -0
- hoox_pyne-0.3.0/tests/test_parity_r9_kernels.py +284 -0
- hoox_pyne-0.3.0/tests/test_parse_and_unparse.py +34 -0
- hoox_pyne-0.3.0/tests/test_parse_cache.py +145 -0
- hoox_pyne-0.3.0/tests/test_pine_surface_gaps.py +137 -0
- hoox_pyne-0.3.0/tests/test_plotting_effects.py +124 -0
- hoox_pyne-0.3.0/tests/test_real_world_compatibility.py +494 -0
- hoox_pyne-0.3.0/tests/test_request_data_feed.py +209 -0
- hoox_pyne-0.3.0/tests/test_runtime_parity_host_r8.py +252 -0
- hoox_pyne-0.3.0/tests/test_series_cap.py +396 -0
- hoox_pyne-0.3.0/tests/test_series_ring_buffer.py +334 -0
- hoox_pyne-0.3.0/tests/test_strategy_events.py +692 -0
- hoox_pyne-0.3.0/tests/test_strategy_risk_enforcement.py +86 -0
- hoox_pyne-0.3.0/tests/test_strategy_runtime.py +383 -0
- hoox_pyne-0.3.0/tests/test_ta_incremental.py +2811 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_1.py +522 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_2.py +254 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_3.py +329 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_4.py +435 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_5.py +495 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_6.py +779 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_7.py +625 -0
- hoox_pyne-0.3.0/tests/test_ta_indicators_8.py +452 -0
- hoox_pyne-0.3.0/tests/test_time_parts.py +75 -0
- hoox_pyne-0.3.0/tests/test_udt_instantiation.py +462 -0
- hoox_pyne-0.3.0/tests/test_udt_methods.py +691 -0
- hoox_pyne-0.3.0/tests/test_udt_types.py +229 -0
- hoox_pyne-0.3.0/tests/test_utility_time.py +452 -0
- hoox_pyne-0.3.0/tests/test_v4_bare_aliases.py +152 -0
- hoox_pyne-0.3.0/tests/test_v6_features.py +672 -0
- hoox_pyne-0.3.0/tests/test_v6_surface_locks.py +360 -0
- hoox_pyne-0.3.0/tsconfig.json +17 -0
- hoox_pyne-0.3.0/vscode-extension/.gitignore +1 -0
- hoox_pyne-0.3.0/vscode-extension/.vscodeignore +16 -0
- hoox_pyne-0.3.0/vscode-extension/LICENSE +661 -0
- hoox_pyne-0.3.0/vscode-extension/README.md +107 -0
- hoox_pyne-0.3.0/vscode-extension/esbuild.mjs +38 -0
- hoox_pyne-0.3.0/vscode-extension/language-configuration.json +82 -0
- hoox_pyne-0.3.0/vscode-extension/media/icon-512.png +0 -0
- hoox_pyne-0.3.0/vscode-extension/media/icon.png +0 -0
- hoox_pyne-0.3.0/vscode-extension/package-lock.json +1079 -0
- hoox_pyne-0.3.0/vscode-extension/package.json +216 -0
- hoox_pyne-0.3.0/vscode-extension/src/extension.ts +416 -0
- hoox_pyne-0.3.0/vscode-extension/syntaxes/pinescript.tmLanguage.json +393 -0
- hoox_pyne-0.3.0/vscode-extension/tsconfig.json +18 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Copyright (C) 2024-2026 jango_blockchained
|
|
2
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
# VCS / IDE
|
|
5
|
+
.git
|
|
6
|
+
.github
|
|
7
|
+
.gitattributes
|
|
8
|
+
.gitignore
|
|
9
|
+
.opencode
|
|
10
|
+
.claude
|
|
11
|
+
.cursor
|
|
12
|
+
.vscode
|
|
13
|
+
.idea
|
|
14
|
+
*.swp
|
|
15
|
+
*~
|
|
16
|
+
|
|
17
|
+
# Python envs & caches
|
|
18
|
+
.venv
|
|
19
|
+
venv
|
|
20
|
+
.env
|
|
21
|
+
.env.*
|
|
22
|
+
!.env.example
|
|
23
|
+
__pycache__
|
|
24
|
+
*.py[cod]
|
|
25
|
+
*$py.class
|
|
26
|
+
*.egg-info
|
|
27
|
+
.eggs
|
|
28
|
+
.mypy_cache
|
|
29
|
+
.pytest_cache
|
|
30
|
+
.ruff_cache
|
|
31
|
+
.coverage
|
|
32
|
+
.coverage.*
|
|
33
|
+
coverage.lcov
|
|
34
|
+
coverage.xml
|
|
35
|
+
htmlcov
|
|
36
|
+
.tox
|
|
37
|
+
.nox
|
|
38
|
+
.cache
|
|
39
|
+
*.egg
|
|
40
|
+
|
|
41
|
+
# Build / dist artifacts
|
|
42
|
+
dist
|
|
43
|
+
build
|
|
44
|
+
*.whl
|
|
45
|
+
*.tar.gz
|
|
46
|
+
|
|
47
|
+
# Test corpus (huge) — not needed for runtime images
|
|
48
|
+
tests
|
|
49
|
+
reports
|
|
50
|
+
|
|
51
|
+
# Docs, brand assets, marketing
|
|
52
|
+
docs
|
|
53
|
+
brand
|
|
54
|
+
MARKETING.md
|
|
55
|
+
|
|
56
|
+
# Sister-tool frontends (not part of the API image)
|
|
57
|
+
vscode-extension
|
|
58
|
+
pine-worker
|
|
59
|
+
clients
|
|
60
|
+
examples
|
|
61
|
+
debug_evaluator.py
|
|
62
|
+
|
|
63
|
+
# Node / Bun
|
|
64
|
+
node_modules
|
|
65
|
+
**/node_modules
|
|
66
|
+
bun.lock
|
|
67
|
+
package.json
|
|
68
|
+
package-lock.json
|
|
69
|
+
tsconfig.json
|
|
70
|
+
|
|
71
|
+
# Compiler intermediate caches (Nuitka)
|
|
72
|
+
src/pynescript/compiler/**/*.nbc
|
|
73
|
+
src/pynescript/compiler/**/*.nbi
|
|
74
|
+
**/*.nbc
|
|
75
|
+
**/*.nbi
|
|
76
|
+
|
|
77
|
+
# Logs & local data
|
|
78
|
+
logs
|
|
79
|
+
*.log
|
|
80
|
+
data
|
|
81
|
+
|
|
82
|
+
# Docker noise (avoid recursive context)
|
|
83
|
+
docker-compose*.yml
|
|
84
|
+
docker-bake.hcl
|
|
85
|
+
Dockerfile.api
|
|
86
|
+
|
|
87
|
+
# Misc
|
|
88
|
+
*.md
|
|
89
|
+
!README.md
|
|
90
|
+
!NOTICE
|
|
91
|
+
CHANGELOG.md
|
|
92
|
+
COMPATIBILITY.md
|
|
93
|
+
CODE_OF_CONDUCT.md
|
|
94
|
+
CONTRIBUTING.md
|
|
95
|
+
SECURITY.md
|
|
96
|
+
DESIGN.md
|
|
97
|
+
Makefile
|
|
98
|
+
cloudbuild.yaml
|
|
99
|
+
scripts
|
|
100
|
+
*.pine
|
|
101
|
+
*.vsix
|
|
102
|
+
*.pdf
|
|
103
|
+
*.svg
|
|
104
|
+
*.png
|
|
105
|
+
*.jpg
|
|
106
|
+
*.jpeg
|
|
107
|
+
*.gif
|
|
108
|
+
*.webp
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# EditorConfig is awesome: https://EditorConfig.org
|
|
2
|
+
|
|
3
|
+
# top-most EditorConfig file
|
|
4
|
+
root = true
|
|
5
|
+
|
|
6
|
+
[*]
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 4
|
|
9
|
+
end_of_line = lf
|
|
10
|
+
charset = utf-8
|
|
11
|
+
trim_trailing_whitespace = true
|
|
12
|
+
insert_final_newline = true
|
|
13
|
+
|
|
14
|
+
[*.{json,yaml,yml,md}]
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
[Makefile]
|
|
18
|
+
indent_style = tab
|
|
19
|
+
|
|
20
|
+
[*.{cmd,bat}]
|
|
21
|
+
end_of_line = crlf
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright (C) 2024-2026 jango_blockchained
|
|
2
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
#
|
|
4
|
+
# Copy to `.env` for local compose overrides:
|
|
5
|
+
# cp .env.example .env
|
|
6
|
+
|
|
7
|
+
# Host port published for the Pro API (container always listens on 8080)
|
|
8
|
+
API_PORT=5002
|
|
9
|
+
|
|
10
|
+
# Flask / app
|
|
11
|
+
FLASK_DEBUG=1
|
|
12
|
+
# Required for POST /auth/create_key (X-Admin-Token). Empty = minting disabled (403).
|
|
13
|
+
# Production compose (make docker-prod) refuses to start if this is empty.
|
|
14
|
+
ADMIN_TOKEN=
|
|
15
|
+
|
|
16
|
+
# Optional default HTTPS destination for alert()/alertcondition() webhooks (L2).
|
|
17
|
+
# Per-request webhook_url on POST /run overrides this.
|
|
18
|
+
# ALERT_WEBHOOK_URL=https://hooks.example.com/pine
|
|
19
|
+
# ALERT_WEBHOOK_TIMEOUT=10
|
|
20
|
+
ALLOWED_ORIGINS=https://hoox.sh,https://hoox.sh/axis,http://localhost:8081,http://127.0.0.1:8081
|
|
21
|
+
API_KEY_STORE=/data/api_keys.json
|
|
22
|
+
# json (default, single-process) | sqlite (multi-worker volume) | redis (multi-replica)
|
|
23
|
+
STORE_BACKEND=json
|
|
24
|
+
API_KEY_STORE_SQLITE=/data/api_keys.db
|
|
25
|
+
|
|
26
|
+
# Optional Redis (compose profile: redis). Required when STORE_BACKEND=redis.
|
|
27
|
+
REDIS_URL=redis://redis:6379/0
|
|
28
|
+
REDIS_PORT=6379
|
|
29
|
+
|
|
30
|
+
# Gunicorn (production overlay / target api)
|
|
31
|
+
GUNICORN_WORKERS=2
|
|
32
|
+
GUNICORN_THREADS=4
|
|
33
|
+
GUNICORN_TIMEOUT=60
|
|
34
|
+
|
|
35
|
+
# Warm compile (H2) — defaults favor production throughput
|
|
36
|
+
# Disk IR/module cache (default on). Set 0 to disable on tiny/ephemeral FS.
|
|
37
|
+
PYNE_COMPILE_DISK_CACHE=1
|
|
38
|
+
# Persistent volume path so IR + Numba .nbc survive restarts (Docker: /data/…).
|
|
39
|
+
# PYNE_COMPILE_CACHE_DIR=/data/compile-cache
|
|
40
|
+
# Once-per-worker builtin prewarm on first /run (default on). Soft-fail without numba.
|
|
41
|
+
PYNE_COMPILE_PREWARM=1
|
|
42
|
+
|
|
43
|
+
# Image tags / bake
|
|
44
|
+
TAG=latest
|
|
45
|
+
PYNESCRIPT_VERSION=0.2.0
|
|
46
|
+
GIT_SHA=dev
|
|
47
|
+
|
|
48
|
+
# Prod resource caps (docker-compose.prod.yml)
|
|
49
|
+
API_MEM_LIMIT=1g
|
|
50
|
+
API_CPUS=1.0
|
hoox_pyne-0.3.0/.flake8
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
|
|
2
|
+
*$py.class
|
|
3
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
4
|
+
.antlr/
|
|
5
|
+
# ANTLR4
|
|
6
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
7
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
8
|
+
# Root build artifacts only (do not match scripts/build/)
|
|
9
|
+
/build/
|
|
10
|
+
# Byte-compiled / optimized / DLL files
|
|
11
|
+
.cache
|
|
12
|
+
celerybeat.pid
|
|
13
|
+
celerybeat-schedule
|
|
14
|
+
# Celery stuff
|
|
15
|
+
# C extensions
|
|
16
|
+
*.cover
|
|
17
|
+
cover/
|
|
18
|
+
.coverage
|
|
19
|
+
.coverage.*
|
|
20
|
+
coverage/
|
|
21
|
+
coverage.lcov
|
|
22
|
+
coverage.xml
|
|
23
|
+
cython_debug/
|
|
24
|
+
# Cython debug symbols
|
|
25
|
+
db.sqlite3
|
|
26
|
+
db.sqlite3-journal
|
|
27
|
+
develop-eggs/
|
|
28
|
+
dist/
|
|
29
|
+
# Distribution / packaging
|
|
30
|
+
# Django stuff:
|
|
31
|
+
.dmypy.json
|
|
32
|
+
dmypy.json
|
|
33
|
+
docs/apidoc/
|
|
34
|
+
docs/_build/
|
|
35
|
+
downloads/
|
|
36
|
+
*.egg
|
|
37
|
+
*.egg-info/
|
|
38
|
+
.eggs/
|
|
39
|
+
eggs/
|
|
40
|
+
.env
|
|
41
|
+
env/
|
|
42
|
+
ENV/
|
|
43
|
+
env.bak/
|
|
44
|
+
# Environments
|
|
45
|
+
# Flask stuff:
|
|
46
|
+
htmlcov/
|
|
47
|
+
.hypothesis/
|
|
48
|
+
#.idea/
|
|
49
|
+
.ignore/
|
|
50
|
+
.installed.cfg
|
|
51
|
+
# Installer logs
|
|
52
|
+
instance/
|
|
53
|
+
.ipynb_checkpoints
|
|
54
|
+
# IPython
|
|
55
|
+
ipython_config.py
|
|
56
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
57
|
+
# Jupyter Notebook
|
|
58
|
+
lib/
|
|
59
|
+
lib64/
|
|
60
|
+
local_settings.py
|
|
61
|
+
*.log
|
|
62
|
+
# LSP build artifacts
|
|
63
|
+
*.manifest
|
|
64
|
+
MANIFEST
|
|
65
|
+
# mkdocs documentation
|
|
66
|
+
*.mo
|
|
67
|
+
# mypy
|
|
68
|
+
.mypy_cache/
|
|
69
|
+
nosetests.xml
|
|
70
|
+
.nox/
|
|
71
|
+
# Nuitka build
|
|
72
|
+
*.onefile.exe
|
|
73
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
74
|
+
# Others
|
|
75
|
+
parts/
|
|
76
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
77
|
+
pine-worker/bun.lockb
|
|
78
|
+
pine-worker/dist/
|
|
79
|
+
# pine-worker (extra tool)
|
|
80
|
+
pine-worker/*.log
|
|
81
|
+
pine-worker/node_modules/
|
|
82
|
+
pine-worker/.wrangler/
|
|
83
|
+
# AXIS charting UI was extracted to https://github.com/jango-blockchained/axis
|
|
84
|
+
# (do not re-add a local frontend/ tree here)
|
|
85
|
+
pip-delete-this-directory.txt
|
|
86
|
+
pip-log.txt
|
|
87
|
+
*.pot
|
|
88
|
+
profile_default/
|
|
89
|
+
.pybuilder/
|
|
90
|
+
# PyBuilder
|
|
91
|
+
__pycache__/
|
|
92
|
+
# PyCharm
|
|
93
|
+
*.py[cod]
|
|
94
|
+
*.py,cover
|
|
95
|
+
# PyInstaller
|
|
96
|
+
__pypackages__/
|
|
97
|
+
.pypirc
|
|
98
|
+
.pyre/
|
|
99
|
+
# Pyre type checker
|
|
100
|
+
.pytest_cache/
|
|
101
|
+
.Python
|
|
102
|
+
.pytype/
|
|
103
|
+
# pytype static type analyzer
|
|
104
|
+
.ropeproject
|
|
105
|
+
# Rope project settings
|
|
106
|
+
# ruff
|
|
107
|
+
.ruff_cache/
|
|
108
|
+
# SageMath parsed files
|
|
109
|
+
*.sage.py
|
|
110
|
+
.scrapy
|
|
111
|
+
# Scrapy stuff:
|
|
112
|
+
!scripts/
|
|
113
|
+
scripts/build/.metadata.key
|
|
114
|
+
sdist/
|
|
115
|
+
share/python-wheels/
|
|
116
|
+
/site
|
|
117
|
+
*.so
|
|
118
|
+
*.spec
|
|
119
|
+
# Sphinx documentation
|
|
120
|
+
.spyderproject
|
|
121
|
+
# Spyder project settings
|
|
122
|
+
.spyproject
|
|
123
|
+
*.stats
|
|
124
|
+
target/
|
|
125
|
+
.tox/
|
|
126
|
+
# Translations
|
|
127
|
+
# Unit test / coverage reports
|
|
128
|
+
# Usually these files are written by a python script from a template
|
|
129
|
+
var/
|
|
130
|
+
.venv
|
|
131
|
+
venv/
|
|
132
|
+
venv.bak/
|
|
133
|
+
vscode-extension/node_modules/
|
|
134
|
+
vscode-extension/out/
|
|
135
|
+
.webassets-cache
|
|
136
|
+
wheels/
|
|
137
|
+
|
|
138
|
+
# Bun
|
|
139
|
+
node_modules/
|
|
140
|
+
bun.lockb
|
|
141
|
+
|
|
142
|
+
# Local private notes / agent sessions / tooling
|
|
143
|
+
.private/
|
|
144
|
+
.grok/
|
|
145
|
+
.opencode/
|
|
146
|
+
|
|
147
|
+
# Local runtime / compose data
|
|
148
|
+
logs/
|
|
149
|
+
data/
|
|
150
|
+
*.log
|
|
151
|
+
|
|
152
|
+
# Docker / compose local overrides
|
|
153
|
+
.env.local
|
|
154
|
+
.env.*.local
|
|
155
|
+
|
|
156
|
+
# VS Code extension packages (build artifacts)
|
|
157
|
+
*.vsix
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Compact guide for AI agents working in the **pyne** repo (package name
|
|
4
|
+
`pynescript`). Read this first to avoid common mistakes; dive into
|
|
5
|
+
`.opencode/context/project-intelligence/` for deeper reference.
|
|
6
|
+
|
|
7
|
+
## What this is
|
|
8
|
+
|
|
9
|
+
Python toolchain for TradingView Pine Script: parser, AST, evaluator, linter,
|
|
10
|
+
LSP server, Flask Pro API, VS Code extension. Source under `src/pynescript/`
|
|
11
|
+
(src-layout package), ANTLR4 grammar, ASDL-generated AST nodes, Nuitka-compiled
|
|
12
|
+
LSP binary, optional cloud backend.
|
|
13
|
+
|
|
14
|
+
**AXIS** (charting PWA) is **not** in this repo — see
|
|
15
|
+
[jango-blockchained/axis](https://github.com/jango-blockchained/axis)
|
|
16
|
+
(`/home/jango/Git/axis`). **Do not recreate `frontend/`.**
|
|
17
|
+
|
|
18
|
+
## Quick Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
make install # pip install -e ".[lsp]"
|
|
22
|
+
make test # pytest tests/ -v --tb=short (all tests)
|
|
23
|
+
make test-lsp # tests/test_langserver.py + test_lsp_features.py
|
|
24
|
+
make test-backend # tests/test_backend.py (needs backend/requirements.txt)
|
|
25
|
+
make lint # ruff check src/ tests/ backend/
|
|
26
|
+
make fmt # ruff format
|
|
27
|
+
make run # python -m backend.app (Flask Pro API :5002)
|
|
28
|
+
make run-lsp # python -m pynescript.langserver (LSP)
|
|
29
|
+
make build-check # python scripts/build/compile.py --check (fast, no compile)
|
|
30
|
+
|
|
31
|
+
# Docker (multi-target Dockerfile)
|
|
32
|
+
make docker-build # buildx bake production api image
|
|
33
|
+
make docker-build-cli # buildx bake CLI image (pynescript)
|
|
34
|
+
make docker-cli ARGS="check script.pine" # compose profile cli
|
|
35
|
+
make docker-up # compose api-dev on :5002 (source mounts)
|
|
36
|
+
make docker-up-full # api + redis profile only (not LSP)
|
|
37
|
+
make docker-prod # requires ADMIN_TOKEN; gunicorn, no source mounts
|
|
38
|
+
make docker-smoke # curl health on :5002
|
|
39
|
+
|
|
40
|
+
# Packages / Nuitka
|
|
41
|
+
make package # sdist + wheel (hoox-pyne)
|
|
42
|
+
make build # Nuitka LSP binary
|
|
43
|
+
make build-cli # Nuitka CLI binary
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Hatch: `hatch run test:test`, `hatch run lint:style`, `hatch run lint:typing`.
|
|
47
|
+
See `.opencode/context/project-intelligence/lookup/commands.md`.
|
|
48
|
+
|
|
49
|
+
## Hard Constraints
|
|
50
|
+
|
|
51
|
+
- **Edit only `resource/` for the grammar**; never touch
|
|
52
|
+
`src/pynescript/ast/grammar/antlr4/generated/` or
|
|
53
|
+
`src/pynescript/ast/grammar/asdl/generated/` — both are regenerated artifacts.
|
|
54
|
+
See `.opencode/context/project-intelligence/guides/grammar-changes.md`.
|
|
55
|
+
- **No stale backups in `src/`.** `builder.py.bak` and
|
|
56
|
+
`evaluator/builtins/technical_refactored.py` were removed in 2026-07; do not
|
|
57
|
+
recreate them — the live `builder.py` and `technical.py` are the only sources
|
|
58
|
+
of truth.
|
|
59
|
+
- **`from __future__ import annotations` is required** on every new Python file
|
|
60
|
+
(enforced by ruff isort `required-imports`).
|
|
61
|
+
- **Console scripts are separate**: `pynescript` (Click) and `pynescript-lsp`
|
|
62
|
+
(pygls). Don't conflate them.
|
|
63
|
+
- **`tests/conftest.py` parametrizes `pinescript_filepath` over every `*.pine`
|
|
64
|
+
in `tests/data/builtin_scripts/`** — a new test using this fixture runs ~500
|
|
65
|
+
cases. Use `--example-scripts-dir=...` to narrow. Prefer unit tests that do
|
|
66
|
+
**not** use this fixture in CI-critical paths.
|
|
67
|
+
- **Generated `builtin_metadata.json` is built from code**, not hand-edited.
|
|
68
|
+
Re-run `python scripts/generate_builtin_metadata.py` after adding builtins,
|
|
69
|
+
then re-encrypt (see CRYPTO_KEY below).
|
|
70
|
+
|
|
71
|
+
## CRYPTO_KEY / encrypted LSP metadata (important)
|
|
72
|
+
|
|
73
|
+
Nuitka LSP binaries ship `builtin_metadata.json.enc` (Fernet). The plaintext
|
|
74
|
+
JSON stays git-tracked for dev; the loader prefers plaintext when present.
|
|
75
|
+
|
|
76
|
+
| Artifact | Path | Tracked? |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| Plaintext metadata | `src/pynescript/langserver/providers/builtin_metadata.json` | yes |
|
|
79
|
+
| Encrypted blob | `…/builtin_metadata.json.enc` | yes |
|
|
80
|
+
| Integrity (16-char SHA-256 prefix) | `…/builtin_metadata.json.sha256` | yes |
|
|
81
|
+
| Fernet key | `scripts/build/.metadata.key` | **no** (gitignored) |
|
|
82
|
+
|
|
83
|
+
### Key resolution (stable / reproducible)
|
|
84
|
+
|
|
85
|
+
`scripts/build/compile.py` and `ci_build.py` resolve the key in this order:
|
|
86
|
+
|
|
87
|
+
1. `CRYPTO_KEY` env
|
|
88
|
+
2. `PYNESCRIPT_METADATA_KEY` env (same material; also used at runtime decrypt)
|
|
89
|
+
3. `METADATA_KEY` env
|
|
90
|
+
4. Existing `scripts/build/.metadata.key`
|
|
91
|
+
5. Generate once and write `.metadata.key` (local first-time only)
|
|
92
|
+
|
|
93
|
+
**Always use the same key in CI** so rebuilds of the same JSON produce a
|
|
94
|
+
reproducible `.enc` (Fernet ciphertext still varies with IV, but the *key* must
|
|
95
|
+
not rotate accidentally).
|
|
96
|
+
|
|
97
|
+
### Local setup
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pip install cryptography
|
|
101
|
+
|
|
102
|
+
# If no key yet: encrypt once (writes scripts/build/.metadata.key)
|
|
103
|
+
python -c "from scripts.build.compile import encrypt_metadata; encrypt_metadata()"
|
|
104
|
+
|
|
105
|
+
# After changing builtins:
|
|
106
|
+
python scripts/generate_builtin_metadata.py
|
|
107
|
+
python -c "from scripts.build.compile import encrypt_metadata; encrypt_metadata()"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### GitHub / Cloud Build secrets
|
|
111
|
+
|
|
112
|
+
| Store | Name | Used as |
|
|
113
|
+
| --- | --- | --- |
|
|
114
|
+
| GitHub Actions | `secrets.METADATA_KEY` | `CRYPTO_KEY: ${{ secrets.METADATA_KEY }}` in `release.yml` |
|
|
115
|
+
| GitHub Actions | `secrets.CRYPTO_KEY` | optional alias (same value) |
|
|
116
|
+
| Cloud Build | substitution `_METADATA_KEY` | `CRYPTO_KEY=${_METADATA_KEY}` in `cloudbuild.yaml` |
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# After local .metadata.key exists:
|
|
120
|
+
gh secret set METADATA_KEY -R hoox-sh/pyne < scripts/build/.metadata.key
|
|
121
|
+
gh secret set CRYPTO_KEY -R hoox-sh/pyne < scripts/build/.metadata.key
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Never commit `.metadata.key`. If lost: generate a new Fernet key, update both
|
|
125
|
+
GitHub secrets + Cloud Build substitution, re-encrypt, commit new `.enc` +
|
|
126
|
+
`.sha256`.
|
|
127
|
+
|
|
128
|
+
Full detail: `scripts/build/README.md`.
|
|
129
|
+
|
|
130
|
+
## Docker / Pro API (ops)
|
|
131
|
+
|
|
132
|
+
Multi-target `Dockerfile` (default Cloud Run / bake target = **`api`**):
|
|
133
|
+
|
|
134
|
+
| Target | Process | Use |
|
|
135
|
+
| --- | --- | --- |
|
|
136
|
+
| `api` | gunicorn via `docker/entrypoint-api.sh` | production / Cloud Run |
|
|
137
|
+
| `api-dev` | `python -m backend.app` | local compose (source mounts) |
|
|
138
|
+
| `lsp` | stdio language server | `docker compose run --rm lsp` only |
|
|
139
|
+
|
|
140
|
+
Supporting files: `docker-bake.hcl`, `docker-compose.yml`,
|
|
141
|
+
`docker-compose.prod.yml`, `.dockerignore`, `.env.example`.
|
|
142
|
+
|
|
143
|
+
### Critical compose footguns
|
|
144
|
+
|
|
145
|
+
- **Prod volume merge:** Compose merges volumes by mount *target*. Prod overlay
|
|
146
|
+
**must** use `volumes: !override` (only `api_data:/data`) or host
|
|
147
|
+
`./src` + `./backend` binds survive and `PYTHONPATH` prefers host code.
|
|
148
|
+
- **`make docker-up-full`** starts **redis only** (not detached stdio LSP).
|
|
149
|
+
Use `docker compose --profile lsp run --rm lsp` for LSP.
|
|
150
|
+
- **Host port** default `5002` → container `8080` (`API_PORT`).
|
|
151
|
+
|
|
152
|
+
### Auth & key store
|
|
153
|
+
|
|
154
|
+
- `POST /auth/create_key` is **fail-closed**: requires non-empty `ADMIN_TOKEN`
|
|
155
|
+
env **and** matching `X-Admin-Token` (or Bearer / AdminToken). Unset token →
|
|
156
|
+
403. `make docker-prod` refuses to start without `ADMIN_TOKEN`.
|
|
157
|
+
- `STORE_BACKEND`: `json` (default, single-process) | `sqlite` (multi-worker
|
|
158
|
+
shared volume) | `redis` (multi-replica; needs `REDIS_URL`).
|
|
159
|
+
Prod compose defaults to **`sqlite`** on `/data/api_keys.db`.
|
|
160
|
+
- JSON store may hold raw keys (dev only). SQLite/Redis stores are **hash-only**.
|
|
161
|
+
|
|
162
|
+
Tests set `ADMIN_TOKEN` via monkeypatch; local `make run` needs
|
|
163
|
+
`export ADMIN_TOKEN=…` to mint keys.
|
|
164
|
+
|
|
165
|
+
## Build / Release / CI
|
|
166
|
+
|
|
167
|
+
### Package
|
|
168
|
+
|
|
169
|
+
- PyPI **distribution** name: **`pyne`** (import / console scripts stay
|
|
170
|
+
**`pynescript`** / `pynescript-lsp`). Upstream PyPI `pynescript` is elbakramer.
|
|
171
|
+
- Product/repo: **pyne** · install: `pip install "hoox-pyne[lsp]"`.
|
|
172
|
+
- Version: `src/pynescript/__about__.py` (exported as `pynescript.__version__`).
|
|
173
|
+
- Optional extras: `[lsp]`, `[pro]`, `[compile]`, `[data]` / `[datafeed]`.
|
|
174
|
+
- Publish: tag `vX.Y.Z` → `.github/workflows/publish.yml` (Trusted Publishing
|
|
175
|
+
env `pypi`). Dry-run via workflow_dispatch. See `CONTRIBUTING.md`.
|
|
176
|
+
|
|
177
|
+
### Nuitka / VSIX
|
|
178
|
+
|
|
179
|
+
- `make build` → `dist/lsp/pynescript-lsp` + `dist/vsix/…`.
|
|
180
|
+
- `make build-check` → import check only (~30s).
|
|
181
|
+
- Anaconda: `conda install libpython-static` or keep `--static-libpython=no`.
|
|
182
|
+
- VS Code extension: `vscode-extension/` (Node 22). Version should track package
|
|
183
|
+
when shipping together. `make build-vscode`.
|
|
184
|
+
|
|
185
|
+
### GitHub Actions (`.github/workflows/`)
|
|
186
|
+
|
|
187
|
+
| Workflow | Role |
|
|
188
|
+
| --- | --- |
|
|
189
|
+
| `ci.yml` | lint, test matrix 3.10–3.13, package build, Docker `api` smoke, VSIX |
|
|
190
|
+
| `release.yml` | Nuitka LSP binaries + VSIX on `v*` tags (`CRYPTO_KEY`) |
|
|
191
|
+
| `publish.yml` | PyPI upload on `v*` tags |
|
|
192
|
+
|
|
193
|
+
**No AXIS/frontend jobs in this repo.** PWA/e2e live in the `axis` repo.
|
|
194
|
+
|
|
195
|
+
CI unit path intentionally skips huge corpus-parametrized tests
|
|
196
|
+
(`test_parse_and_unparse`); run those locally with `make test`.
|
|
197
|
+
|
|
198
|
+
### Cloud Build
|
|
199
|
+
|
|
200
|
+
`cloudbuild.yaml` builds `--target=api` and deploys by `$COMMIT_SHA`. Pass
|
|
201
|
+
`_METADATA_KEY` for LSP binary encryption. Cloud Run defaults (memory/workers)
|
|
202
|
+
are tight for numpy/numba/matplotlib — raise memory / lower workers before
|
|
203
|
+
assuming OOM is an app bug.
|
|
204
|
+
|
|
205
|
+
## Codebase Entry Points
|
|
206
|
+
|
|
207
|
+
| Want to ... | Look at |
|
|
208
|
+
| --- | --- |
|
|
209
|
+
| Parse / unparse Pine Script | `src/pynescript/ast/helper.py` |
|
|
210
|
+
| Add a new builtin (`ta.*`, `math.*`, …) | `src/pynescript/ast/evaluator/builtins/<ns>.py` + `scripts/generate_builtin_metadata.py` |
|
|
211
|
+
| Add an LSP feature | `src/pynescript/langserver/features/<name>.py` + `server.py` |
|
|
212
|
+
| Wire inlay hints / hover / etc. | `src/pynescript/langserver/features/inlay_hints.py` is a worked example |
|
|
213
|
+
| Semantic tokens | `features/semantic_tokens.py` + legend in `langserver/config.py` |
|
|
214
|
+
| Add a CLI subcommand | `src/pynescript/__main__.py` (Click group) |
|
|
215
|
+
| Change the grammar | `src/pynescript/ast/grammar/antlr4/resource/*.g4`, then `hatch run lint:gen-parser` |
|
|
216
|
+
| Add a backend endpoint | `backend/api/` blueprints + `backend/app.py` |
|
|
217
|
+
| Auth / key store | `backend/middleware/auth.py` (+ `key_store_sqlite.py` / `key_store_redis.py`) |
|
|
218
|
+
| Work on the TS port | `pine-worker/` (extra tool; README + strategy-events plan) |
|
|
219
|
+
|
|
220
|
+
## LSP notes
|
|
221
|
+
|
|
222
|
+
- Server version comes from `pynescript.__about__.__version__` (not a hardcode).
|
|
223
|
+
- Advertise only **implemented** capabilities in `langserver/config.py`
|
|
224
|
+
(no signatureHelp/codeAction until handlers exist).
|
|
225
|
+
- Builtin metadata: ~870 entries after regenerate; load order prefers
|
|
226
|
+
plaintext over `.enc` in dev.
|
|
227
|
+
- Clients: VS Code extension (`vscode-extension/`), stdio `pynescript-lsp`,
|
|
228
|
+
AXIS may use HTTP LSP bridge endpoints on the Pro API.
|
|
229
|
+
|
|
230
|
+
## Pine v6 Grammar & Regeneration Notes (2026-07)
|
|
231
|
+
|
|
232
|
+
When adding v6 features that touch literals or syntax (multiline strings
|
|
233
|
+
`"""..."""` / `'''...'''`, etc.):
|
|
234
|
+
|
|
235
|
+
- The resource `PinescriptLexer.g4` may require **non-obvious quoting** for
|
|
236
|
+
triple-quoted fragments. Direct `"'''"` or `'"""'` literals inside fragment
|
|
237
|
+
rules can trigger ANTLR "quote came as a complete surprise" errors. Use
|
|
238
|
+
factored starters:
|
|
239
|
+
```g4
|
|
240
|
+
fragment TRIPLE_SQ_START: '\'' '\'' '\'';
|
|
241
|
+
fragment TRIPLE_SINGLE_QUOTED_STRING: TRIPLE_SQ_START ... TRIPLE_SQ_START;
|
|
242
|
+
```
|
|
243
|
+
- `generate.py` (and `hatch run lint:gen-parser`) hardcodes
|
|
244
|
+
`$(python -c 'sys.executable')/antlr4`. The `antlr4-cli` pip package often
|
|
245
|
+
lands in `~/.local/bin`. Use a temp dir + full path or `PATH` shim + manual
|
|
246
|
+
copy of `*Base.py`.
|
|
247
|
+
- Full regeneration can produce parser context classes whose accessor methods
|
|
248
|
+
differ from what `builder.py` expects. **Safe pattern**: edit only resource +
|
|
249
|
+
selectively copy the fresh `PinescriptLexer.py` (and update the copied
|
|
250
|
+
`LexerBase.py`). Leave the committed `PinescriptParser.py` (and visitors)
|
|
251
|
+
untouched unless you are prepared to also patch the builder.
|
|
252
|
+
- Always test with `from pynescript.ast.helper import parse, unparse` on a
|
|
253
|
+
minimal v6 snippet **before** the huge parametrized corpus.
|
|
254
|
+
- After success, update `docs/missing_features.md` and the grammar-changes guide.
|
|
255
|
+
|
|
256
|
+
See `.opencode/context/project-intelligence/guides/grammar-changes.md` and
|
|
257
|
+
`docs/missing_features.md`.
|
|
258
|
+
|
|
259
|
+
## Testing
|
|
260
|
+
|
|
261
|
+
- **Unit**: `tests/test_evaluator.py`, `tests/test_linter.py`,
|
|
262
|
+
`tests/test_parse_and_unparse.py` (latter is corpus-parametrized).
|
|
263
|
+
- **LSP unit**: `tests/test_lsp_features.py` — handlers + fake
|
|
264
|
+
`lsprotocol.types.*Params`.
|
|
265
|
+
- **LSP e2e**: `tests/test_langserver.py` — needs
|
|
266
|
+
`pip install -e ".[dev-lsp]" pytest-asyncio`.
|
|
267
|
+
- **Backend**: `tests/test_backend.py` — needs
|
|
268
|
+
`pip install -r backend/requirements.txt` (or `.[pro]`). Sets `ADMIN_TOKEN`
|
|
269
|
+
in fixtures.
|
|
270
|
+
- **Corpus**: `tests/data/builtin_scripts/*.pine`; `tests/data/library/` is
|
|
271
|
+
reference only.
|
|
272
|
+
- Coverage: `hatch run test:test-cov`. CI uploads codecov only on Python 3.13.
|
|
273
|
+
|
|
274
|
+
## Style
|
|
275
|
+
|
|
276
|
+
Ruff line length 120 (see `pyproject.toml`). Black target-version `py310`.
|
|
277
|
+
Mypy is strict-ish but exempts generated grammar modules,
|
|
278
|
+
`evaluator.builtins.*`, and `tests.*`. `from __future__ import annotations`
|
|
279
|
+
is mandatory.
|
|
280
|
+
|
|
281
|
+
`/build/` in `.gitignore` is **root-only** so `scripts/build/` stays trackable;
|
|
282
|
+
only `scripts/build/.metadata.key` is ignored.
|
|
283
|
+
|
|
284
|
+
## Sub-Skills
|
|
285
|
+
|
|
286
|
+
- **Brainstorm** before any non-trivial feature work.
|
|
287
|
+
- **TDD** when implementing features.
|
|
288
|
+
- **Verification before completion** — run `make test lint` (or the relevant
|
|
289
|
+
subset) and confirm output before claiming done.
|
|
290
|
+
|
|
291
|
+
## Where to Read More
|
|
292
|
+
|
|
293
|
+
- `.opencode/context/navigation.md` — full context tree map.
|
|
294
|
+
- `.opencode/context/project-intelligence/navigation.md` — internal docs.
|
|
295
|
+
- `.opencode/context/libraries/navigation.md` — pygls/antlr/click/Nuitka/lsprotocol.
|
|
296
|
+
- `.opencode/plans/pynescript-lsp-implementation.md` — LSP design doc.
|
|
297
|
+
- `scripts/build/README.md` — Nuitka + CRYPTO_KEY.
|
|
298
|
+
- `docs/pyne/devops/` — Docker / GCP / security (Mintlify product docs).
|
|
299
|
+
- `CONTRIBUTING.md` — hatch workflow + PyPI release steps.
|
|
300
|
+
- `CHANGELOG.md` — Keep a Changelog.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Sister Repos & websites
|
|
305
|
+
|
|
306
|
+
**Site:** [hoox.sh](https://hoox.sh) — marketing + product docs for the stack.
|
|
307
|
+
|
|
308
|
+
| Product | GitHub | Local path | Website |
|
|
309
|
+
|---|---|---|---|
|
|
310
|
+
| **HOOX** | [jango-blockchained/hoox](https://github.com/jango-blockchained/hoox) | `/home/jango/Git/hoox` | [hoox.sh](https://hoox.sh) · [docs.hoox.sh](https://docs.hoox.sh) |
|
|
311
|
+
| **PYNE** (this repo) | [hoox-sh/pyne](https://github.com/hoox-sh/pyne) | `/home/jango/Git/pynescript` | [hoox.sh/pyne](https://hoox.sh/pyne) · [docs](https://hoox.sh/pyne/docs) |
|
|
312
|
+
| **AXIS** | [jango-blockchained/axis](https://github.com/jango-blockchained/axis) | `/home/jango/Git/axis` | [hoox.sh/axis](https://hoox.sh/axis) · [docs](https://hoox.sh/axis/docs) |
|
|
313
|
+
|
|
314
|
+
Related:
|
|
315
|
+
|
|
316
|
+
| Repo | Path | Purpose |
|
|
317
|
+
|---|---|---|
|
|
318
|
+
| `hoox-landing-page` | `/home/jango/Git/hoox-landing-page` | Marketing site source for [hoox.sh](https://hoox.sh) |
|
|
319
|
+
| `pyne-worker` | `/home/jango/Git/pyne-worker` | Python CF Worker — edge eval (depends on `pynescript`) |
|
|
320
|
+
| `pine-worker` | `/home/jango/Git/pine-worker` | TypeScript CF Worker — Pine eval + trade events |
|
|
321
|
+
|
|
322
|
+
**Key dependency links:**
|
|
323
|
+
- AXIS UI → pyne Pro API (`make run` on `:5002`) or AXIS Worker
|
|
324
|
+
- `pyne-worker` → `pynescript` package (editable install)
|
|
325
|
+
- HOOX trade path can consume Pine signals from edge workers
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
https://hoox.sh
|
|
329
|
+
┌──────────────┼──────────────┐
|
|
330
|
+
▼ ▼ ▼
|
|
331
|
+
HOOX PYNE AXIS
|
|
332
|
+
(edge execution) (this repo) (charting UI)
|
|
333
|
+
│ │ │
|
|
334
|
+
└──────────────┴──────────────┘
|
|
335
|
+
```
|