Skip to content

Commit 36a2dca

Browse files
committed
update project struct
1 parent 9697f55 commit 36a2dca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+2111
-780
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,5 @@ ENV/
109109
*.sqlite3
110110
outfile*
111111

112-
src/results
113-
src/results_all
112+
benchmarks/results
113+
benchmarks/results_all

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
checkfiles = benchmarks/
2+
black_opts = -l 100 -t py38
3+
PASSWORD ?= "123456"
4+
5+
up:
6+
@poetry update
7+
8+
deps:
9+
@poetry install
10+
11+
style: deps
12+
isort -src $(checkfiles)
13+
black $(black_opts) $(checkfiles)
14+
15+
check: deps
16+
black --check $(black_opts) $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
17+
flake8 $(checkfiles)
18+
bandit -x tests,benchmark -r $(checkfiles)
19+
20+
benchmark: deps
21+
sh benchmarks/benchmark_all.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/django/manage-simple.py renamed to benchmarks/django/manage-simple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33
import sys
44

5-
if __name__ == '__main__':
6-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simple.settings')
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "simple.settings")
77
try:
88
from django.core.management import execute_from_command_line
99
except ImportError as exc:
File renamed without changes.
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Generated by Django 2.2.3 on 2019-07-29 19:22
2+
3+
from decimal import Decimal
4+
from django.db import migrations, models
5+
import django.db.models.deletion
6+
import jsonfield.fields
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
initial = True
12+
13+
dependencies = []
14+
15+
operations = [
16+
migrations.CreateModel(
17+
name="Journal1",
18+
fields=[
19+
(
20+
"id",
21+
models.AutoField(
22+
auto_created=True,
23+
primary_key=True,
24+
serialize=False,
25+
verbose_name="ID",
26+
),
27+
),
28+
("timestamp", models.DateTimeField(auto_now_add=True)),
29+
("level", models.SmallIntegerField(db_index=True)),
30+
("text", models.CharField(db_index=True, max_length=255)),
31+
],
32+
),
33+
migrations.CreateModel(
34+
name="Journal3",
35+
fields=[
36+
(
37+
"id",
38+
models.AutoField(
39+
auto_created=True,
40+
primary_key=True,
41+
serialize=False,
42+
verbose_name="ID",
43+
),
44+
),
45+
("timestamp", models.DateTimeField(auto_now_add=True)),
46+
("level", models.SmallIntegerField(db_index=True)),
47+
("text", models.CharField(db_index=True, max_length=255)),
48+
("col_float1", models.FloatField(default=2.2)),
49+
("col_smallint1", models.SmallIntegerField(default=2)),
50+
("col_int1", models.IntegerField(default=2000000)),
51+
("col_bigint1", models.BigIntegerField(default=99999999)),
52+
("col_char1", models.CharField(default="value1", max_length=255)),
53+
(
54+
"col_text1",
55+
models.TextField(
56+
default="Moo,Foo,Baa,Waa,Moo,Foo,Baa,Waa,Moo,Foo,Baa,Waa"
57+
),
58+
),
59+
(
60+
"col_decimal1",
61+
models.DecimalField(
62+
decimal_places=8, default=Decimal("2.2"), max_digits=12
63+
),
64+
),
65+
(
66+
"col_json1",
67+
jsonfield.fields.JSONField(
68+
default={"a": 1, "b": "b", "c": [2], "d": {"e": 3}, "f": True}
69+
),
70+
),
71+
("col_float2", models.FloatField(null=True)),
72+
("col_smallint2", models.SmallIntegerField(null=True)),
73+
("col_int2", models.IntegerField(null=True)),
74+
("col_bigint2", models.BigIntegerField(null=True)),
75+
("col_char2", models.CharField(max_length=255, null=True)),
76+
("col_text2", models.TextField(null=True)),
77+
(
78+
"col_decimal2",
79+
models.DecimalField(decimal_places=8, max_digits=12, null=True),
80+
),
81+
("col_json2", jsonfield.fields.JSONField(null=True)),
82+
("col_float3", models.FloatField(default=2.2)),
83+
("col_smallint3", models.SmallIntegerField(default=2)),
84+
("col_int3", models.IntegerField(default=2000000)),
85+
("col_bigint3", models.BigIntegerField(default=99999999)),
86+
("col_char3", models.CharField(default="value1", max_length=255)),
87+
(
88+
"col_text3",
89+
models.TextField(
90+
default="Moo,Foo,Baa,Waa,Moo,Foo,Baa,Waa,Moo,Foo,Baa,Waa"
91+
),
92+
),
93+
(
94+
"col_decimal3",
95+
models.DecimalField(
96+
decimal_places=8, default=Decimal("2.2"), max_digits=12
97+
),
98+
),
99+
(
100+
"col_json3",
101+
jsonfield.fields.JSONField(
102+
default={"a": 1, "b": "b", "c": [2], "d": {"e": 3}, "f": True}
103+
),
104+
),
105+
("col_float4", models.FloatField(null=True)),
106+
("col_smallint4", models.SmallIntegerField(null=True)),
107+
("col_int4", models.IntegerField(null=True)),
108+
("col_bigint4", models.BigIntegerField(null=True)),
109+
("col_char4", models.CharField(max_length=255, null=True)),
110+
("col_text4", models.TextField(null=True)),
111+
(
112+
"col_decimal4",
113+
models.DecimalField(decimal_places=8, max_digits=12, null=True),
114+
),
115+
("col_json4", jsonfield.fields.JSONField(null=True)),
116+
],
117+
),
118+
migrations.CreateModel(
119+
name="Journal2",
120+
fields=[
121+
(
122+
"id",
123+
models.AutoField(
124+
auto_created=True,
125+
primary_key=True,
126+
serialize=False,
127+
verbose_name="ID",
128+
),
129+
),
130+
("timestamp", models.DateTimeField(auto_now_add=True)),
131+
("level", models.SmallIntegerField(db_index=True)),
132+
("text", models.CharField(db_index=True, max_length=255)),
133+
(
134+
"parent",
135+
models.ForeignKey(
136+
null=True,
137+
on_delete=django.db.models.deletion.CASCADE,
138+
related_name="children",
139+
to="simple.Journal2",
140+
),
141+
),
142+
(
143+
"related",
144+
models.ManyToManyField(
145+
related_name="related_from", to="simple.Journal2"
146+
),
147+
),
148+
],
149+
),
150+
]

0 commit comments

Comments
 (0)