axis-synome 0.1.dev186__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.
Files changed (60) hide show
  1. axis_synome-0.1.dev186/.flake8 +5 -0
  2. axis_synome-0.1.dev186/.gitignore +38 -0
  3. axis_synome-0.1.dev186/PKG-INFO +60 -0
  4. axis_synome-0.1.dev186/README.md +47 -0
  5. axis_synome-0.1.dev186/WRITING_SPECS.md +634 -0
  6. axis_synome-0.1.dev186/pyproject.toml +71 -0
  7. axis_synome-0.1.dev186/src/axis_synome/__init__.py +0 -0
  8. axis_synome-0.1.dev186/src/axis_synome/_version.py +24 -0
  9. axis_synome-0.1.dev186/src/axis_synome/spec/__init__.py +0 -0
  10. axis_synome-0.1.dev186/src/axis_synome/spec/asc/README.md +419 -0
  11. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/__init__.py +1 -0
  12. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/assets.py +17 -0
  13. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/assets_by_prime.py +618 -0
  14. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/networks.py +15 -0
  15. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/primes.py +96 -0
  16. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/protocol_sets.py +68 -0
  17. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/tokens.py +58 -0
  18. axis_synome-0.1.dev186/src/axis_synome/spec/asc/entities/types.py +15 -0
  19. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/asc.py +32 -0
  20. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/asc_collateral_ratio.py +53 -0
  21. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/asc_incentive.py +28 -0
  22. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/dab.py +30 -0
  23. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/latent_asc.py +39 -0
  24. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/ratio_latent_asc.py +40 -0
  25. axis_synome-0.1.dev186/src/axis_synome/spec/asc/formulas/resting_asc.py +56 -0
  26. axis_synome-0.1.dev186/src/axis_synome/spec/codegen_test/entities/agents.py +12 -0
  27. axis_synome-0.1.dev186/src/axis_synome/spec/crypto_lending/__init__.py +0 -0
  28. axis_synome-0.1.dev186/src/axis_synome/spec/crypto_lending/formulas/__init__.py +0 -0
  29. axis_synome-0.1.dev186/src/axis_synome/spec/crypto_lending/formulas/lif.py +43 -0
  30. axis_synome-0.1.dev186/src/axis_synome/spec/risk_capital/__init__.py +0 -0
  31. axis_synome-0.1.dev186/src/axis_synome/spec/risk_capital/formulas/__init__.py +0 -0
  32. axis_synome-0.1.dev186/src/axis_synome/spec/risk_capital/formulas/required_risk_capital.py +39 -0
  33. axis_synome-0.1.dev186/src/axis_synome/spec_support/__init__.py +0 -0
  34. axis_synome-0.1.dev186/src/axis_synome/spec_support/evm_address.py +48 -0
  35. axis_synome-0.1.dev186/src/axis_synome/spec_support/metadata.py +22 -0
  36. axis_synome-0.1.dev186/src/axis_synome/spec_support/validated_dataclass.py +36 -0
  37. axis_synome-0.1.dev186/src/axis_synome/spec_support/validated_str.py +40 -0
  38. axis_synome-0.1.dev186/src/axis_synome/spec_validator/__init__.py +5 -0
  39. axis_synome-0.1.dev186/src/axis_synome/spec_validator/checker.py +355 -0
  40. axis_synome-0.1.dev186/src/axis_synome/spec_validator/flake8_plugin.py +52 -0
  41. axis_synome-0.1.dev186/src/axis_synome/spec_validator/python_subset.py +106 -0
  42. axis_synome-0.1.dev186/tests/axis_synome/asc/__init__.py +1 -0
  43. axis_synome-0.1.dev186/tests/axis_synome/asc/conftest.py +64 -0
  44. axis_synome-0.1.dev186/tests/axis_synome/asc/mocks.py +206 -0
  45. axis_synome-0.1.dev186/tests/axis_synome/asc/test_asc.py +88 -0
  46. axis_synome-0.1.dev186/tests/axis_synome/asc/test_asc_collateral_ratio.py +167 -0
  47. axis_synome-0.1.dev186/tests/axis_synome/asc/test_asc_incentive.py +127 -0
  48. axis_synome-0.1.dev186/tests/axis_synome/asc/test_asc_spec_client_parity.py +235 -0
  49. axis_synome-0.1.dev186/tests/axis_synome/asc/test_dab.py +46 -0
  50. axis_synome-0.1.dev186/tests/axis_synome/asc/test_evm_address.py +75 -0
  51. axis_synome-0.1.dev186/tests/axis_synome/asc/test_latent_asc.py +205 -0
  52. axis_synome-0.1.dev186/tests/axis_synome/asc/test_prime_agent_data_validation.py +108 -0
  53. axis_synome-0.1.dev186/tests/axis_synome/asc/test_ratio_latent_asc.py +239 -0
  54. axis_synome-0.1.dev186/tests/axis_synome/asc/test_resting_asc.py +248 -0
  55. axis_synome-0.1.dev186/tests/axis_synome/risk_capital/__init__.py +0 -0
  56. axis_synome-0.1.dev186/tests/axis_synome/risk_capital/formulas/__init__.py +0 -0
  57. axis_synome-0.1.dev186/tests/axis_synome/risk_capital/formulas/test_loss_given_default.py +70 -0
  58. axis_synome-0.1.dev186/tests/axis_synome/spec_validator/test_checker.py +269 -0
  59. axis_synome-0.1.dev186/tests/axis_synome/spec_validator/test_flake8_plugin.py +57 -0
  60. axis_synome-0.1.dev186/uv.lock +394 -0
