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

[Fixes #9101] Keywords filter only returns the root nodes of the tree #9111

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

afabiani
Copy link
Member

References: #9101

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.

@afabiani afabiani added backport 3.3.x PR should be backported to target version backport 4.x labels Apr 14, 2022
@afabiani afabiani added this to the 4.0.0 milestone Apr 14, 2022
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Apr 14, 2022
@lgtm-com
Copy link

lgtm-com bot commented Apr 14, 2022

This pull request introduces 1 alert when merging d92fa7a into 9311864 - view on LGTM.com

new alerts:

  • 1 for Modification of parameter with default

Copy link
Contributor

@marthamareal marthamareal left a comment

Choose a reason for hiding this comment

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

@afabiani, This looks good, maybe we could add some unit tests for this on API api/v2/keywords

@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #9111 (a9d9557) into master (9311864) will increase coverage by 0.04%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##           master    #9111      +/-   ##
==========================================
+ Coverage   60.65%   60.69%   +0.04%     
==========================================
  Files         805      805              
  Lines       49215    49252      +37     
  Branches     7570     7574       +4     
==========================================
+ Hits        29852    29895      +43     
+ Misses      17706    17697       -9     
- Partials     1657     1660       +3     

@giohappy giohappy removed the request for review from mattiagiupponi April 15, 2022 07:49
giohappy
giohappy previously approved these changes Apr 15, 2022
@afabiani afabiani marked this pull request as ready for review April 15, 2022 11:36
@lgtm-com
Copy link

lgtm-com bot commented Apr 15, 2022

This pull request introduces 1 alert when merging a9d9557 into 9311864 - view on LGTM.com

new alerts:

  • 1 for Modification of parameter with default

Copy link
Contributor

@mattiagiupponi mattiagiupponi left a comment

Choose a reason for hiding this comment

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

I think would be valuable to have a test to cover this kind of scenario, a parent with a child that have a child.
image

@giohappy
Copy link
Contributor

I think would be valuable to have a test to cover this kind of scenario, a parent with a child that have a child.

@mattiagiupponi recursive cases should be accounted by the tests, without having to so specific tests. Otherwise we also need a test for further levels.

If we're not covering the recursive case tests must be improved.

@afabiani
Copy link
Member Author

I think would be valuable to have a test to cover this kind of scenario, a parent with a child that have a child.

@mattiagiupponi recursive cases should be accounted by the tests, without having to so specific tests. Otherwise we also need a test for further levels.

If we're not covering the recursive case tests must be improved.

Not sure I understood... when you invoke the rest endpoint the outcome is generated by triggering the recursive function... I can add other levels, but I really don't think this would change something

@afabiani afabiani self-assigned this Apr 15, 2022
@giohappy giohappy merged commit 48e7613 into master Apr 15, 2022
@github-actions
Copy link
Contributor

The backport to 3.3.x failed:

The process 'git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.3.x 3.3.x
# Navigate to the new working tree
cd .worktrees/backport-3.3.x
# Create a new branch
git switch --create backport-9111-to-3.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 48e761342f9eb1157a6cd1fb4b0f5b8b2f7b9c22
# Push it to GitHub
git push --set-upstream origin backport-9111-to-3.3.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.3.x

Then, create a pull request where the base branch is 3.3.x and the compare/head branch is backport-9111-to-3.3.x.

github-actions bot pushed a commit that referenced this pull request Apr 15, 2022
…#9111)

* [Fixes #9101] Keywords filter only returns the root nodes of the tree

* [CircleCi] Testing Hierarchical Keywords tree
afabiani pushed a commit that referenced this pull request Apr 15, 2022
…#9111) (#9121)

* [Fixes #9101] Keywords filter only returns the root nodes of the tree

* [CircleCi] Testing Hierarchical Keywords tree

Co-authored-by: Alessio Fabiani <[email protected]>
@afabiani afabiani deleted the ISSUE_9101 branch April 15, 2022 15:01
afabiani pushed a commit that referenced this pull request Apr 15, 2022
…t nodes of the tree (#9111) (#9121)

* [Fixes #9101] Keywords filter only returns the root nodes of the tree

* [CircleCi] Testing Hierarchical Keywords tree

Co-authored-by: Alessio Fabiani <[email protected]>
afabiani pushed a commit that referenced this pull request Apr 15, 2022
…t nodes of the tree (#9111) (#9121) (#9124)

* [Fixes #9101] Keywords filter only returns the root nodes of the tree

* [CircleCi] Testing Hierarchical Keywords tree

Co-authored-by: Alessio Fabiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 3.3.x PR should be backported to target version cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants