-
Notifications
You must be signed in to change notification settings - Fork 0
Test Workflow #27
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
Test Workflow #27
Conversation
092255f
to
e01bc7f
Compare
fd54686
to
906c0f6
Compare
906c0f6
to
8c12ad0
Compare
scripts/split.py
Outdated
input_file = "/home/parth/workplace/django-singlestore/scripts/setup.sql" | ||
output_dir = "/home/parth/workplace/django-singlestore/scripts/setup_sections" | ||
|
||
split_sql_file(input_file, output_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new line
749d428
to
d96e865
Compare
scripts/setup.sql
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably you can remove this file now
d96e865
to
66c3627
Compare
scripts/run_group.py
Outdated
os.environ["DJANGO_HOME"] = DJANGO_HOME | ||
|
||
os.environ["PYTHONPATH"] = ( | ||
f"{DJANGO_HOME}:{DJANGO_HOME}/tests:{DJANGO_SINGLESTORE_HOME}/scripts:{DJANGO_SINGLESTORE_HOME}/scripts/singlestore_settings:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove {DJANGO_SINGLESTORE_HOME}/scripts/singlestore_settings
scripts/get_test_matrix.py
Outdated
subdirs_to_skip = { | ||
"": {"import_error_package", "test_runner_apps", "__pycache__", "requirements"}, | ||
"gis_tests": {"data"}, | ||
} | ||
|
||
test_modules = [] | ||
|
||
for item in os.listdir(tests_root): | ||
full_path = os.path.join(tests_root, item) | ||
if not os.path.isdir(full_path) or item in subdirs_to_skip.get("", set()): | ||
continue | ||
test_modules.append(item) | ||
|
||
return test_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subdirs_to_skip = { | |
"": {"import_error_package", "test_runner_apps", "__pycache__", "requirements"}, | |
"gis_tests": {"data"}, | |
} | |
test_modules = [] | |
for item in os.listdir(tests_root): | |
full_path = os.path.join(tests_root, item) | |
if not os.path.isdir(full_path) or item in subdirs_to_skip.get("", set()): | |
continue | |
test_modules.append(item) | |
return test_modules | |
subdirs_to_skip = {"import_error_package", "test_runner_apps", "__pycache__", "requirements"} | |
test_modules = [] | |
for item in os.listdir(tests_root): | |
full_path = os.path.join(tests_root, item) | |
if not os.path.isdir(full_path) or item in subdirs_to_skip: | |
continue | |
test_modules.append(item) | |
return test_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can simplify this, for example, as suggested above
USE_TZ = False | ||
# TIME_ZONE = "UTC" | ||
|
||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I remember correctly, now we can remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was already present in the settings.py file of the Django project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When removing this , running testing are giving the following warning.
WARNINGS: m2m_multiple.Article: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. m2m_multiple.Category: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
So for now, I’m keeping this setting in place. I’ll remove it later once we’ve confirmed it won’t cause any issues.
7c8ce0c
to
02b66d5
Compare
02b66d5
to
0138f1e
Compare
69dafc4
to
f150405
Compare
scripts/run_group.py
Outdated
sql_statements = [s.strip() for s in sql_script.split(';') if s.strip()] | ||
|
||
for db_name in databases: | ||
print(f"Execing setup script for module '{module}' in database '{db_name}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: Execing -> Executing
f150405
to
7810b6b
Compare
No description provided.