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

Add Record print methods #22

Merged
merged 10 commits into from
Oct 10, 2024
Merged

Add Record print methods #22

merged 10 commits into from
Oct 10, 2024

Conversation

lazappi
Copy link
Collaborator

@lazappi lazappi commented Oct 9, 2024

Adds to_string() and print() methods to the Record class and a (incomplete) describe() method to the Artifact class.

Fixes #5, replaces #3

@lazappi
Copy link
Collaborator Author

lazappi commented Oct 9, 2024

The output is similar to Python with the following differences:

  • Order is fixed but not always the same, it's defined in the method
  • The id and created_at fields are printed
  • Colour (this can be turned off)

There is also an incomplete describe() method. It only shows the provenance fields in the example at the moment. Labels, features, other provenance etc. should be possible but I need to work out how to properly locate things which will take more work.

Examples

Artifact

Python

image

R

image

R (style = FALSE)

image

Storage

Python

image

R

image

Describe Artifact

Python

image

R

image

* origin/main:
  Allow unauthenticated users to connect to an instance (#19)
  Create pkgdown docs (#13)
@lazappi lazappi requested a review from rcannood October 9, 2024 14:01
Copy link
Collaborator

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

Almost looks good to me! I like the colouring of the fields :)

Two minor comments, let me know if there's anything you'd like to discuss

R/Record.R Outdated Show resolved Hide resolved
R/Record.R Outdated Show resolved Hide resolved
Copy link
Collaborator

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

LGTM!

@rcannood rcannood merged commit ecf65f4 into main Oct 10, 2024
7 checks passed
@rcannood rcannood deleted the add-printing branch October 10, 2024 12:07
@lazappi lazappi mentioned this pull request Oct 10, 2024
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.

Implement to_string and print method for all R6 classes
2 participants