Compare commits
4 Commits
feat/csv_i
...
v0.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
067f354905 | ||
| f30076783d | |||
| 60e8ecc41a | |||
| 3c4a86010d |
@@ -2,6 +2,14 @@
|
||||
|
||||
<!--next-version-placeholder-->
|
||||
|
||||
## v0.3.0 (2022-04-26)
|
||||
### Feature
|
||||
* **wizard:** Add csv input flag ([`a9f97a9`](https://git.grassecon.net/cicnet/cic-cli/commit/a9f97a9a5c6908e4d51710e3b121764d2511c0ab))
|
||||
|
||||
### Fix
|
||||
* Tests ([`f300767`](https://git.grassecon.net/cicnet/cic-cli/commit/f30076783d5fc93d91d29e9343d62af4c0fdffaa))
|
||||
* Bump ci ([`60e8ecc`](https://git.grassecon.net/cicnet/cic-cli/commit/60e8ecc41a472dbea25c36d869259c8161145002))
|
||||
|
||||
## v0.2.3 (2022-03-22)
|
||||
### Fix
|
||||
* Remove this ([`92794a2`](https://git.grassecon.net/cicnet/cic-cli/commit/92794a2e3b2fc5ace63f519bbe5b23c542afc853))
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = "0.2.3"
|
||||
__version__ = "0.3.0"
|
||||
|
||||
@@ -4,15 +4,15 @@ def object_to_str(obj, keys):
|
||||
for key in keys:
|
||||
value = eval("obj." + key)
|
||||
key = key.replace("()", "")
|
||||
if type(value) == str:
|
||||
if isinstance(value, str):
|
||||
s += f"{key} = {value}\n"
|
||||
elif type(value) == list:
|
||||
elif isinstance(value, list):
|
||||
for idx, vv in enumerate(value):
|
||||
if not vv:
|
||||
s += f"{key}[{idx}] = \n"
|
||||
continue
|
||||
s += f"{key}[{idx}] = {vv}\n"
|
||||
elif type(value) == dict:
|
||||
elif isinstance(value, dict):
|
||||
for vv_key in value.keys():
|
||||
vv_value = value[vv_key]
|
||||
if not vv_value:
|
||||
|
||||
@@ -26,7 +26,7 @@ class StdoutWriter(OutputWriter):
|
||||
|
||||
|
||||
class KVWriter(OutputWriter):
|
||||
def __init__(self, *args, path=None, **kwargs):
|
||||
def __init__(self, path=None, *args, **kwargs):
|
||||
try:
|
||||
os.stat(path)
|
||||
except FileNotFoundError:
|
||||
@@ -42,7 +42,7 @@ class KVWriter(OutputWriter):
|
||||
|
||||
|
||||
class HTTPWriter(OutputWriter):
|
||||
def __init__(self, *args, path=None, **kwargs):
|
||||
def __init__(self, path=None, *args, **kwargs):
|
||||
super(HTTPWriter, self).__init__(*args, **kwargs)
|
||||
self.path = path
|
||||
|
||||
@@ -83,7 +83,7 @@ class KeyedWriterFactory:
|
||||
logg.debug(f"adding key {k} t keyed writer factory")
|
||||
self.x[k] = v
|
||||
|
||||
def new(self, *_args, path=None, **_kwargs):
|
||||
def new(self, path=None, *_args, **_kwargs):
|
||||
writer_keyed = None
|
||||
writer_immutable = None
|
||||
if self.key_writer_constructor is not None:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "cic-cli"
|
||||
version = "0.2.3"
|
||||
version = "0.3.0"
|
||||
description = "Generic cli tooling for the CIC token network"
|
||||
authors = [
|
||||
"Louis Holbrook <dev@holbrook.no>",
|
||||
|
||||
@@ -4,15 +4,14 @@ import random
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from cic.contract.components.attachment import Attachment
|
||||
from cic.contract.components.proof import Proof
|
||||
from cic.contract.processor import ContractProcessor
|
||||
# external imports
|
||||
from hexathon import add_0x
|
||||
|
||||
# local imports
|
||||
from cic.writers import KVWriter
|
||||
|
||||
# external imports
|
||||
from hexathon import add_0x
|
||||
from cic.contract.components.attachment import Attachment
|
||||
from cic.contract.components.proof import Proof
|
||||
from cic.contract.processor import ContractProcessor
|
||||
|
||||
test_base_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
test_data_dir = os.path.join(test_base_dir, "testdata")
|
||||
|
||||
@@ -14,7 +14,7 @@ from cic.keystore import KeystoreDirectory
|
||||
# test imports
|
||||
from tests.base_cic import test_base_dir
|
||||
|
||||
logging = logging.getLogger()
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
script_dir = test_base_dir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user