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

Apply a set of changes to an Atlas as a view #300

Merged
merged 23 commits into from
Dec 12, 2018
Merged

Apply a set of changes to an Atlas as a view #300

merged 23 commits into from
Dec 12, 2018

Conversation

matthieun
Copy link
Collaborator

Description:

Apply a set of changes to an Atlas as a view. Related PRs to this branch are listed here:
#281

Potential Impact:

New Feature

Unit Test Approach:

Added a lot of unit tests for all the related use cases.

Test Results:

Tests pass.


In doubt: Contributing Guidelines

matthieun and others added 18 commits November 16, 2018 16:00
* test change ideas

* more

* better comments

* test skeleton

* test and more details

* more testing and validation

* refactoring

* validation public

* move around and fix test

* touchup

* code review comments and shallow bloated features and more testing

* added bloated relation

* added test

* added relation testing to edge and node

* fix compilation errors

* finished bloated features and related tests

* added missing change items
* few changes and some tests

* more tests

* add synchronized

* code review comments
* Fixed entitiesFor if an entity was missing

* Checkstyle and comment change

* ChangeNodes now filter out edges which are connected but do not exist

* ChangeNodes now filter out parent relations which do not exist.

* Checkstyle correction in BloatedAtlas interface BloatedEntity, and
FeatureChange comment update.

* Added a ChangeAtlasTest and ChangeAtlasTestRule. Remove these before PR

* Implemented proper bounding for all the bloated entities

* Removed local ChangeAtlasTest

* Fixed spotless errors. but now unit tests are failing

* Fixed a bunch of issues with bounds calculation

* Spotless
* Fixed failing unit tests

* Fixed a typo
…ge (#286)

* with failing tests

* Validation

* synchronize add and get
* Edges now filter themselves out if one of their connected nodes is missing

* Relations now filter out members which do not exist. ChangeAtlas filters empty/shallow relations

* Added a test to demonstrate that shallow relation removal is robust

* Spotless apply

* Added some additional relation tests

* Updated a comment
* tests shuffle

* All tests

* spotless

* logger not used
* compilation and sonar

* forgotten some methods

* package simplification and Javadoc

* forgot tests
* add more complex unit tests

* AtlasChangeGenerator

* Added shortcuts for tags
* Added feature change mergeability

* Attempt merge in change

* more tests

* even more tests

* last one?
* relation member feature merging broken

* Merge relations in many more places

* Fix tests and change osmIdentifier API in relation

* Added equality tests

* Some cleanup from testing

* Fixed tests and added new relation based generator
* Keep track of explicitly removed relation members

* use method overloading
…d after Atlas (#293)

* Started working on a diff generator

* Working on basic AtlasDiff

* Still trying to make valid test case

* Removed relations from test atlas

* Removed node from before atlas

* Still working on diff

* Continuing draft of the AtlasDiff

* Saving temporary working changes

* Lots more doc comments

* Added more comments

* Fixed compilation errors after rebase

* Working on modified entities, more comments

* Working on modify case.

* Lots of new stuff. Doesnt compile lol

* Trying node diffs

* Trying to get parent relations test to work

* Refactor name

* Working on relation support. THings may need to change

* More progress

* getTagChangeIfNecessary now respects useBloated and saveGeo flags. Also fixed a bug in parentRelationIfNec

* Finished member in relation diffing

* Added edge diff

* Added the rest of the changeIfNecessary method

* Relation diffs and more testing

* Finished implementing tests

* Checkstyle and spotless

* Added PackedAtlasCloning equality to tests

* Updated a test

* Tests still failing even after rebase :(

* Isolating bug using testatlas

* Trying to fix bug...

* Further bugfix. Using non-bloated entities still does not work

* Expose bug when using non-bloated entities

* Bug fix in place. Disallowing non-Bloated entities for FeatureChanges. Need to refactor stuff.

* Removed all geometry matching related code. This feature is not necessary due to improved WaySectionProcessor.

* Removed TODOs in AtlasDiff

* Removed useBloatedEntities option

* AtlasDiff now returns an Optional<Change>, and empty Changes are disallowed by the validator

* Fixed Sonar issues in AtlasDiff and AtlasDiffHelper

* Refactored interface for BloatedRelation::withMembers

* Rename variables for clarity

* Fixed awkward copy-pasted typo

* Minor method name refactor

* Fixed a unit test that used a non-Bloated type to create a feature change

* Refactored withMembers to be more null-safe

* Added javadoc

* Removed old method
@matthieun matthieun closed this Dec 6, 2018
@matthieun matthieun changed the title Apply a set of changes to an Atlas as a view [DNM] Apply a set of changes to an Atlas as a view Dec 6, 2018
Copy link

@sonarcloud sonarcloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 16

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  2. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  3. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  4. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  5. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  6. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)

See all issues in SonarCloud

@matthieun
Copy link
Collaborator Author

Closing until sonar issues are resolved.

@matthieun matthieun closed this Dec 7, 2018
@matthieun matthieun reopened this Dec 11, 2018
Copy link

@sonarcloud sonarcloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 11

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  2. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  3. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  4. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  5. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  6. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)

See all issues in SonarCloud

@matthieun matthieun closed this Dec 11, 2018
@matthieun matthieun reopened this Dec 11, 2018
@sonarcloud sonarcloud bot deleted a comment from matthieun Dec 11, 2018
Copy link

@sonarcloud sonarcloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 8

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  2. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  3. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  4. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  5. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  6. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)

See all issues in SonarCloud

@matthieun matthieun changed the title [DNM] Apply a set of changes to an Atlas as a view Apply a set of changes to an Atlas as a view Dec 12, 2018
Copy link

@sonarcloud sonarcloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 8

Including the following issue(s) which could not be reported in line:

  1. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  2. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  3. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  4. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  5. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)
  6. Code Smell Code Smell: 1 duplicated blocks of code must be removed. (more)

See all issues in SonarCloud

*/
@Deprecated
@Override
public Optional<Atlas> subAtlas(final Predicate<AtlasEntity> matcher)
Copy link

Choose a reason for hiding this comment

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

Code Smell Code Smell: Do not forget to remove this deprecated code someday. (squid:S1133)

See it in SonarCloud

*/
@Deprecated
@Override
public Optional<Atlas> subAtlas(final Polygon boundary)
Copy link

Choose a reason for hiding this comment

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

Code Smell Code Smell: Do not forget to remove this deprecated code someday. (squid:S1133)

See it in SonarCloud

Copy link
Contributor

@lucaspcram lucaspcram left a comment

Choose a reason for hiding this comment

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

Excited to have these changes included!

@lucaspcram lucaspcram merged commit 4cfd628 into dev Dec 12, 2018
@matthieun matthieun added this to the 5.3.0 milestone Dec 12, 2018
@lucaspcram
Copy link
Contributor

lucaspcram commented Jan 3, 2019

Just documenting that PR #306 and PR #307 relates to this as well.

@matthieun matthieun deleted the change branch February 4, 2019 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants