algocode-agent 0.1.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.
- algocode_agent-0.1.0/.github/workflows/publish.yml +69 -0
- algocode_agent-0.1.0/.github/workflows/python-publish.yml +70 -0
- algocode_agent-0.1.0/.gitignore +15 -0
- algocode_agent-0.1.0/LICENSE +21 -0
- algocode_agent-0.1.0/PKG-INFO +678 -0
- algocode_agent-0.1.0/README.md +643 -0
- algocode_agent-0.1.0/create_outline_icon.py +227 -0
- algocode_agent-0.1.0/docker/sandbox.Dockerfile +11 -0
- algocode_agent-0.1.0/docs/picture/algocode_icon.jpg +0 -0
- algocode_agent-0.1.0/mian.py +0 -0
- algocode_agent-0.1.0/process_icon.py +75 -0
- algocode_agent-0.1.0/pyproject.toml +78 -0
- algocode_agent-0.1.0/src/algocode/__init__.py +5 -0
- algocode_agent-0.1.0/src/algocode/__main__.py +4 -0
- algocode_agent-0.1.0/src/algocode/acceptance/__init__.py +12 -0
- algocode_agent-0.1.0/src/algocode/acceptance/matrix.py +69 -0
- algocode_agent-0.1.0/src/algocode/acceptance/probe.py +206 -0
- algocode_agent-0.1.0/src/algocode/acceptance/service.py +244 -0
- algocode_agent-0.1.0/src/algocode/acceptance/types.py +58 -0
- algocode_agent-0.1.0/src/algocode/application/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/application/services/__init__.py +25 -0
- algocode_agent-0.1.0/src/algocode/application/services/apply_service.py +177 -0
- algocode_agent-0.1.0/src/algocode/application/services/baseline_service.py +243 -0
- algocode_agent-0.1.0/src/algocode/application/services/benchmark_service.py +628 -0
- algocode_agent-0.1.0/src/algocode/application/services/candidate_service.py +169 -0
- algocode_agent-0.1.0/src/algocode/application/services/contract_service.py +619 -0
- algocode_agent-0.1.0/src/algocode/application/services/correctness_service.py +387 -0
- algocode_agent-0.1.0/src/algocode/application/services/decision_service.py +228 -0
- algocode_agent-0.1.0/src/algocode/application/services/project_bootstrap_service.py +891 -0
- algocode_agent-0.1.0/src/algocode/application/services/project_service.py +125 -0
- algocode_agent-0.1.0/src/algocode/application/services/project_state.py +219 -0
- algocode_agent-0.1.0/src/algocode/application/services/report_service.py +323 -0
- algocode_agent-0.1.0/src/algocode/application/services/task_service.py +77 -0
- algocode_agent-0.1.0/src/algocode/approval/service.py +77 -0
- algocode_agent-0.1.0/src/algocode/approval/types.py +29 -0
- algocode_agent-0.1.0/src/algocode/benchmark/__init__.py +17 -0
- algocode_agent-0.1.0/src/algocode/benchmark/engine.py +214 -0
- algocode_agent-0.1.0/src/algocode/benchmark/environment.py +105 -0
- algocode_agent-0.1.0/src/algocode/benchmark/spec.py +85 -0
- algocode_agent-0.1.0/src/algocode/benchmark/types.py +128 -0
- algocode_agent-0.1.0/src/algocode/bootstrap.py +268 -0
- algocode_agent-0.1.0/src/algocode/cli/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/accept.py +72 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/api.py +220 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/apply.py +94 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/baseline.py +100 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/benchmark.py +227 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/candidate.py +155 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/correctness.py +197 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/diff.py +73 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/doctor.py +149 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/eval.py +115 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/experiment.py +151 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/gate.py +61 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/init.py +133 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/model.py +115 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/optimize.py +252 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/provider_test.py +90 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/report.py +59 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/retry.py +107 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/review.py +154 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/status.py +136 -0
- algocode_agent-0.1.0/src/algocode/cli/commands/task.py +146 -0
- algocode_agent-0.1.0/src/algocode/cli/context.py +86 -0
- algocode_agent-0.1.0/src/algocode/cli/main.py +79 -0
- algocode_agent-0.1.0/src/algocode/cli/output.py +70 -0
- algocode_agent-0.1.0/src/algocode/config/__init__.py +6 -0
- algocode_agent-0.1.0/src/algocode/config/global_file.py +54 -0
- algocode_agent-0.1.0/src/algocode/config/loader.py +181 -0
- algocode_agent-0.1.0/src/algocode/config/model.py +193 -0
- algocode_agent-0.1.0/src/algocode/context/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/context/builder.py +410 -0
- algocode_agent-0.1.0/src/algocode/context/estimator.py +25 -0
- algocode_agent-0.1.0/src/algocode/context/facts.py +37 -0
- algocode_agent-0.1.0/src/algocode/context/types.py +158 -0
- algocode_agent-0.1.0/src/algocode/correctness/__init__.py +6 -0
- algocode_agent-0.1.0/src/algocode/correctness/engine.py +452 -0
- algocode_agent-0.1.0/src/algocode/correctness/protected.py +47 -0
- algocode_agent-0.1.0/src/algocode/correctness/spec.py +108 -0
- algocode_agent-0.1.0/src/algocode/correctness/types.py +45 -0
- algocode_agent-0.1.0/src/algocode/domain/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/domain/commands/__init__.py +19 -0
- algocode_agent-0.1.0/src/algocode/domain/errors/__init__.py +70 -0
- algocode_agent-0.1.0/src/algocode/domain/events/__init__.py +5 -0
- algocode_agent-0.1.0/src/algocode/domain/events/envelope.py +67 -0
- algocode_agent-0.1.0/src/algocode/domain/model/__init__.py +76 -0
- algocode_agent-0.1.0/src/algocode/domain/model/entities.py +151 -0
- algocode_agent-0.1.0/src/algocode/domain/model/enums.py +119 -0
- algocode_agent-0.1.0/src/algocode/domain/model/ids.py +36 -0
- algocode_agent-0.1.0/src/algocode/domain/model/values.py +18 -0
- algocode_agent-0.1.0/src/algocode/eval/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/eval/harness.py +377 -0
- algocode_agent-0.1.0/src/algocode/eval/provider.py +135 -0
- algocode_agent-0.1.0/src/algocode/eval/service.py +209 -0
- algocode_agent-0.1.0/src/algocode/eval/suites.py +121 -0
- algocode_agent-0.1.0/src/algocode/eval/types.py +76 -0
- algocode_agent-0.1.0/src/algocode/languages/__init__.py +7 -0
- algocode_agent-0.1.0/src/algocode/languages/cpp.py +288 -0
- algocode_agent-0.1.0/src/algocode/languages/discovery.py +29 -0
- algocode_agent-0.1.0/src/algocode/languages/python.py +94 -0
- algocode_agent-0.1.0/src/algocode/languages/registry.py +60 -0
- algocode_agent-0.1.0/src/algocode/languages/runner.py +68 -0
- algocode_agent-0.1.0/src/algocode/languages/types.py +88 -0
- algocode_agent-0.1.0/src/algocode/observability/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/policy/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/policy/engine.py +111 -0
- algocode_agent-0.1.0/src/algocode/policy/types.py +44 -0
- algocode_agent-0.1.0/src/algocode/ports/__init__.py +22 -0
- algocode_agent-0.1.0/src/algocode/ports/artifact_store.py +22 -0
- algocode_agent-0.1.0/src/algocode/ports/clock.py +12 -0
- algocode_agent-0.1.0/src/algocode/ports/event_store.py +23 -0
- algocode_agent-0.1.0/src/algocode/ports/language.py +30 -0
- algocode_agent-0.1.0/src/algocode/ports/policy.py +7 -0
- algocode_agent-0.1.0/src/algocode/ports/provider.py +12 -0
- algocode_agent-0.1.0/src/algocode/ports/resource.py +7 -0
- algocode_agent-0.1.0/src/algocode/ports/workspace.py +19 -0
- algocode_agent-0.1.0/src/algocode/project_layout.py +135 -0
- algocode_agent-0.1.0/src/algocode/providers/__init__.py +36 -0
- algocode_agent-0.1.0/src/algocode/providers/anthropic.py +264 -0
- algocode_agent-0.1.0/src/algocode/providers/errors.py +58 -0
- algocode_agent-0.1.0/src/algocode/providers/factory.py +86 -0
- algocode_agent-0.1.0/src/algocode/providers/fake.py +148 -0
- algocode_agent-0.1.0/src/algocode/providers/openai_compatible.py +353 -0
- algocode_agent-0.1.0/src/algocode/providers/types.py +101 -0
- algocode_agent-0.1.0/src/algocode/report/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/resources/__init__.py +6 -0
- algocode_agent-0.1.0/src/algocode/resources/local.py +235 -0
- algocode_agent-0.1.0/src/algocode/resources/types.py +35 -0
- algocode_agent-0.1.0/src/algocode/runtime/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/runtime/agent.py +2238 -0
- algocode_agent-0.1.0/src/algocode/runtime/analysis.py +187 -0
- algocode_agent-0.1.0/src/algocode/runtime/gates.py +69 -0
- algocode_agent-0.1.0/src/algocode/runtime/locks.py +61 -0
- algocode_agent-0.1.0/src/algocode/runtime/model_log.py +265 -0
- algocode_agent-0.1.0/src/algocode/runtime/optimization_record.py +332 -0
- algocode_agent-0.1.0/src/algocode/runtime/planning.py +73 -0
- algocode_agent-0.1.0/src/algocode/runtime/repair_memory.py +195 -0
- algocode_agent-0.1.0/src/algocode/runtime/task_lock.py +61 -0
- algocode_agent-0.1.0/src/algocode/sandbox/local.py +71 -0
- algocode_agent-0.1.0/src/algocode/sandbox/runner.py +393 -0
- algocode_agent-0.1.0/src/algocode/security/__init__.py +6 -0
- algocode_agent-0.1.0/src/algocode/security/credentials.py +75 -0
- algocode_agent-0.1.0/src/algocode/security/redaction.py +83 -0
- algocode_agent-0.1.0/src/algocode/storage/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/storage/artifacts/__init__.py +5 -0
- algocode_agent-0.1.0/src/algocode/storage/artifacts/file_artifact_store.py +90 -0
- algocode_agent-0.1.0/src/algocode/storage/events/__init__.py +5 -0
- algocode_agent-0.1.0/src/algocode/storage/events/sqlite_event_store.py +135 -0
- algocode_agent-0.1.0/src/algocode/storage/paths.py +27 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/__init__.py +5 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/approval_store.py +65 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/database.py +51 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/migrations.py +298 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/__init__.py +12 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/baseline_projection.py +137 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/benchmark_projection.py +210 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/candidate_projection.py +177 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/correctness_projection.py +148 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/decision_projection.py +95 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/project_projection.py +84 -0
- algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/task_projection.py +194 -0
- algocode_agent-0.1.0/src/algocode/structured_output.py +153 -0
- algocode_agent-0.1.0/src/algocode/tools/__init__.py +26 -0
- algocode_agent-0.1.0/src/algocode/tools/builtins/__init__.py +1 -0
- algocode_agent-0.1.0/src/algocode/tools/builtins/actions.py +707 -0
- algocode_agent-0.1.0/src/algocode/tools/builtins/filesystem.py +459 -0
- algocode_agent-0.1.0/src/algocode/tools/registry.py +201 -0
- algocode_agent-0.1.0/src/algocode/tools/types.py +57 -0
- algocode_agent-0.1.0/src/algocode/workspace/__init__.py +12 -0
- algocode_agent-0.1.0/src/algocode/workspace/git.py +470 -0
- algocode_agent-0.1.0/src/algocode/workspace/types.py +31 -0
- algocode_agent-0.1.0/tests/__init__.py +1 -0
- algocode_agent-0.1.0/tests/contract/__init__.py +1 -0
- algocode_agent-0.1.0/tests/contract/test_artifact_store.py +42 -0
- algocode_agent-0.1.0/tests/contract/test_event_store.py +81 -0
- algocode_agent-0.1.0/tests/integration/__init__.py +1 -0
- algocode_agent-0.1.0/tests/integration/test_acceptance_gate.py +32 -0
- algocode_agent-0.1.0/tests/integration/test_agent_runtime.py +1038 -0
- algocode_agent-0.1.0/tests/integration/test_baseline_service.py +76 -0
- algocode_agent-0.1.0/tests/integration/test_benchmark_service.py +129 -0
- algocode_agent-0.1.0/tests/integration/test_cli_api_model.py +131 -0
- algocode_agent-0.1.0/tests/integration/test_cli_benchmark.py +129 -0
- algocode_agent-0.1.0/tests/integration/test_cli_contract.py +46 -0
- algocode_agent-0.1.0/tests/integration/test_cli_doctor.py +30 -0
- algocode_agent-0.1.0/tests/integration/test_cli_eval.py +36 -0
- algocode_agent-0.1.0/tests/integration/test_cli_experiment.py +92 -0
- algocode_agent-0.1.0/tests/integration/test_cli_init_baseline.py +162 -0
- algocode_agent-0.1.0/tests/integration/test_cli_optimize.py +162 -0
- algocode_agent-0.1.0/tests/integration/test_cli_report_apply.py +230 -0
- algocode_agent-0.1.0/tests/integration/test_cli_task.py +141 -0
- algocode_agent-0.1.0/tests/integration/test_correctness_service.py +107 -0
- algocode_agent-0.1.0/tests/integration/test_docker_sandbox.py +82 -0
- algocode_agent-0.1.0/tests/integration/test_e2e_full.py +311 -0
- algocode_agent-0.1.0/tests/integration/test_eval_service.py +45 -0
- algocode_agent-0.1.0/tests/integration/test_git_workspace.py +84 -0
- algocode_agent-0.1.0/tests/integration/test_project_bootstrap.py +231 -0
- algocode_agent-0.1.0/tests/integration/test_report_apply.py +127 -0
- algocode_agent-0.1.0/tests/integration/test_report_failure_evidence.py +77 -0
- algocode_agent-0.1.0/tests/integration/test_secret_redaction.py +85 -0
- algocode_agent-0.1.0/tests/integration/test_tool_actions.py +191 -0
- algocode_agent-0.1.0/tests/integration/test_tool_security.py +105 -0
- algocode_agent-0.1.0/tests/support/__init__.py +1 -0
- algocode_agent-0.1.0/tests/support/git.py +33 -0
- algocode_agent-0.1.0/tests/support/mock_openai.py +102 -0
- algocode_agent-0.1.0/tests/unit/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/acceptance/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/acceptance/test_matrix.py +23 -0
- algocode_agent-0.1.0/tests/unit/application/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/application/test_decision_policy.py +62 -0
- algocode_agent-0.1.0/tests/unit/approval/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/approval/test_service.py +66 -0
- algocode_agent-0.1.0/tests/unit/benchmark/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/benchmark/test_engine.py +79 -0
- algocode_agent-0.1.0/tests/unit/benchmark/test_environment.py +25 -0
- algocode_agent-0.1.0/tests/unit/benchmark/test_locks.py +31 -0
- algocode_agent-0.1.0/tests/unit/benchmark/test_spec.py +63 -0
- algocode_agent-0.1.0/tests/unit/config/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/config/test_loader.py +222 -0
- algocode_agent-0.1.0/tests/unit/context/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/context/test_builder.py +135 -0
- algocode_agent-0.1.0/tests/unit/correctness/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/correctness/test_engine.py +151 -0
- algocode_agent-0.1.0/tests/unit/correctness/test_protected.py +25 -0
- algocode_agent-0.1.0/tests/unit/correctness/test_spec.py +57 -0
- algocode_agent-0.1.0/tests/unit/domain/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/domain/test_ids.py +28 -0
- algocode_agent-0.1.0/tests/unit/domain/test_models.py +35 -0
- algocode_agent-0.1.0/tests/unit/languages/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/languages/test_adapters.py +54 -0
- algocode_agent-0.1.0/tests/unit/policy/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/policy/test_engine.py +51 -0
- algocode_agent-0.1.0/tests/unit/providers/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/providers/test_anthropic.py +93 -0
- algocode_agent-0.1.0/tests/unit/providers/test_fake.py +73 -0
- algocode_agent-0.1.0/tests/unit/providers/test_openai_compatible.py +254 -0
- algocode_agent-0.1.0/tests/unit/resources/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/resources/test_local.py +106 -0
- algocode_agent-0.1.0/tests/unit/runtime/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_analysis.py +56 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_contract_service.py +85 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_gates.py +144 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_model_log.py +83 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_optimization_record.py +61 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_planning.py +69 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_structured_output.py +46 -0
- algocode_agent-0.1.0/tests/unit/runtime/test_task_lock.py +27 -0
- algocode_agent-0.1.0/tests/unit/sandbox/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/sandbox/test_local.py +39 -0
- algocode_agent-0.1.0/tests/unit/sandbox/test_runner.py +69 -0
- algocode_agent-0.1.0/tests/unit/security/test_credentials.py +26 -0
- algocode_agent-0.1.0/tests/unit/test_doctor.py +32 -0
- algocode_agent-0.1.0/tests/unit/test_paths.py +39 -0
- algocode_agent-0.1.0/tests/unit/test_project_service.py +52 -0
- algocode_agent-0.1.0/tests/unit/test_task_service.py +72 -0
- algocode_agent-0.1.0/tests/unit/tools/__init__.py +1 -0
- algocode_agent-0.1.0/tests/unit/tools/test_registry.py +182 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: pypi-publish
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
name: Build distributions
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: Check out repository
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.11"
|
|
30
|
+
|
|
31
|
+
- name: Install build tooling
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade pip
|
|
34
|
+
python -m pip install "build>=1.2,<2" "twine>=6,<7"
|
|
35
|
+
|
|
36
|
+
- name: Build sdist and wheel
|
|
37
|
+
run: python -m build
|
|
38
|
+
|
|
39
|
+
- name: Validate distribution metadata
|
|
40
|
+
run: python -m twine check dist/*
|
|
41
|
+
|
|
42
|
+
- name: Upload distributions
|
|
43
|
+
uses: actions/upload-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: python-distributions
|
|
46
|
+
path: dist/*
|
|
47
|
+
if-no-files-found: error
|
|
48
|
+
|
|
49
|
+
publish:
|
|
50
|
+
name: Publish to PyPI
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
environment:
|
|
54
|
+
name: pypi
|
|
55
|
+
url: https://pypi.org/p/algocode-agent
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write
|
|
58
|
+
contents: read
|
|
59
|
+
steps:
|
|
60
|
+
- name: Download distributions
|
|
61
|
+
uses: actions/download-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: python-distributions
|
|
64
|
+
path: dist
|
|
65
|
+
|
|
66
|
+
- name: Publish distributions to PyPI
|
|
67
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
68
|
+
with:
|
|
69
|
+
packages-dir: dist
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release-build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.x"
|
|
28
|
+
|
|
29
|
+
- name: Build release distributions
|
|
30
|
+
run: |
|
|
31
|
+
# NOTE: put your own distribution build steps here.
|
|
32
|
+
python -m pip install build
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Upload distributions
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: release-dists
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
pypi-publish:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
needs:
|
|
44
|
+
- release-build
|
|
45
|
+
permissions:
|
|
46
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
47
|
+
id-token: write
|
|
48
|
+
|
|
49
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
50
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
51
|
+
environment:
|
|
52
|
+
name: pypi
|
|
53
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
54
|
+
# url: https://pypi.org/p/YOURPROJECT
|
|
55
|
+
#
|
|
56
|
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
|
|
57
|
+
# ALTERNATIVE: exactly, uncomment the following line instead:
|
|
58
|
+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
|
|
59
|
+
|
|
60
|
+
steps:
|
|
61
|
+
- name: Retrieve release distributions
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: release-dists
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish release distributions to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
69
|
+
with:
|
|
70
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Algocode Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|