axis-synome 0.1.dev184__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.dev184/.flake8 +5 -0
  2. axis_synome-0.1.dev184/.gitignore +38 -0
  3. axis_synome-0.1.dev184/PKG-INFO +73 -0
  4. axis_synome-0.1.dev184/README.md +60 -0
  5. axis_synome-0.1.dev184/WRITING_SPECS.md +634 -0
  6. axis_synome-0.1.dev184/pyproject.toml +71 -0
  7. axis_synome-0.1.dev184/src/axis_synome/__init__.py +0 -0
  8. axis_synome-0.1.dev184/src/axis_synome/_version.py +24 -0
  9. axis_synome-0.1.dev184/src/axis_synome/spec/__init__.py +0 -0
  10. axis_synome-0.1.dev184/src/axis_synome/spec/asc/README.md +419 -0
  11. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/__init__.py +1 -0
  12. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/assets.py +17 -0
  13. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/assets_by_prime.py +618 -0
  14. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/networks.py +15 -0
  15. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/primes.py +96 -0
  16. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/protocol_sets.py +68 -0
  17. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/tokens.py +58 -0
  18. axis_synome-0.1.dev184/src/axis_synome/spec/asc/entities/types.py +15 -0
  19. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/asc.py +32 -0
  20. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/asc_collateral_ratio.py +53 -0
  21. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/asc_incentive.py +28 -0
  22. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/dab.py +30 -0
  23. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/latent_asc.py +39 -0
  24. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/ratio_latent_asc.py +40 -0
  25. axis_synome-0.1.dev184/src/axis_synome/spec/asc/formulas/resting_asc.py +56 -0
  26. axis_synome-0.1.dev184/src/axis_synome/spec/codegen_test/entities/agents.py +12 -0
  27. axis_synome-0.1.dev184/src/axis_synome/spec/crypto_lending/__init__.py +0 -0
  28. axis_synome-0.1.dev184/src/axis_synome/spec/crypto_lending/formulas/__init__.py +0 -0
  29. axis_synome-0.1.dev184/src/axis_synome/spec/crypto_lending/formulas/lif.py +43 -0
  30. axis_synome-0.1.dev184/src/axis_synome/spec/risk_capital/__init__.py +0 -0
  31. axis_synome-0.1.dev184/src/axis_synome/spec/risk_capital/formulas/__init__.py +0 -0
  32. axis_synome-0.1.dev184/src/axis_synome/spec/risk_capital/formulas/required_risk_capital.py +39 -0
  33. axis_synome-0.1.dev184/src/axis_synome/spec_support/__init__.py +0 -0
  34. axis_synome-0.1.dev184/src/axis_synome/spec_support/evm_address.py +48 -0
  35. axis_synome-0.1.dev184/src/axis_synome/spec_support/metadata.py +22 -0
  36. axis_synome-0.1.dev184/src/axis_synome/spec_support/validated_dataclass.py +36 -0
  37. axis_synome-0.1.dev184/src/axis_synome/spec_support/validated_str.py +40 -0
  38. axis_synome-0.1.dev184/src/axis_synome/spec_validator/__init__.py +5 -0
  39. axis_synome-0.1.dev184/src/axis_synome/spec_validator/checker.py +355 -0
  40. axis_synome-0.1.dev184/src/axis_synome/spec_validator/flake8_plugin.py +52 -0
  41. axis_synome-0.1.dev184/src/axis_synome/spec_validator/python_subset.py +106 -0
  42. axis_synome-0.1.dev184/tests/axis_synome/asc/__init__.py +1 -0
  43. axis_synome-0.1.dev184/tests/axis_synome/asc/conftest.py +64 -0
  44. axis_synome-0.1.dev184/tests/axis_synome/asc/mocks.py +206 -0
  45. axis_synome-0.1.dev184/tests/axis_synome/asc/test_asc.py +88 -0
  46. axis_synome-0.1.dev184/tests/axis_synome/asc/test_asc_collateral_ratio.py +167 -0
  47. axis_synome-0.1.dev184/tests/axis_synome/asc/test_asc_incentive.py +127 -0
  48. axis_synome-0.1.dev184/tests/axis_synome/asc/test_asc_spec_client_parity.py +235 -0
  49. axis_synome-0.1.dev184/tests/axis_synome/asc/test_dab.py +46 -0
  50. axis_synome-0.1.dev184/tests/axis_synome/asc/test_evm_address.py +75 -0
  51. axis_synome-0.1.dev184/tests/axis_synome/asc/test_latent_asc.py +205 -0
  52. axis_synome-0.1.dev184/tests/axis_synome/asc/test_prime_agent_data_validation.py +108 -0
  53. axis_synome-0.1.dev184/tests/axis_synome/asc/test_ratio_latent_asc.py +239 -0
  54. axis_synome-0.1.dev184/tests/axis_synome/asc/test_resting_asc.py +248 -0
  55. axis_synome-0.1.dev184/tests/axis_synome/risk_capital/__init__.py +0 -0
  56. axis_synome-0.1.dev184/tests/axis_synome/risk_capital/formulas/__init__.py +0 -0
  57. axis_synome-0.1.dev184/tests/axis_synome/risk_capital/formulas/test_loss_given_default.py +70 -0
  58. axis_synome-0.1.dev184/tests/axis_synome/spec_validator/test_checker.py +269 -0
  59. axis_synome-0.1.dev184/tests/axis_synome/spec_validator/test_flake8_plugin.py +57 -0
  60. axis_synome-0.1.dev184/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,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: axis-synome