@@ -0,0 +1,5 @@
1
+ [flake8]
2
+ # Only run our custom spec-subset checks (AXS prefix).
3
+ # Standard linting is handled by ruff.
4
+ select = AXS
5
+ exclude = tests
@@ -0,0 +1,38 @@
1
+ *.bak
2
+ *.tmp
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.so
9
+ *.egg-info/
10
+ *.egg
11
+ dist/
12
+ build/
13
+ .eggs/
14
+
15
+ # Environments
16
+ .venv/
17
+ .env
18
+
19
+ # Testing / coverage
20
+ .pytest_cache/
21
+ .coverage
22
+ .coverage.*
23
+ htmlcov/
24
+ coverage.xml
25
+
26
+ # Type checking / linting
27
+ .mypy_cache/
28
+ .ty_cache/
29
+ .ruff_cache/
30
+
31
+ # OS
32
+ .DS_Store
33
+
34
+ # IDE
35
+ .idea/
36
+
37
+ # hatch-vcs
38
+ python/axis_synome/src/axis_synome/_version.py
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: axis-synome
3
+ Version: 0.1.dev186
4
+ Summary: Axis specification modules (entities, formulas, validators)
5
+ Project-URL: Repository, https://github.com/archon-research/next-gen-atlas
6
+ Project-URL: Documentation, https://github.com/archon-research/next-gen-atlas
7
+ Author-email: Archon Tech <hello@archontech.ai>
8
+ License: MIT
9
+ Requires-Python: >=3.11
10
+ Requires-Dist: eth-hash[pycryptodome]>=0.5.0
11
+ Requires-Dist: pydantic>=2.0.0
12
+ Description-Content-Type: text/markdown
13
+
14
+ # axis
15
+
16
+ [![Publish axis to GitHub Packages](https://github.com/archon-research/synome/actions/workflows/publish-axis.yml/badge.svg?branch=main)](https://github.com/archon-research/synome/actions/workflows/publish-axis.yml)
17
+
18
+ Axis specification modules for Synome, including:
19
+ - **ASC** (Actively Stabilizing Capital) specification with entities and formulas
20
+ - **Validators** for spec validation and static analysis (flake8 plugin)
21
+ - **Metadata** utilities for formula documentation
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install axis --index-url https://npm.pkg.github.com/archon-research
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ### Entities
32
+
33
+ ```python
34
+ from axis_synome.spec.asc.entities import YourEntity
35
+ ```
36
+
37
+ ### Formulas
38
+
39
+ ```python
40
+ from axis_synome.spec.asc.formulas import your_formula
41
+ ```
42
+
43
+ ### Validators (Flake8)
44
+
45
+ The spec validator is provided as a flake8 plugin (`AXS`) that validates specification files against the allowed Python subset.
46
+
47
+ ```bash
48
+ flake8 --select=AXS your_spec.py
49
+ ```
50
+
51
+ ## About
52
+
53
+ Axis is a specification framework for defining financial and risk calculations. The ASC (Actively Stabilizing Capital) module is a concrete implementation following the Axis specification pattern.
54
+
55
+ For more information on writing specifications, see [WRITING_SPECS.md](WRITING_SPECS.md).
56
+
57
+ ## Requirements
58
+
59
+ - Python >= 3.11
60
+ - pydantic >= 2.0.0
@@ -0,0 +1,47 @@
1
+ # axis
2
+
3
+ [![Publish axis to GitHub Packages](https://github.com/archon-research/synome/actions/workflows/publish-axis.yml/badge.svg?branch=main)](https://github.com/archon-research/synome/actions/workflows/publish-axis.yml)
4
+
5
+ Axis specification modules for Synome, including:
6
+ - **ASC** (Actively Stabilizing Capital) specification with entities and formulas
7
+ - **Validators** for spec validation and static analysis (flake8 plugin)
8
+ - **Metadata** utilities for formula documentation
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install axis --index-url https://npm.pkg.github.com/archon-research
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ### Entities
19
+
20
+ ```python
21
+ from axis_synome.spec.asc.entities import YourEntity
22
+ ```
23
+
24
+ ### Formulas
25
+
26
+ ```python
27
+ from axis_synome.spec.asc.formulas import your_formula
28
+ ```
29
+
30
+ ### Validators (Flake8)
31
+
32
+ The spec validator is provided as a flake8 plugin (`AXS`) that validates specification files against the allowed Python subset.
33
+
34
+ ```bash
35
+ flake8 --select=AXS your_spec.py
36
+ ```
37
+
38
+ ## About
39
+
40
+ Axis is a specification framework for defining financial and risk calculations. The ASC (Actively Stabilizing Capital) module is a concrete implementation following the Axis specification pattern.
41
+
42
+ For more information on writing specifications, see [WRITING_SPECS.md](WRITING_SPECS.md).
43
+
44
+ ## Requirements
45
+
46
+ - Python >= 3.11
47
+ - pydantic >= 2.0.0