klustra 0.2.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.
- klustra-0.2.0/.claude/hooks/format.sh +9 -0
- klustra-0.2.0/.claude/hooks/verify.sh +25 -0
- klustra-0.2.0/.claude/settings.json +25 -0
- klustra-0.2.0/.github/workflows/python-publish.yml +51 -0
- klustra-0.2.0/.gitignore +5 -0
- klustra-0.2.0/.python-version +1 -0
- klustra-0.2.0/.smoke_project/.klustra/state.json +11089 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/aluminium.conductor.md +28 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/antioxidant.package.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/approved.supplier.list.hv.cable.components.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/arkema.aluminium.pe.laminate.tape.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/aurubis.ag.copper.rod.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/bending.radii.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/borealis.visico.le4253.xlpe.compound.md +5 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.isolation.and.earthing.md +37 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.after_installation_testing.md +13 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.conductor_resistance_check.md +24 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.dc_vlf_withstand_testing.md +13 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.high_voltage_withstand_test.md +22 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.joint_resistance_measurement.md +7 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.partial_discharge_measurement.md +22 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.routine_testing.md +31 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.sheath_integrity_test.md +34 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/cable.testing.type_testing.md +17 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/company.specific.safety.procedures.md +7 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/control.centre.reporting.md +9 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/copper.conductor.md +5 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/default.cluster.l1.high-voltage-cable-systems.md +5 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/default.cluster.l1.hv-cable-safety-procedures.md +5 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/default.home.md +7 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/dow.chemical.hfda-4202.ec.xlpe.compound.md +15 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/electrical.treeing.md +7 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/exclusion.zone.for.cable.fault.md +37 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/exxonmobil.hdpe.compound.moisture.barrier.md +21 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/fault.re-energization.prohibition.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/high-voltage.cable.systems.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/iec.61936-1.md +63 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/iec.62067.md +88 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.cable.lubricant.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.cable.winch.md +34 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.direct.burial.md +38 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.duct.installation.md +35 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.joint.bay.dimensions.md +16 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.jointing.md +27 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.maximum.pulling.tension.md +32 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.minimum.bending.radius.md +15 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.prefabricated.joints.md +48 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.sand.bedding.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.temperature.md +15 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.trench.depth.md +17 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/installation.warning.tape.md +33 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/local.electrical.safety.regulations.md +28 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/metallic.sheath.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/nkt.cold-shrink.joints.66-170.kv.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/norsk.hydro.aluminium.rod.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/offshore.wind.farm.connections.md +19 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/outer.protective.jacket.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/peroxide.crosslinking.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/prysmian.pre-moulded.joints.terminations.md +9 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/safe.work.zone.with.barriers.md +22 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/safety.locks.and.tags.md +13 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/semi-conductive.screen.md +25 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/submarine.crossings.md +50 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/super.clean.xlpe.compound.md +97 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/triple.extrusion.process.md +21 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/underground.urban.networks.md +1 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/voltage.absence.verification.md +13 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/water.treeing.md +11 -0
- klustra-0.2.0/.smoke_project/.klustra/vault/xlpe.insulation.md +29 -0
- klustra-0.2.0/.smoke_project/corpus/cable_intro.md +18 -0
- klustra-0.2.0/.smoke_project/corpus/installation_guide.txt +23 -0
- klustra-0.2.0/.smoke_project/corpus/safety_standards.md +23 -0
- klustra-0.2.0/.smoke_project/corpus/supplier_list.txt +17 -0
- klustra-0.2.0/.smoke_project/corpus/testing_procedures.md +22 -0
- klustra-0.2.0/.smoke_project/corpus/xlpe_material.md +23 -0
- klustra-0.2.0/.smoke_project/klustra.toml +19 -0
- klustra-0.2.0/.smoke_project/vault_out/aluminium/conductor.md +53 -0
- klustra-0.2.0/.smoke_project/vault_out/antioxidant/package.md +23 -0
- klustra-0.2.0/.smoke_project/vault_out/approved/supplier/list/hv/cable/components.md +39 -0
- klustra-0.2.0/.smoke_project/vault_out/arkema/aluminium/pe/laminate/tape.md +23 -0
- klustra-0.2.0/.smoke_project/vault_out/aurubis/ag/copper/rod.md +24 -0
- klustra-0.2.0/.smoke_project/vault_out/bending/radii.md +23 -0
- klustra-0.2.0/.smoke_project/vault_out/borealis/visico/le4253/xlpe/compound.md +28 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/isolation/and/earthing.md +62 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/after_installation_testing.md +37 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/conductor_resistance_check.md +47 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/dc_vlf_withstand_testing.md +36 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/high_voltage_withstand_test.md +46 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/joint_resistance_measurement.md +29 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/partial_discharge_measurement.md +48 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/routine_testing.md +48 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/sheath_integrity_test.md +57 -0
- klustra-0.2.0/.smoke_project/vault_out/cable/testing/type_testing.md +44 -0
- klustra-0.2.0/.smoke_project/vault_out/company/specific/safety/procedures.md +30 -0
- klustra-0.2.0/.smoke_project/vault_out/control/centre/reporting.md +33 -0
- klustra-0.2.0/.smoke_project/vault_out/copper/conductor.md +27 -0
- klustra-0.2.0/.smoke_project/vault_out/default/cluster/l1/high-voltage-cable-systems.md +82 -0
- klustra-0.2.0/.smoke_project/vault_out/default/cluster/l1/hv-cable-safety-procedures.md +41 -0
- klustra-0.2.0/.smoke_project/vault_out/default/home.md +36 -0
- klustra-0.2.0/.smoke_project/vault_out/dow/chemical/hfda-4202/ec/xlpe/compound.md +38 -0
- klustra-0.2.0/.smoke_project/vault_out/electrical/treeing.md +30 -0
- klustra-0.2.0/.smoke_project/vault_out/exclusion/zone/for/cable/fault.md +60 -0
- klustra-0.2.0/.smoke_project/vault_out/exxonmobil/hdpe/compound/moisture/barrier.md +45 -0
- klustra-0.2.0/.smoke_project/vault_out/fault/re-energization/prohibition.md +44 -0
- klustra-0.2.0/.smoke_project/vault_out/high-voltage/cable/systems.md +41 -0
- klustra-0.2.0/.smoke_project/vault_out/iec/61936-1.md +88 -0
- klustra-0.2.0/.smoke_project/vault_out/iec/62067.md +111 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/cable/lubricant.md +22 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/cable/winch.md +57 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/direct/burial.md +61 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/duct/installation.md +59 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/joint/bay/dimensions.md +38 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/jointing.md +50 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/maximum/pulling/tension.md +55 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/minimum/bending/radius.md +37 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/prefabricated/joints.md +71 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/sand/bedding.md +41 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/temperature.md +36 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/trench/depth.md +41 -0
- klustra-0.2.0/.smoke_project/vault_out/installation/warning/tape.md +56 -0
- klustra-0.2.0/.smoke_project/vault_out/local/electrical/safety/regulations.md +51 -0
- klustra-0.2.0/.smoke_project/vault_out/metallic/sheath.md +40 -0
- klustra-0.2.0/.smoke_project/vault_out/nkt/cold-shrink/joints/66-170/kv.md +41 -0
- klustra-0.2.0/.smoke_project/vault_out/norsk/hydro/aluminium/rod.md +24 -0
- klustra-0.2.0/.smoke_project/vault_out/offshore/wind/farm/connections.md +40 -0
- klustra-0.2.0/.smoke_project/vault_out/outer/protective/jacket.md +23 -0
- klustra-0.2.0/.smoke_project/vault_out/peroxide/crosslinking.md +23 -0
- klustra-0.2.0/.smoke_project/vault_out/prysmian/pre-moulded/joints/terminations.md +32 -0
- klustra-0.2.0/.smoke_project/vault_out/safe/work/zone/with/barriers.md +47 -0
- klustra-0.2.0/.smoke_project/vault_out/safety/locks/and/tags.md +35 -0
- klustra-0.2.0/.smoke_project/vault_out/semi-conductive/screen.md +47 -0
- klustra-0.2.0/.smoke_project/vault_out/submarine/crossings.md +73 -0
- klustra-0.2.0/.smoke_project/vault_out/super/clean/xlpe/compound.md +121 -0
- klustra-0.2.0/.smoke_project/vault_out/triple/extrusion/process.md +46 -0
- klustra-0.2.0/.smoke_project/vault_out/underground/urban/networks.md +24 -0
- klustra-0.2.0/.smoke_project/vault_out/voltage/absence/verification.md +36 -0
- klustra-0.2.0/.smoke_project/vault_out/water/treeing.md +33 -0
- klustra-0.2.0/.smoke_project/vault_out/xlpe/insulation.md +51 -0
- klustra-0.2.0/CLAUDE.md +100 -0
- klustra-0.2.0/LICENSE +201 -0
- klustra-0.2.0/PKG-INFO +52 -0
- klustra-0.2.0/README.md +30 -0
- klustra-0.2.0/SPEC.md +378 -0
- klustra-0.2.0/STATUS.md +60 -0
- klustra-0.2.0/docs/ARCHITECTURE.md +61 -0
- klustra-0.2.0/klustra/__init__.py +3 -0
- klustra-0.2.0/klustra/api.py +717 -0
- klustra-0.2.0/klustra/cli.py +284 -0
- klustra-0.2.0/klustra/core/__init__.py +51 -0
- klustra-0.2.0/klustra/core/changeset.py +27 -0
- klustra-0.2.0/klustra/core/config.py +85 -0
- klustra-0.2.0/klustra/core/errors.py +54 -0
- klustra-0.2.0/klustra/core/file_state_store.py +135 -0
- klustra-0.2.0/klustra/core/knowledge_unit.py +25 -0
- klustra-0.2.0/klustra/core/page.py +72 -0
- klustra-0.2.0/klustra/core/source_ref.py +19 -0
- klustra-0.2.0/klustra/core/state_store.py +92 -0
- klustra-0.2.0/klustra/engine/__init__.py +41 -0
- klustra-0.2.0/klustra/engine/dependency.py +45 -0
- klustra-0.2.0/klustra/engine/extraction.py +94 -0
- klustra-0.2.0/klustra/engine/librarian.py +202 -0
- klustra-0.2.0/klustra/engine/lint.py +157 -0
- klustra-0.2.0/klustra/engine/models.py +107 -0
- klustra-0.2.0/klustra/engine/validate.py +50 -0
- klustra-0.2.0/klustra/exporters/__init__.py +27 -0
- klustra-0.2.0/klustra/exporters/exporter.py +53 -0
- klustra-0.2.0/klustra/exporters/obsidian.py +67 -0
- klustra-0.2.0/klustra/exporters/okf_bundle.py +100 -0
- klustra-0.2.0/klustra/hierarchy/__init__.py +88 -0
- klustra-0.2.0/klustra/hierarchy/clustering.py +248 -0
- klustra-0.2.0/klustra/hierarchy/context.py +257 -0
- klustra-0.2.0/klustra/hierarchy/embeddings.py +104 -0
- klustra-0.2.0/klustra/hierarchy/incremental.py +270 -0
- klustra-0.2.0/klustra/hierarchy/pages.py +343 -0
- klustra-0.2.0/klustra/hierarchy/stability.py +154 -0
- klustra-0.2.0/klustra/ingestion/__init__.py +43 -0
- klustra-0.2.0/klustra/ingestion/connectors.py +63 -0
- klustra-0.2.0/klustra/ingestion/domain_registry.py +78 -0
- klustra-0.2.0/klustra/ingestion/source_manager.py +237 -0
- klustra-0.2.0/klustra/ingestion/translator.py +43 -0
- klustra-0.2.0/klustra/ingestion/translator_registry.py +45 -0
- klustra-0.2.0/klustra/linking/__init__.py +11 -0
- klustra-0.2.0/klustra/linking/link_graph.py +35 -0
- klustra-0.2.0/klustra/linking/resolver.py +52 -0
- klustra-0.2.0/klustra/llm/__init__.py +63 -0
- klustra-0.2.0/klustra/llm/accounting.py +42 -0
- klustra-0.2.0/klustra/llm/anthropic_provider.py +90 -0
- klustra-0.2.0/klustra/llm/mock_provider.py +81 -0
- klustra-0.2.0/klustra/llm/openai_provider.py +90 -0
- klustra-0.2.0/klustra/llm/prompts/.gitkeep +0 -0
- klustra-0.2.0/klustra/llm/prompts/hierarchy.md +19 -0
- klustra-0.2.0/klustra/llm/prompts/home.md +19 -0
- klustra-0.2.0/klustra/llm/prompts/judge.md +24 -0
- klustra-0.2.0/klustra/llm/prompts.py +61 -0
- klustra-0.2.0/klustra/llm/provider.py +42 -0
- klustra-0.2.0/klustra/llm/retry.py +41 -0
- klustra-0.2.0/klustra/translators/__init__.py +8 -0
- klustra-0.2.0/klustra/translators/excel.py +475 -0
- klustra-0.2.0/klustra/translators/markdown.py +88 -0
- klustra-0.2.0/klustra/translators/registry.py +20 -0
- klustra-0.2.0/klustra/translators/text.py +41 -0
- klustra-0.2.0/main.py +6 -0
- klustra-0.2.0/pyproject.toml +75 -0
- klustra-0.2.0/scripts/smoke_pipeline.py +169 -0
- klustra-0.2.0/tests/conftest.py +17 -0
- klustra-0.2.0/tests/fixtures/golden/index.md +10 -0
- klustra-0.2.0/tests/fixtures/golden/log.md +0 -0
- klustra-0.2.0/tests/fixtures/golden/mat/xlpe.md +29 -0
- klustra-0.2.0/tests/fixtures/golden/proc/installation.md +28 -0
- klustra-0.2.0/tests/fixtures/golden/proc/testing.md +29 -0
- klustra-0.2.0/tests/fixtures/golden/prod/hv-cable.md +41 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/cable_intro.md +18 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/installation_guide.txt +23 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/safety_standards.md +23 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/supplier_list.txt +17 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/testing_procedures.md +22 -0
- klustra-0.2.0/tests/fixtures/mini_corpus/xlpe_material.md +23 -0
- klustra-0.2.0/tests/fixtures/translators/multi_section.md +19 -0
- klustra-0.2.0/tests/fixtures/translators/no_heading.md +7 -0
- klustra-0.2.0/tests/fixtures/translators/plain.txt +5 -0
- klustra-0.2.0/tests/test_api.py +60 -0
- klustra-0.2.0/tests/test_core/conftest.py +8 -0
- klustra-0.2.0/tests/test_core/test_changeset.py +26 -0
- klustra-0.2.0/tests/test_core/test_config.py +62 -0
- klustra-0.2.0/tests/test_core/test_errors.py +28 -0
- klustra-0.2.0/tests/test_core/test_file_state_store.py +164 -0
- klustra-0.2.0/tests/test_core/test_knowledge_unit.py +51 -0
- klustra-0.2.0/tests/test_core/test_page.py +142 -0
- klustra-0.2.0/tests/test_core/test_source_ref.py +35 -0
- klustra-0.2.0/tests/test_core/test_state_store.py +103 -0
- klustra-0.2.0/tests/test_engine/conftest.py +96 -0
- klustra-0.2.0/tests/test_engine/test_dependency.py +60 -0
- klustra-0.2.0/tests/test_engine/test_extraction.py +113 -0
- klustra-0.2.0/tests/test_engine/test_librarian.py +389 -0
- klustra-0.2.0/tests/test_engine/test_lint.py +122 -0
- klustra-0.2.0/tests/test_engine/test_validate.py +103 -0
- klustra-0.2.0/tests/test_exporters/__init__.py +0 -0
- klustra-0.2.0/tests/test_exporters/conftest.py +91 -0
- klustra-0.2.0/tests/test_exporters/test_obsidian.py +80 -0
- klustra-0.2.0/tests/test_exporters/test_okf_bundle.py +154 -0
- klustra-0.2.0/tests/test_hierarchy/conftest.py +103 -0
- klustra-0.2.0/tests/test_hierarchy/test_clustering.py +241 -0
- klustra-0.2.0/tests/test_hierarchy/test_context.py +286 -0
- klustra-0.2.0/tests/test_hierarchy/test_embeddings.py +66 -0
- klustra-0.2.0/tests/test_hierarchy/test_incremental.py +348 -0
- klustra-0.2.0/tests/test_hierarchy/test_pages.py +299 -0
- klustra-0.2.0/tests/test_hierarchy/test_stability.py +161 -0
- klustra-0.2.0/tests/test_ingestion/conftest.py +58 -0
- klustra-0.2.0/tests/test_ingestion/test_domain_registry.py +205 -0
- klustra-0.2.0/tests/test_ingestion/test_source_manager.py +288 -0
- klustra-0.2.0/tests/test_ingestion/test_translator_registry.py +64 -0
- klustra-0.2.0/tests/test_integration/__init__.py +0 -0
- klustra-0.2.0/tests/test_integration/test_cli_pipeline.py +209 -0
- klustra-0.2.0/tests/test_integration/test_golden.py +442 -0
- klustra-0.2.0/tests/test_integration/test_hierarchy_pipeline.py +338 -0
- klustra-0.2.0/tests/test_linking/conftest.py +43 -0
- klustra-0.2.0/tests/test_linking/test_link_graph.py +67 -0
- klustra-0.2.0/tests/test_linking/test_resolver.py +65 -0
- klustra-0.2.0/tests/test_llm/conftest.py +38 -0
- klustra-0.2.0/tests/test_llm/test_accounting.py +29 -0
- klustra-0.2.0/tests/test_llm/test_anthropic_provider.py +116 -0
- klustra-0.2.0/tests/test_llm/test_openai_provider.py +166 -0
- klustra-0.2.0/tests/test_llm/test_prompts.py +71 -0
- klustra-0.2.0/tests/test_llm/test_provider.py +87 -0
- klustra-0.2.0/tests/test_llm/test_resolve.py +51 -0
- klustra-0.2.0/tests/test_llm/test_retry.py +49 -0
- klustra-0.2.0/tests/test_translators/conftest.py +178 -0
- klustra-0.2.0/tests/test_translators/test_excel.py +439 -0
- klustra-0.2.0/tests/test_translators/test_markdown.py +186 -0
- klustra-0.2.0/tests/test_translators/test_text.py +101 -0
- klustra-0.2.0/uv.lock +1377 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PostToolUse hook: runs after every Edit/Write. No-op until pyproject.toml exists
|
|
3
|
+
# (i.e. before Fase 1 scaffold), so it's safe to install on day one.
|
|
4
|
+
set -e
|
|
5
|
+
if [ -f pyproject.toml ]; then
|
|
6
|
+
uv run ruff check --fix . --quiet
|
|
7
|
+
uv run ruff format --quiet .
|
|
8
|
+
fi
|
|
9
|
+
exit 0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Stop hook: enforces CLAUDE.md's "definition of done" mechanically.
|
|
3
|
+
# No-op until pyproject.toml exists. Once the project is scaffolded,
|
|
4
|
+
# a session cannot end silently on red tests/lint/types.
|
|
5
|
+
if [ ! -f pyproject.toml ]; then
|
|
6
|
+
exit 0
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
echo "--- ruff ---"
|
|
10
|
+
uv run ruff check . && uv run ruff format --check .
|
|
11
|
+
RUFF=$?
|
|
12
|
+
|
|
13
|
+
echo "--- mypy ---"
|
|
14
|
+
uv run mypy klustra/ 2>/dev/null
|
|
15
|
+
MYPY=$?
|
|
16
|
+
|
|
17
|
+
echo "--- pytest ---"
|
|
18
|
+
uv run pytest -q
|
|
19
|
+
PYTEST=$?
|
|
20
|
+
|
|
21
|
+
if [ $RUFF -ne 0 ] || [ $MYPY -ne 0 ] || [ $PYTEST -ne 0 ]; then
|
|
22
|
+
echo "Verification failed (ruff=$RUFF mypy=$MYPY pytest=$PYTEST). Fix before stopping."
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
exit 0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{ "type": "command", "command": "bash .claude/hooks/format.sh" }
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"Stop": [
|
|
12
|
+
{
|
|
13
|
+
"hooks": [
|
|
14
|
+
{ "type": "command", "command": "bash .claude/hooks/verify.sh" }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"permissions": {
|
|
20
|
+
"deny": [
|
|
21
|
+
"Bash(rm -rf *)",
|
|
22
|
+
"Edit(uv.lock)"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Publishes klustra to PyPI when a GitHub Release is published.
|
|
2
|
+
# Uses uv for building (matches local dev workflow) and PyPI Trusted
|
|
3
|
+
# Publishing (OIDC) — no API token stored in GitHub secrets.
|
|
4
|
+
name: Upload Python Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v3
|
|
21
|
+
|
|
22
|
+
- name: Build release distributions
|
|
23
|
+
run: uv build
|
|
24
|
+
|
|
25
|
+
- name: Upload distributions
|
|
26
|
+
uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: release-dists
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
pypi-publish:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
needs:
|
|
34
|
+
- release-build
|
|
35
|
+
permissions:
|
|
36
|
+
# mandatory for trusted publishing (OIDC token exchange)
|
|
37
|
+
id-token: write
|
|
38
|
+
environment:
|
|
39
|
+
name: pypi
|
|
40
|
+
url: https://pypi.org/project/klustra/${{ github.event.release.name }}
|
|
41
|
+
steps:
|
|
42
|
+
- name: Retrieve release distributions
|
|
43
|
+
uses: actions/download-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: release-dists
|
|
46
|
+
path: dist/
|
|
47
|
+
|
|
48
|
+
- name: Publish release distributions to PyPI
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
50
|
+
with:
|
|
51
|
+
packages-dir: dist/
|
klustra-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|