3
+ Version: 0.1.dev184
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-synome
15
+
16
+ A Python framework for defining and validating financial specifications, with a focus on DeFi primitives and risk calculations. Includes:
17
+
18
+ - **ASC Specifications** — Actively Stabilizing Capital entities (assets, tokens, networks, protocols) and formulas (collateral ratios, incentives, resting/latent ASC)
19
+ - **Spec Validator** — Flake8 plugin for enforcing Python subset constraints on spec files
20
+ - **Metadata & Utilities** — Support for spec documentation and validated dataclasses
21
+
22
+ ## Installation
23
+
24
+ Install from PyPI:
25
+
26
+ ```bash
27
+ pip install axis-synome
28
+ ```
29
+
30
+ Or install from a private registry:
31
+
32
+ ```bash
33
+ pip install axis-synome --index-url https://npm.pkg.github.com/archon-research
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### ASC Entities
39
+
40
+ ```python
41
+ from axis_synome.spec.asc.entities import primes, tokens, networks, protocol_sets
42
+ ```
43
+
44
+ ### ASC Formulas
45
+
46
+ ```python
47
+ from axis_synome.spec.asc.formulas import asc, asc_collateral_ratio, asc_incentive
48
+ ```
49
+
50
+ ### Spec Validation
51
+
52
+ ```python
53
+ from axis_synome.spec_validator import validate_file
54
+
55
+ validate_file("my_spec.py")
56
+ ```
57
+
58
+ Or use as a flake8 plugin:
59
+
60
+ ```bash
61
+ flake8 --select=AXS your_spec.py
62
+ ```
63
+
64
+ ## About
65
+
66
+ `axis-synome` is a specification framework for defining financial and risk calculations in DeFi, with emphasis on formalized, auditable spec files.
67
+
68
+ For more information on writing specifications, see [WRITING_SPECS.md](WRITING_SPECS.md).
69
+
70
+ ## Requirements
71
+
72
+ - Python >= 3.11
73
+ - pydantic >= 2.0.0
@@ -0,0 +1,60 @@
1
+ # axis-synome
2
+
3
+ A Python framework for defining and validating financial specifications, with a focus on DeFi primitives and risk calculations. Includes:
4
+
5
+ - **ASC Specifications** — Actively Stabilizing Capital entities (assets, tokens, networks, protocols) and formulas (collateral ratios, incentives, resting/latent ASC)
6
+ - **Spec Validator** — Flake8 plugin for enforcing Python subset constraints on spec files
7
+ - **Metadata & Utilities** — Support for spec documentation and validated dataclasses
8
+
9
+ ## Installation
10
+
11
+ Install from PyPI:
12
+
13
+ ```bash
14
+ pip install axis-synome
15
+ ```
16
+
17
+ Or install from a private registry:
18
+
19
+ ```bash
20
+ pip install axis-synome --index-url https://npm.pkg.github.com/archon-research
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ### ASC Entities
26
+
27
+ ```python
28
+ from axis_synome.spec.asc.entities import primes, tokens, networks, protocol_sets
29
+ ```
30
+
31
+ ### ASC Formulas
32
+
33
+ ```python
34
+ from axis_synome.spec.asc.formulas import asc, asc_collateral_ratio, asc_incentive
35
+ ```
36
+
37
+ ### Spec Validation
38
+
39
+ ```python
40
+ from axis_synome.spec_validator import validate_file
41
+
42
+ validate_file("my_spec.py")
43
+ ```
44
+
45
+ Or use as a flake8 plugin:
46
+
47
+ ```bash
48
+ flake8 --select=AXS your_spec.py
49
+ ```
50
+
51
+ ## About
52
+
53
+ `axis-synome` is a specification framework for defining financial and risk calculations in DeFi, with emphasis on formalized, auditable spec files.
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