Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Updated unique terms to work with previous functionality, and fixed a pagination bug#221

Merged
dionboles-asym merged 5 commits into
CD-543-tests-passingfrom
CD-646-unique_terms_return_page_object
Nov 22, 2023
Merged

Updated unique terms to work with previous functionality, and fixed a pagination bug#221
dionboles-asym merged 5 commits into
CD-543-tests-passingfrom
CD-646-unique_terms_return_page_object

Conversation

@dionboles-asym
Copy link
Copy Markdown
Contributor

This branch I updated unique terms to reference previous functionality and I fixed a pagination bug. I also had to remove the run method from all of my test.

Comment thread cdapython/results/page_result.py Outdated
self.total_row_count = next_result.total_row_count
return next_result
return None
# self.total_row_count = next_result.total_row_count
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove commented out code

Comment thread tests/test_no_embedded_pandas.py
Copy link
Copy Markdown
Contributor

@otchet-broad otchet-broad left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I left a few comments for some things that need cleanup, but overall seems good. I'm glad you're seeing improvements and identifying issues by adding test coverage.

Comment thread cdapython/utils/utility.py
Comment thread cdapython/utils/utility.py Outdated
Copy link
Copy Markdown
Contributor

@ahaessly ahaessly left a comment

Choose a reason for hiding this comment

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

a couple of minor comments

from cdapython.results.columns_result import ColumnsResult
from cdapython.results.factories.collect_result import CollectResult
from cdapython.results.page_result import get_query_result
from cdapython.results.page_result import Paged_Result, get_query_result
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a nit pick - usually I would expect to see either PagedResult or paged_result. This seems like a strange mix of the two. was there a specific reason to do this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just messed up with the naming convention when naming the class Paged_Result. https://peps.python.org/pep-0008/#descriptive-naming-styles


def test_unique_terms() -> None:
terms = unique_terms("sex", "GDC").run(host=host, show_term_count=True)
terms = unique_terms(col_name="sex", system="GDC", host=host, show_term_count=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this require a change to the documentation? If so, I think we should add a ticket for Amanda so she knows what to update in the documentation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This brings the functionality back in line with the documentation.

Copy link
Copy Markdown
Contributor

@otchet-broad otchet-broad left a comment

Choose a reason for hiding this comment

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

Thanks @dionboles-asym . Please note in the ticket for CD-646 that a new branch and pull request will need to be created to complete the work.

@dionboles-asym dionboles-asym merged commit 6f595e2 into CD-543-tests-passing Nov 22, 2023
@dionboles-asym dionboles-asym deleted the CD-646-unique_terms_return_page_object branch November 22, 2023 18:24
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.

3 participants