silkaj issueshttps://git.duniter.org/clients/python/silkaj/-/issues2020-07-02T17:46:26+02:00https://git.duniter.org/clients/python/silkaj/-/issues/263Poetry: post migration tasks (black, poetry)2020-07-02T17:46:26+02:00MoulPoetry: post migration tasks (black, poetry)- [x] Add `black` as a dev dependency. Will be installed in case Python used is ≥ 3.6 in order to keep Py3.5 compatibly.
- Update `CONTRIBUTING.md`.
- [ ] Add minimal Poetry version dependency: Specifying v1 does not prevent v0.12 to b...- [x] Add `black` as a dev dependency. Will be installed in case Python used is ≥ 3.6 in order to keep Py3.5 compatibly.
- Update `CONTRIBUTING.md`.
- [ ] Add minimal Poetry version dependency: Specifying v1 does not prevent v0.12 to be installed.0.8.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/255balance: display the content in tables2020-06-24T15:51:08+02:00matograinebalance: display the content in tablesFor lightness and consistency with the transaction_confirmation() display, the balance display might looks like:
```
╒═════════════════════════════════════╤══════════════════════════════════════════════╕
│ Balance of pubkey ...For lightness and consistency with the transaction_confirmation() display, the balance display might looks like:
```
╒═════════════════════════════════════╤══════════════════════════════════════════════╕
│ Balance of pubkey │ AhRMHUxMPXSeG7qXZrE6qCdjwK9p2bu5Eqei7xAWVEDK │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ Blockchain (unit|relative) │ 182483.75 ĞTest | 63.1869 UD ĞTest │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ Pending transaction (unit|relative) │ -100.0 ĞTest | -0.0346 UD ĞTest │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ Total amount (unit|relative) │ 182383.75 ĞTest | 63.1523 UD ĞTest │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ Total relative to M/N │ 0.21 x M/N │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ Total relative to M │ 0.04 % M │
╘═════════════════════════════════════╧══════════════════════════════════════════════╛
```
for now it is :
```
Blockchain:
-----------
Relative = 1.16 UD ĞTest
Quantitative = 3350.0 ĞTest
Pending Transaction:
--------------------
Relative = 0.03 UD ĞTest
Quantitative = 100.0 ĞTest
Total amount of: 3i7jBZz1bYVTtao3C6e7cN21JHYjHCDR9pKeReE4rdVe
----------------------------------------------------------------
Total Relative = 1.19 UD ĞTest
Total Quantitative = 3450.0 ĞTest
Total Relative to average money share = 0.0 × M/N
Total Relative to monetary mass = 0.081 % M
```
I already have the code for it, the question is only if it should be done or not.0.8.0matograinematograinehttps://git.duniter.org/clients/python/silkaj/-/issues/251Use and introduce a better date utility than datetime: pendulum2022-03-30T19:12:42+02:00MoulUse and introduce a better date utility than datetime: pendulum### Options
- [pendulum](https://pendulum.eustace.io/) − [repo](https://github.com/sdispater/pendulum) − [repology:py](https://repology.org/badge/vertical-allrepos/python:pendulum.svg) [repology](https://repology.org/badge/vertical-allre...### Options
- [pendulum](https://pendulum.eustace.io/) − [repo](https://github.com/sdispater/pendulum) − [repology:py](https://repology.org/badge/vertical-allrepos/python:pendulum.svg) [repology](https://repology.org/badge/vertical-allrepos/pendulum.svg): best time handling, by the author of Poetry, but not yet in Debian
- [Humanize](https://github.com/jmoiron/humanize) − [repology](https://repology.org/badge/vertical-allrepos/python:humanize.svg): time handling requires `datetime` usage, but not as good as `pendulum`, other humanize interesting tools, in Debian
- [Arrow](https://arrow.readthedocs.io/en/latest/) − [repo](https://github.com/crsmithdev/arrow) − [Debian package](https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=python3-arrow) − [repology](https://repology.org/badge/vertical-allrepos/python:arrow.svg) (didn’t found timedelta)
- [Delorean](https://delorean.readthedocs.io/en/latest/) − [repo](https://github.com/myusuf3/delorean)
- [`dateutil`](https://dateutil.readthedocs.io/en/stable/) − [repo](https://github.com/dateutil/dateutil/) − [repology](https://repology.org/badge/vertical-allrepos/python:python-dateutil.svg)
- `str(datetime.timedelta(secounds=X))` which is minimalist but works.
---
### Choice
- `pendulum`, and `humanize` seems to be the best libraries.0.8.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/236tx: Improve the confirmation display2020-06-24T16:10:34+02:00matograinetx: Improve the confirmation displayI'd like to change the confirmation display from :
```
╒════════════════════════════╤══════════════════════════════════════════════╕
│ pubkey’s balance before tx │ 2278.02 ĞTest │
├────────────────────────...I'd like to change the confirmation display from :
```
╒════════════════════════════╤══════════════════════════════════════════════╕
│ pubkey’s balance before tx │ 2278.02 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ total amount (unit) │ 15.7 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ total amount (relative) │ 0.018 UD ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ pubkey’s balance after tx │ 2262.32 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ from (pubkey) │ 3i7jBZz1bYVTtao3C6e7cN21JHYjHCDR9pKeReE4rdVe │
├────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ d88fPFbDdJXJANHH7hedFMaRyGcnVZj9c5cDaE76LRN │
├────────────────────────────┼──────────────────────────────────────────────┤
│ to (id) │ matograine-G1Test │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit) │ 8.7 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (relative) │ 0.01 UD ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ 5tKxzdi43AKPnYb4Bzjs1LZecceouvJ3ZaCrFTde2chf │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit) │ 2.6 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (relative) │ 0.003 UD ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ BpERUYSfdzFPGWuE1y3VoHxamnTnK4Q6dZTNbaSkL1j3 │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit) │ 4.4 ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ amount (relative) │ 0.005 UD ĞTest │
├────────────────────────────┼──────────────────────────────────────────────┤
│ comment │ BABA YAGA │
╘════════════════════════════╧══════════════════════════════════════════════╛
```
to :
```
╒════════════════════════════════╤══════════════════════════════════════════════╕
│ pubkey’s balance before tx │ 2272.32 ĞTest │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ total amount (unit | relative) │ 15.7 ĞTest || 0.018 UD │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ pubkey’s balance after tx │ 2256.62 ĞTest │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ from (pubkey) │ 3i7jBZz1bYVTtao3C6e7cN21JHYjHCDR9pKeReE4rdVe │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ d88fPFbDdJXJANHH7hedFMaRyGcnVZj9c5cDaE76LRN │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ to (id) │ matograine-G1Test │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit | relative) │ 8.7 ĞTest || 0.01 UD │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ 5tKxzdi43AKPnYb4Bzjs1LZecceouvJ3ZaCrFTde2chf │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit | relative) │ 2.6 ĞTest || 0.003 UD │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ to (pubkey) │ BpERUYSfdzFPGWuE1y3VoHxamnTnK4Q6dZTNbaSkL1j3 │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ amount (unit | relative) │ 4.4 ĞTest || 0.005 UD │
├────────────────────────────────┼──────────────────────────────────────────────┤
│ comment │ BABA YAGA │
╘════════════════════════════════╧══════════════════════════════════════════════╛
```0.8.0matograinematograinehttps://git.duniter.org/clients/python/silkaj/-/issues/210Close client session in every cases2020-06-02T17:56:32+02:00MoulClose client session in every casesFor instance, when aborting a certification:
```bash
Do you confirm sending this certification? [y/N]: n
Aborted!
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f02f5594348>
ERROR:asyncio...For instance, when aborting a certification:
```bash
Do you confirm sending this certification? [y/N]: n
Aborted!
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f02f5594348>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f02effd5dc8>, 7239440.848067479)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f02f55a16d8>
```
- [x] `cert`
- [x] `tx`: When aborting a transaction.
- [ ] #321: Use `with x as y:`?0.8.0MoulMoul