Skip to content

Commit

Permalink
Merge pull request #219 from george0st/change
Browse files Browse the repository at this point in the history
Addition income (transactions)
  • Loading branch information
george0st authored Aug 22, 2024
2 parents a1f9ed3 + 443930c commit 486a47f
Show file tree
Hide file tree
Showing 32 changed files with 564 additions and 549 deletions.
Binary file modified 02-data/01-size-100/01-basic_party.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/01-basic_party.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/02-basic_contact.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/02-basic_contact.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/03-basic_relation.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/03-basic_relation.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/04-basic_account.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/04-basic_account.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/05-basic_transaction.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/05-basic_transaction.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/06-basic_event.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/06-basic_event.parquet
Binary file not shown.
Binary file modified 02-data/01-size-100/07-basic_communication.csv.gz
Binary file not shown.
Binary file modified 02-data/01-size-100/07-basic_communication.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/01-basic_party.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/01-basic_party.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/02-basic_contact.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/02-basic_contact.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/03-basic_relation.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/03-basic_relation.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/04-basic_account.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/04-basic_account.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/05-basic_transaction.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/05-basic_transaction.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/06-basic_event.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/06-basic_event.parquet
Binary file not shown.
Binary file modified 02-data/02-size-1K/07-basic_communication.csv.gz
Binary file not shown.
Binary file modified 02-data/02-size-1K/07-basic_communication.parquet
Binary file not shown.
542 changes: 271 additions & 271 deletions 03-test/01-size-100.json

Large diffs are not rendered by default.

544 changes: 280 additions & 264 deletions 03-test/02-size-1k.json

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions generator/basic_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,22 @@ def generate(self, count):
dif_date = self.MAX_EVENT_HISTORY_MONTHS

for month in range(dif_date):
a = month * 30

# INCOME
# regular income (one per month till)
day=int(self.rnd_int(1,21))
new_date=self.change_date(date_to.year, date_to.month, day, - month)
# INCOME - regular income (one per month till)
new_date=self.change_date(date_to.year,
date_to.month,
int(self.rnd_int(1,21)),
- month)
if new_date > date_to:
continue

#new_date=date_to-datetime.timedelta(days=a+b)
self.model.append(self._create_transaction(account, new_date, True))

# addition income (0..2 times)
# for _ in range(int(self.rnd_choose([0,1,2],[0.9, 0.08, 0.02]))):
# b = int(self.rnd_int(1, 29))
# new_date=date_to-datetime.timedelta(days=a+b)
# self.model.append(self._create_transaction(account, new_date, True))
# INCOME - addition income (0..2 times)
for _ in range(int(self.rnd_choose([0,1,2],[0.9, 0.08, 0.02]))):
new_date = self.change_date(date_to.year,
date_to.month,
int(self.rnd_int(1, 29)),
- month)
self.model.append(self._create_transaction(account, new_date, True))

# OUTCOME

Expand Down
2 changes: 1 addition & 1 deletion generator/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Store the version here so:

__version__ = '0.3.0'
__version__ = '0.3.1'

0 comments on commit 486a47f

Please sign in to comment.