Skip to content

Commit

Permalink
let's try this again
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed Oct 2, 2019
1 parent cb9d789 commit 995af36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ SHELL := bash
PROJECT = speid
PYTHON = python3.7
DOCKER = docker-compose run --rm $(PROJECT)
ISORT = venv/bin/isort -rc -ac $(PROJECT) tests
BLACK = venv/bin/black -S -l 79 --target-version py37 $(PROJECT) tests
ISORT = isort -rc -ac $(PROJECT) tests
BLACK = black -S -l 79 --target-version py37 $(PROJECT) tests



Expand All @@ -22,7 +22,7 @@ format:
$(BLACK)

lint:
venv/bin/flake8 $(PROJECT) tests setup.py
flake8 $(PROJECT) tests setup.py
$(ISORT) --check-only
$(BLACK) --check

Expand Down
4 changes: 1 addition & 3 deletions speid/commands/spei.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ def migrate_from_csv(transactions, events, requests):
for _, e in transaction_events.iterrows():
transaction.events.append(
Event(
created_at=datetime.fromisoformat(e['created_at']),
type=EventType[e['type']],
metadata=e['meta'],
created_at=datetime.strptime(
e['created_at'], '%Y-%m-%d %H:%M:%S.%f'
),
)
)

Expand Down
4 changes: 3 additions & 1 deletion speid/models/events.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import datetime

from mongoengine import Document, StringField

from speid.types import EventType
Expand All @@ -6,6 +8,6 @@


class Event(Document):
created_at = date_now()
created_at: datetime.datetime = date_now()
type = EnumField(EventType)
metadata = StringField()

0 comments on commit 995af36

Please sign in to comment.