Skip to content

Conversation

@pollardld
Copy link
Member

Portal Sync - Merge 2025

This pull request includes several important changes to the project, focusing on adding CORS support, updating the CI workflow, and enhancing test coverage reporting. Additionally, a new management command for updating layer HTTP status has been added.

CORS Support:

  • Added corsheaders to INSTALLED_APPS and CorsMiddleware to MIDDLEWARE in the settings file. Configured CORS allowed origins and whitelist to support local development. (.github/.github/settings.py)

CI Workflow Updates:

  • Replaced the old Django CI workflow with a new workflow named Tests, which includes setting up Python, installing dependencies, running tests, and creating a coverage badge. (.github/.github/workflows/django.yml) [1] [2]

Test Coverage:

  • Added the coverage package to test_requirements.txt to enable test coverage reporting. (ci_testing/test_requirements.txt)
  • Updated README.md to include badges for test build status and coverage. (README.md)

Management Command:

  • Added a new management command update_least_recent_layer_http_status.py to check and update the HTTP status of the least recently checked layer. (layers/management/commands/update_least_recent_layer_http_status.py)

@pollardld pollardld requested a review from Copilot April 10, 2025 01:23
@pollardld pollardld self-assigned this Apr 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 102 out of 104 changed files in this pull request and generated 3 comments.

Files not reviewed (2)
  • .github/workflows/django.yml: Language not supported
  • ci_testing/test_requirements.txt: Language not supported

migrations.AddField(
model_name='multilayerdimension',
name='layer',
field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='layers.layer'),
Copy link

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

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

Using an empty string as the default for a ForeignKey is likely to cause issues since it expects an integer or a valid instance reference. Consider using a proper default value (e.g., None or a valid pk) or handling it via a custom migration data migration.

Suggested change
field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='layers.layer'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layers.layer'),

Copilot uses AI. Check for mistakes.
pollardld and others added 3 commits April 9, 2025 18:26
Add log before error

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntroduce essential configurations for CORS and testing
@pollardld pollardld requested a review from Copilot April 11, 2025 02:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 103 out of 103 changed files in this pull request and generated 2 comments.

pollardld and others added 2 commits April 11, 2025 11:34
Copy link
Member Author

@pollardld pollardld left a comment

Choose a reason for hiding this comment

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

Note to self: in the future, more frequent pull requests will allow for quicker and, likely, more accurate reviews.

@pollardld pollardld merged commit 07eb1e5 into main Apr 11, 2025
1 check failed
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.

4 participants