dao-treasury 0.0.60__cp311-cp311-win_amd64.whl → 0.0.64__cp311-cp311-win_amd64.whl

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.
Binary file
dao_treasury/_docker.py CHANGED
@@ -14,17 +14,17 @@ This is the main entry for all Docker-based orchestration.
14
14
  """
15
15
 
16
16
  import logging
17
- from importlib import resources
18
- import subprocess
19
17
  from functools import wraps
20
- from typing import Any, Callable, Coroutine, Final, Iterable, Tuple, TypeVar, List
18
+ from importlib import resources
19
+ from typing import Any, Callable, Coroutine, Final, Literal, Tuple, TypeVar, List
21
20
 
22
21
  import eth_portfolio_scripts.docker
22
+ from eth_portfolio_scripts.docker import docker_compose
23
23
  from typing_extensions import ParamSpec
24
24
 
25
25
  logger: Final = logging.getLogger(__name__)
26
26
 
27
- compose_file: Final = str(
27
+ COMPOSE_FILE: Final = str(
28
28
  resources.files("dao_treasury").joinpath("docker-compose.yaml")
29
29
  )
30
30
  """The path of dao-treasury's docker-compose.yaml file on your machine"""
@@ -55,7 +55,7 @@ def up(*services: str) -> None:
55
55
  # eth-portfolio containers must be started first so dao-treasury can attach to the eth-portfolio docker network
56
56
  eth_portfolio_scripts.docker.up("victoria-metrics")
57
57
  build(*services)
58
- print(f"starting the {', '.join(services) if services else 'grafana'} container(s)")
58
+ _print_notice("starting", services)
59
59
  _exec_command(["up", "-d", *services])
60
60
 
61
61
 
@@ -72,6 +72,7 @@ def down() -> None:
72
72
  See Also:
73
73
  :func:`up`
74
74
  """
75
+ print("stopping all dao-treasury containers")
75
76
  _exec_command(["down"])
76
77
 
77
78
 
@@ -90,10 +91,24 @@ def build(*services: str) -> None:
90
91
  :func:`up`
91
92
  :func:`_exec_command`
92
93
  """
93
- print("building the grafana containers")
94
+ _print_notice("building", services)
94
95
  _exec_command(["build", *services])
95
96
 
96
97
 
98
+ def _print_notice(
99
+ doing: Literal["building", "starting"], services: Tuple[str, ...]
100
+ ) -> None:
101
+ if len(services) == 1:
102
+ container = services[0]
103
+ print(f"{doing} the {container} container")
104
+ elif len(services) == 2:
105
+ first, second = services
106
+ print(f"{doing} the {first} and {second} containers")
107
+ else:
108
+ *all_but_last, last = services
109
+ print(f"{doing} the {', '.join(all_but_last)}, and {last} containers")
110
+
111
+
97
112
  _P = ParamSpec("_P")
98
113
  _T = TypeVar("_T")
99
114
 
@@ -174,17 +189,6 @@ def _exec_command(command: List[str], *, compose_options: Tuple[str, ...] = ())
174
189
  See Also:
175
190
  :func:`check_system`
