Skip to content

Figure property #4842

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

Closed
wants to merge 5 commits into from
Closed

Conversation

Mrngilles
Copy link
Contributor

What was done:

  • Adding the figure attribute as a class property
  • Deprecating the figure getters and setters
  • Added a deprecated_get_set function

I know the deprecation helper is in a weird place, and I am more than willing to change it, but I had no idea where to put it...

Also, I plan on transforming other attributes (as much as possible) to properties, if you think it is a good idea. If so, do you want a PR per attribute or should I group them?


@figure.setter
def figure(self, fig):
self._figure = fig
Copy link
Member

Choose a reason for hiding this comment

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

If you are going to do this you should add validation that artists can not be moved between figures.

@tacaswell
Copy link
Member

I would not go down this road right now, there is an on-going effort to change all of the Artist attributes into traitlets (#4762) which will supercede this.

Sorry for the poor communication and I hope you didn't spend too much time on this!

@Mrngilles
Copy link
Contributor Author

Okay, if the attributes are being changed to traitlets, I guess it's good. I don't know about it too much, so I cannot foresee exactly all the gain the project will get from this switch.
Don't worry about my time on this, I learned quite a bit and understood the lib a bit better.
Anyway, if any help is needed with traitlets or anything else, always ready to help 😄

@tacaswell
Copy link
Member

If you want to help with traitlets coordinate with @rmorshea

At a minimum we need help with testing, etc of that branch. Something as simple as using the traitlets branch for you daily work would be great. Hopefully once Ryan gets the general work flow worked out, up-converting attributes -> traitlets can be parallelized.

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