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

feat(location): support Map #30648

Merged
merged 29 commits into from
Nov 21, 2024
Merged

feat(location): support Map #30648

merged 29 commits into from
Nov 21, 2024

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Jun 24, 2024

Issue # (if applicable)

Closes #30647.

Reason for this change

In aws-location-alpha, map has not been supported yet.

Description of changes

Add Map class.

Description of how you validated changes

Add a unit test and a integ test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team June 24, 2024 16:39
@github-actions github-actions bot added star-contributor [Pilot] contributed between 25-49 PRs to the CDK feature-request A feature should be added or improved. p2 labels Jun 24, 2024
export enum CustomLayer {
/**
* The POI custom layer adds a richer set of places, such as shops, services, restaurants, attractions, and other points of interest to your map.
* Currently only the VectorEsriNavigation map style supports the POI custom layer.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered adding this validation, but decided against it as I thought the scope might expand in the future, potentially making it unnecessary. Please provide any opinions if you have them.

/**
* An India (IND) political view
*/
INDIA = 'IND',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to docs, political view can only be used with specific styles. However, considering the possibility that future AWS updates might expand its applicability, I have decided not to add validation at this time.

Please provide any feedback if you have any.

@mazyu36 mazyu36 marked this pull request as ready for review June 24, 2024 17:05
@mazyu36 mazyu36 force-pushed the location-service-map branch from 6945287 to 9d9b731 Compare June 24, 2024 17:08
@khushail khushail added the effort/small Small work item – less than a day of effort label Jun 24, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 25, 2024
This was referenced Jul 1, 2024
@mazyu36 mazyu36 force-pushed the location-service-map branch from c65cae2 to 91e92e2 Compare July 29, 2024 14:55
mergify bot pushed a commit that referenced this pull request Jul 31, 2024
…x class (#30974)

### Issue # (if applicable)

N/A

### Reason for this change
Add validation for PlaceIndex description, similar to #30648, #30682, and #30711 .



### Description of changes
Add validation and unit tests for description.


### Description of how you validated changes
Add unit tests.


### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

I've added some minor comments.

packages/@aws-cdk/aws-location-alpha/lib/map.ts Outdated Show resolved Hide resolved
})).toThrow('`description` must be between 0 and 1000 characters. Received: 1001 characters');
});

test('throws with invalid name', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding the test about invalid name length?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I've added a test.
Also I've refactored the code to separate the regex pattern check and length check, as I think it would be more user-friendly.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 4, 2024
@mazyu36
Copy link
Contributor Author

mazyu36 commented Nov 4, 2024

@badmintoncryer
Thank you for the review!
I’ve updated.

Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

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

Please delete only the tests that were likely left behind by mistake!

packages/@aws-cdk/aws-location-alpha/test/map.test.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-location-alpha/test/map.test.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 5, 2024
@paulhcsun paulhcsun self-assigned this Nov 6, 2024
@paulhcsun paulhcsun removed their assignment Nov 19, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Really high quality PR, appreciate it!

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.17%. Comparing base (e3024fc) to head (0ce3049).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #30648   +/-   ##
=======================================
  Coverage   77.17%   77.17%           
=======================================
  Files         105      105           
  Lines        7169     7169           
  Branches     1315     1315           
=======================================
  Hits         5533     5533           
  Misses       1455     1455           
  Partials      181      181           
Flag Coverage Δ
suite.unit 77.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 77.17% <ø> (ø)
---- 🚨 Try these New Features:

Copy link
Contributor

mergify bot commented Nov 20, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mazyu36
Copy link
Contributor Author

mazyu36 commented Nov 20, 2024

@Mergifyio update

Copy link
Contributor

mergify bot commented Nov 20, 2024

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Nov 21, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0ce3049
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 98b801c into aws:main Nov 21, 2024
17 checks passed
Copy link
Contributor

mergify bot commented Nov 21, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-location-alpha): support L2 Map Construct
6 participants