176
191
  """
177
- eth_portfolio_scripts.docker.check_system()
178
- try:
179
- subprocess.check_output(
180
- ["docker", "compose", *compose_options, "-f", compose_file, *command]
181
- )
182
- except (subprocess.CalledProcessError, FileNotFoundError) as e:
183
- try:
184
- subprocess.check_output(
185
- ["docker-compose", *compose_options, "-f", compose_file, *command]
186
- )
187
- except (subprocess.CalledProcessError, FileNotFoundError) as _e:
188
- raise RuntimeError(
189
- f"Error occurred while running {' '.join(command)}: {_e}"
190
- ) from _e
192
+ docker_compose._exec_command(
193
+ command, compose_file=COMPOSE_FILE, compose_options=compose_options
194
+ )
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao_treasury
3
- Version: 0.0.60
3
+ Version: 0.0.64
4
4
  Summary: Produce comprehensive financial reports for your on-chain org
5
5
  Classifier: Development Status :: 3 - Alpha
6
6
  Classifier: Intended Audience :: Developers
@@ -14,8 +14,7 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Topic :: Software Development :: Libraries
15
15
  Requires-Python: >=3.10,<3.13
16
16
  Description-Content-Type: text/markdown
17
- Requires-Dist: eth-portfolio-temp<0.3,>=0.2.11
18
- Requires-Dist: ypricemagic>=4.10.0
17
+ Requires-Dist: eth-portfolio-temp==0.2.15
19
18
  Dynamic: classifier
20
19
  Dynamic: description
21
20
  Dynamic: description-content-type
@@ -42,7 +41,7 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
42
41
  - First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.). Your archive node must have tracing enabled (free-tier Alchemy nodes do not support this option).
43
42
  - You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
44
43
  - You will need an auth token for [Etherscan](https://etherscan.io/)'s API. Follow their [guide](https://docs.etherscan.io/etherscan-v2/getting-an-api-key) to get your key, and set env var `ETHERSCAN_TOKEN` with its value.
45
- - You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while Yearn Treasury is running.
44
+ - You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while DAO Treasury is running.
46
45
 
47
46
  ## Installation
48
47
 
@@ -1,20 +1,20 @@
1
- dao_treasury__mypyc.cp311-win_amd64.pyd,sha256=vpg_UVbB6dhrJwygnMTe27Y4DIdZ4R2-A3auXHvZMhA,453632
1
+ dao_treasury__mypyc.cp311-win_amd64.pyd,sha256=_-2mm_ryDlJcsgNlmQ3972zOYdW5Wu4YEG15EkTi2U4,453120
2
2
  dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LS_D4ALB3BO-vYKyh1tzRHi10QBE6f654Zy8pmJ_xPY,656
3
3
  dao_treasury/__init__.py,sha256=ai8iALE_Zv43O9cH1jkNJ39bzhr60kBDX6L7C4Nj9FA,1539
4
- dao_treasury/_docker.cp311-win_amd64.pyd,sha256=b2TdXBk8zAPcseTsI8kn_vsYoY6aJBu3t3T6GfSIpYY,10752
5
- dao_treasury/_docker.py,sha256=UFMN-TIBUQBheMIhIhSMhaq7UFgt6ubUcfzwPNap_6o,6098
6
- dao_treasury/_nicknames.cp311-win_amd64.pyd,sha256=FHCyvqwdnVrlUdDKqzQSp4Lz8gKttKrmUroFQpYFzjc,10752
4
+ dao_treasury/_docker.cp311-win_amd64.pyd,sha256=SclmaN4E1ohpZiBDxclilDgNRtXA8qIyrJw1QyjNIQI,10752
5
+ dao_treasury/_docker.py,sha256=Rki3eLKOmsNxN3nF-gmbM9UQV49SY7ToEHZboL_HYvA,6118
6
+ dao_treasury/_nicknames.cp311-win_amd64.pyd,sha256=jXPNWorH_jHyAUZjhbfaj-66XwWG5INr_X3CWkFXV04,10752
7
7
  dao_treasury/_nicknames.py,sha256=n8c-JZhORYymCMv6jsC96IthAzAhpslyEn-KCk_YiSM,1049
8
- dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=wtirU32pOX3jCCHh_YwNNZAiuXkd3EquDUlSPoiSg7g,10752
8
+ dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=68wgG9HGBaD1jwhvjUWd7cC5fuTH2Dz9iFUV55QYG7A,10752
9
9
  dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
10
- dao_treasury/constants.cp311-win_amd64.pyd,sha256=sTiTMLqju3s28mRHBCcNoMvK5YaOmVcK511qelUz8gA,10752
10
+ dao_treasury/constants.cp311-win_amd64.pyd,sha256=e25kvUfRPZOCQ1vPBaxIaLe6cExVfX_992Y5ToYIGgM,10752
11
11
  dao_treasury/constants.py,sha256=-T0oPw7lC5YeaiplHAtYL-2ss7knvKrJKQ1LCc8kX8g,1483
12
12
  dao_treasury/db.py,sha256=3_-nm8vD92ECaHxjMYf0eaXfsBRC2ojGcm-AFz2ZLAQ,50625
13
13
  dao_treasury/docker-compose.yaml,sha256=wNNE9xmkchcV-nJxzrmUkbUA0CW1qgdGQKJ7uw2P8nU,1350
14
14
  dao_treasury/main.py,sha256=w7VBmBwNBYjOkz2LpT4_9FZ1CI8AVcr4vyfr1wZVk5Q,8458
15
15
  dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  dao_treasury/treasury.py,sha256=wh4wESLbYSHjcfpa-sW5TIqa5pSC9Y_7Id8tzLzJLaw,7414
17
- dao_treasury/types.cp311-win_amd64.pyd,sha256=_b8VbP8zU3Dr8p--rF1NRpbqlV1MPNxQHlhFM6L6mUc,10752
17
+ dao_treasury/types.cp311-win_amd64.pyd,sha256=GGFgCbYfl-P3EZQjNqBA7vXUc-XGFjoJ9B07UiQlKP4,10752
18
18
  dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
19
19
  dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=NfmmICGLVfIrI8ulzUTUYc7wFetk2v-x6eaoYHnCvQc,1914
20
20
  dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=gxfPI4eO3PDPe70Yx7_dN0Yx5isvgy-MKe-fizBClMw,16879
@@ -28,27 +28,27 @@ dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.j
28
28
  dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json,sha256=7qVXn2PjeBIp2pFRbVfxA4PeWxhhVKQCr4qIPZoIj90,133963
29
29
  dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=fYkiZ37Eg2vu9dPJavCZXPPtX6-rTDbJwE_Ougpo2Mk,15828
30
30
  dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=gLmJsOkEXNzWRDibShfHFySWeuExW-dSB_U0OSfH868,344
31
- dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=7G4WTVOtHE90BwacsFSVA0b2oLnLuHyL5lTdflO8r5Y,10752
31
+ dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=9vsxs5akjIUqjmHAWxky0iITKJPMlXd6TsD1cu_xzm0,10752
32
32
  dao_treasury/sorting/__init__.py,sha256=_uxM_FE1paM8oDAhDdHSyhDwnrlxCYX_lGn2DOqCaHU,10666
33
- dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=OlDwh8zIAl-6chzvXgeRJuboYuPvmttlLapsN5KQa_c,10752
33
+ dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=uq0vVR0kJnzELx3oToNVgVO54Qi70d36UAqzvkBMYsY,10752
34
34
  dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
35
- dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=UOO2ruc8f8ynKzI0Vb0nUZOXFlImBRDAva81sAYhTFY,10752
35
+ dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=uhODyiU3f3lhlGbG6DftoKQs5N2isrI1sSwxXHIcjgs,10752
36
36
  dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
37
- dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=vjd3UoBnIpN0rWZpoknIOx9ptd0jV77G-En0OjBcpbw,10752
37
+ dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=lbnOnk5UZlRXVnzvxW3ZjdD-ZHKU34BxHGJ_gFejbzA,10752
38
38
  dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
39
- dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=7xCjlfbFBDH7nnOpr28hMmO2E35TbIKPITov33_fxDo,10752
39
+ dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=5M4ytN5eaWpIgY_ziTBP75ETV1jpEpciPvjos563s_8,10752
40
40
  dao_treasury/sorting/rule.py,sha256=wbL8s0-6dxcCKghUtEDSkLDBnyvggsJ3gt_RawQ6kB4,11972
41
- dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd,sha256=qPpjGXr-p-HIfFTm3ozhkvvQ5I7UZZ-WlhBT3NmOGw4,10752
41
+ dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd,sha256=sbEKeVxQIq9dBArwh7Y9HE9QFNxqLWsAJm8P3bB0vN8,10752
42
42
  dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
43
- dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd,sha256=CSB_diEc-p6ul_FzArDUnR091YDhAdLMyBlBR6Jh8hc,10752
43
+ dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd,sha256=D2PF2U7r3NrqrvUw40zHFvqUzhsg2oGkmkV267lHRZA,10752
44
44
  dao_treasury/sorting/rules/ignore/__init__.py,sha256=16THKoGdj6qfkkytuCFVG_R1M6KSErMI4AVE1p0ukS4,58
45
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd,sha256=8sEfLRcaa4C4iSVi1zClxsvlAdTDmvqvmSheLyk8JL8,10752
45
+ dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd,sha256=c-Sy5Z4gXuYw-TcMtGOdrOL5I_T9Zf98aehe099IFJU,10752
46
46
  dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
47
- dao_treasury/streams/__init__.cp311-win_amd64.pyd,sha256=EvGpPU5c24-jKL1jK8PtswSyUPPknGI60iOn83OftaU,10752
47
+ dao_treasury/streams/__init__.cp311-win_amd64.pyd,sha256=hapDQP1m5doj6mG03d2S7aGVQfBLG3TFAqMt6KrE1M0,10752
48
48
  dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- dao_treasury/streams/llamapay.cp311-win_amd64.pyd,sha256=6XOlvxGQRube7NNkqDSpcQUJjPhOv2wKf4yIqX8l4K8,10752
49
+ dao_treasury/streams/llamapay.cp311-win_amd64.pyd,sha256=lTMqz3p4zQZ7H1s4LwEgCNaTbdPmEsD8xS_Q186t6TU,10752
50
50
  dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
51
- dao_treasury-0.0.60.dist-info/METADATA,sha256=Ufkev7h0V31lvudy9p5vpX_EtSeVE51ehJwbH2CX-Uw,7274
52
- dao_treasury-0.0.60.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
53
- dao_treasury-0.0.60.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
54
- dao_treasury-0.0.60.dist-info/RECORD,,
51
+ dao_treasury-0.0.64.dist-info/METADATA,sha256=mvz9huam9Gfqs52NpVQOhKLoWvn6xnEKyL5Rw2SKFTM,7231
52
+ dao_treasury-0.0.64.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
53
+ dao_treasury-0.0.64.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
54
+ dao_treasury-0.0.64.dist-info/RECORD,,
Binary file