Skip to content

support sorting by multiple columns#422

Merged
joocer merged 1 commit intomainfrom
0.6.28-release
Oct 8, 2025
Merged

support sorting by multiple columns#422
joocer merged 1 commit intomainfrom
0.6.28-release

Conversation

@joocer
Copy link
Member

@joocer joocer commented Oct 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 8, 2025 19:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes unused imports across multiple test files and code modules, while also making minor code formatting improvements to adhere to style guidelines.

  • Removed numerous unused imports from test files and modules
  • Fixed f-string usage by removing unnecessary f-prefixes where string interpolation wasn't used
  • Updated version number from 0.6.27 to 0.6.28
  • Improved code formatting and line wrapping for better readability

Reviewed Changes

Copilot reviewed 57 out of 57 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/* Removed unused imports across multiple test files
mabel/version.py Updated version number to 0.6.28
mabel/utils/* Improved code formatting and removed unnecessary f-strings
mabel/data/* Enhanced code formatting and readability
mabel/adapters/* Code style improvements and formatting
examples/Reading Data.ipynb Removed unused Reader import
Makefile Updated build configuration with better formatting
Comments suppressed due to low confidence (1)

mabel/data/writers/writer.py:1

  • Similar to the previous issue, these InvalidDataSetError exceptions are created but not raised. They should be prefixed with raise to actually throw the exceptions.
import datetime

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 47 to +50
if "BACKOUT" in dataset:
InvalidDataSetError("BACKOUT is a reserved word and cannot be used in Dataset names")
InvalidDataSetError(
"BACKOUT is a reserved word and cannot be used in Dataset names"
)
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The InvalidDataSetError exception is created but not raised. This should be raise InvalidDataSetError(...) to actually throw the exception.

Copilot uses AI. Check for mistakes.
for key in top.keys():
key_type = {type(val).__name__ for val in top.collect_list(key) if val != None}
key_type = {
type(val).__name__ for val in top.collect_list(key) if val != None
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

Use is not None instead of != None for None comparisons to follow Python best practices.

Suggested change
type(val).__name__ for val in top.collect_list(key) if val != None
type(val).__name__ for val in top.collect_list(key) if val is not None

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +80
values = [
item.get(column) for item in items if item.get(column) is not None
]
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The item.get(column) call is duplicated for each item. Consider storing the result in a variable to avoid the double lookup: value = item.get(column); if value is not None.

Suggested change
values = [
item.get(column) for item in items if item.get(column) is not None
]
values = []
for item in items:
value = item.get(column)
if value is not None:
values.append(value)

Copilot uses AI. Check for mistakes.
@joocer joocer merged commit 27b4d31 into main Oct 8, 2025
3 of 12 checks passed
@joocer joocer deleted the 0.6.28-release branch October 8, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants