Skip to content
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

Update locations 1 #5775

Closed
wants to merge 1 commit into from
Closed

Update locations 1 #5775

wants to merge 1 commit into from

Conversation

norkans7
Copy link

@norkans7 norkans7 commented Jan 9, 2025

No description provided.

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fa247ba) to head (e54497c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5775   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          446       448    +2     
  Lines        25133     25165   +32     
=========================================
+ Hits         25133     25165   +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 force-pushed the update-locations-1 branch 4 times, most recently from 27384fa to c735b2b Compare January 9, 2025 16:03
geometries = GeometryManager()

class Meta:
indexes = [models.Index(Upper("name"), name="locations_by_name")]
Copy link
Member

Choose a reason for hiding this comment

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

where is this used?

Copy link
Member

Choose a reason for hiding this comment

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

If we keep it, let's switch to Lower("name") instead as most other models use lower instead of upper.

level = models.IntegerField()
parent = TreeForeignKey("self", null=True, on_delete=models.PROTECT, related_name="children", db_index=True)
path = models.CharField(max_length=768) # e.g. Rwanda > Kigali
simplified_geometry = models.JSONField(null=True)
Copy link
Member

Choose a reason for hiding this comment

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

Did we used to store two types of geometry? One simplified and one not?

Copy link
Author

Choose a reason for hiding this comment

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

I think so as that is how the extraction is done with posm

Copy link
Author

Choose a reason for hiding this comment

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

Or that was just to match the simplified_geometry field we get from the extraction

name = models.CharField(max_length=Location.MAX_NAME_LEN, help_text="The name for our alias")

class Meta:
indexes = [models.Index(Upper("name"), name="locationaliases_by_name")]
Copy link
Member

Choose a reason for hiding this comment

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

as above

simplified_geometry = models.JSONField(null=True)

objects = NoGeometryManager()
geometries = GeometryManager()
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't feel worth having

@norkans7 norkans7 requested a review from rowanseymour January 10, 2025 10:53
@norkans7 norkans7 marked this pull request as ready for review January 10, 2025 10:54
@norkans7 norkans7 marked this pull request as draft January 10, 2025 15:20
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants