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

Hide members and make RecordSet picklable. #3209

Merged
merged 10 commits into from
Apr 18, 2024
Merged

Conversation

panh99
Copy link
Contributor

@panh99 panh99 commented Apr 3, 2024

We previously expose both public and internal members of RecordSet. Users were being presented with pairs of properties for managing parameters, metrics, and configurations (parameters_records, _parameters_records; metrics_records, _metrics_records; configs_records, _configs_records). This redundancy not only cluttered the autocomplete suggestions but also appeared unprofessional and potentially confusing for users interacting with the API.

The PR solves this issue by hiding the internal members. In addition, it makes the RecordSet work with pickle.

Previous:
image
image

Improved:
image

@jafermarq
Copy link
Contributor

I wonder if at least a super minimal test could be added to recordset_test.py:

def test_record_is_picklable():
    pickle.dumps(RecordSet())

This passes with the updates in this PR.

@danieljanes danieljanes enabled auto-merge (squash) April 18, 2024 15:29
@danieljanes danieljanes merged commit 4eb1bca into main Apr 18, 2024
27 checks passed
@danieljanes danieljanes deleted the hide-members-recordset branch April 18, 2024 15:33
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.

3 participants