Skip to content

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

Merged
merged 13 commits into from
Jul 10, 2025
Merged

Test Workflow #27

merged 13 commits into from
Jul 10, 2025

Conversation

psharma-1909
Copy link
Contributor

No description provided.

@psharma-1909 psharma-1909 requested a review from a team as a code owner June 24, 2025 10:20
@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch 2 times, most recently from 092255f to e01bc7f Compare June 26, 2025 11:16
@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch 10 times, most recently from fd54686 to 906c0f6 Compare July 2, 2025 10:41
@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch from 906c0f6 to 8c12ad0 Compare July 2, 2025 11:38
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new line

@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch 4 times, most recently from 749d428 to d96e865 Compare July 9, 2025 13:43
Copy link
Collaborator

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

@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch from d96e865 to 66c3627 Compare July 9, 2025 13:50
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:"
Copy link
Collaborator

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

Comment on lines 9 to 16
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Collaborator

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"
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove this line

Copy link
Contributor Author

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.

@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch 5 times, most recently from 7c8ce0c to 02b66d5 Compare July 9, 2025 19:37
@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch from 02b66d5 to 0138f1e Compare July 9, 2025 19:46
@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch 3 times, most recently from 69dafc4 to f150405 Compare July 9, 2025 21:23
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}'")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Execing -> Executing

@psharma-1909 psharma-1909 force-pushed the psharma/test_workflow branch from f150405 to 7810b6b Compare July 10, 2025 11:07
@psharma-1909 psharma-1909 merged commit 26ac94b into main Jul 10, 2025
9 of 14 checks passed
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.

2 participants