Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A pack of fixes #1

Merged
merged 6 commits into from
Oct 19, 2020
Merged

A pack of fixes #1

merged 6 commits into from
Oct 19, 2020

Conversation

MrCry0
Copy link

@MrCry0 MrCry0 commented Oct 18, 2020

  • convert all end lines into *nix-compatible format.
  • add the script to generate the Taxer SDK in Linux/*nix.
  • improve logging.
  • fix names in UserAccount class.

Oleksandr Suvorov added 6 commits October 18, 2020 13:16
Add the *nix-version of script to generate the Taxer API SDK.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
The LF end of line style compatibe both with DOS/Windows and *nix
systems, whereas the CR/LF format seems ugly in *nix systems.
Convert all text files in the project to *nix format.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Throw an exception if input user account data is invalid.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
There are different names of some fields in auto-generated file
'accounts.json' and UserAccount class. It causes a failure of
user accounts import [1].
Fix this issue.

[1]
--------------------------------------------------------------------------
2020-10-18 18:38:04 INFO     datadir                                  taxer-api url 'http://127.0.0.1:7080'
Traceback (most recent call last):
  File "main.py", line 47, in <module>
    acc = d.UserAccounts(userid)
  File "/home/cryo/src/github/py-pbank-statements/datadir.py", line 138, in UserAccounts
    return UserAccounts(schema().load(accounts_json, many=True, partial=True, unknown=RAISE))
  File "/home/cryo/.local/lib/python3.8/site-packages/marshmallow_dataclass/__init__.py", line 544, in load
    all_loaded = super().load(data, many=many, **kwargs)
  File "/home/cryo/.local/lib/python3.8/site-packages/marshmallow/schema.py", line 723, in load
    return self._do_load(
  File "/home/cryo/.local/lib/python3.8/site-packages/marshmallow/schema.py", line 905, in _do_load
    raise exc
marshmallow.exceptions.ValidationError: {0: {'tf_bank_corr_account': ['Unknown field.'], 'tf_bank_corr': ['Unknown field.'], 'tf_bank_place': ['Unknown field.'], 'tf_bank_corr_swift': ['Unknown field.'], 'tf_bank_corr_place': ['Unknown field.'], 'tf_bank_swift': ['Unknown field.']}, 1: {'tf_bank_corr_account': ['Unknown field.'], 'tf_bank_corr': ['Unknown field.'], 'tf_bank_place': ['Unknown field.'], 'tf_bank_corr_swift': ['Unknown field.'], 'tf_bank_corr_place': ['Unknown field.'], 'tf_bank_swift': ['Unknown field.']}}

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Read user accounts once.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
- improve existing logging of success conditions;
- add logging of non-success conditions.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
@maxsivkov maxsivkov merged commit cf8c3fa into maxsivkov:master Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants