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

Make _obj_repr public #8551

Closed
BENR0 opened this issue Dec 14, 2023 · 4 comments
Closed

Make _obj_repr public #8551

BENR0 opened this issue Dec 14, 2023 · 4 comments
Labels
plan to close May be closeable, needs more eyeballs

Comments

@BENR0
Copy link

BENR0 commented Dec 14, 2023

What is your issue?

We are using

def _obj_repr(obj, header_components, sections):

in the html representation of AreaDefinitions in https://github.com/pytroll/pyresample and don't like to import private functions.
Would it be OK to make _obj_repr public?

@BENR0 BENR0 added the needs triage Issue that has not been reviewed by xarray team member label Dec 14, 2023
@TomNicholas TomNicholas added topic-html-repr and removed needs triage Issue that has not been reviewed by xarray team member labels Dec 14, 2023
@max-sixty
Copy link
Collaborator

Does anyone have an objection to this? Otherwise I think we'd accept a PR doing this?

@dcherian
Copy link
Contributor

dcherian commented Dec 15, 2023

Does anyone have an objection to this?

I do. We should be free to freely change this stuff if/when we want to.

@BENR0 please copy this over if you like it :)

@dcherian dcherian added plan to close May be closeable, needs more eyeballs and removed topic-html-repr labels Dec 15, 2023
@BENR0
Copy link
Author

BENR0 commented Dec 18, 2023

@dcherian indeed we like it :-). We already discussed coping it over and decided not to in order to not repeat code and we think there is actually no need. We totally agree and understand that you want to retain freedom to change things and we are fine with it.

Just to add a little more context; what we basically want/do is the "official" html representation of a DataArray. The only reason we don't use the public

def array_repr(arr) -> str:
is because we want to customize the header components and the sections a little bit.

I hope that this makes our intention a little bit clearer.
So in the unlikely case that any future changes of this should not be to our liking or should break something we would fix it on our side.

@dcherian
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to close May be closeable, needs more eyeballs
Projects
None yet
Development

No branches or pull requests

4 participants