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

Migrate LabProducts to DX #2574

Merged
merged 32 commits into from
Jul 4, 2024
Merged

Migrate LabProducts to DX #2574

merged 32 commits into from
Jul 4, 2024

Conversation

toropok
Copy link
Contributor

@toropok toropok commented Jun 7, 2024

Description of the issue/feature this PR addresses

This PR migrates the AT LabProduct to Dexterity types for Python 3 compatibility.

Current behavior before PR

LabProduct content type based on the Archetypes framework

Desired behavior after PR is merged

LabProduct is content types base on the Dexterity framework

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@toropok toropok changed the title Migrate InstrumentTypes to DX Migrate LabProducts to DX Jun 7, 2024
@toropok toropok marked this pull request as ready for review June 27, 2024 11:13
@toropok
Copy link
Contributor Author

toropok commented Jun 27, 2024

@ramonski pls, review )

@ramonski
Copy link
Contributor

@xispa: We need to decide how to best continue with these Lab Products.
As far as I know, they are currently not integrated into any greater functionality, besides that they just exist.
Maybe hide them from the setup panels?

Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Thanks Leonid, you are becoming migration pro's already:)
Some minor changes only for data consistency in the DB.

src/senaite/core/content/labproduct.py Outdated Show resolved Hide resolved
src/senaite/core/content/labproduct.py Outdated Show resolved Hide resolved
src/senaite/core/content/labproduct.py Show resolved Hide resolved
@toropok
Copy link
Contributor Author

toropok commented Jul 3, 2024

@ramonski I think I fixed it )) (just dont know did it notify you or not )

@toropok toropok requested a review from ramonski July 4, 2024 07:56
@xispa
Copy link
Member

xispa commented Jul 4, 2024

@xispa: We need to decide how to best continue with these Lab Products. As far as I know, they are currently not integrated into any greater functionality, besides that they just exist. Maybe hide them from the setup panels?

From my point of view, we can get rid of them. I think these Lab Products are not being used by anybody. And in any case, they would fit better in an another add-on, with probably other functionalities related with inventory and the like.

@ramonski
Copy link
Contributor

ramonski commented Jul 4, 2024

@xispa: We need to decide how to best continue with these Lab Products. As far as I know, they are currently not integrated into any greater functionality, besides that they just exist. Maybe hide them from the setup panels?

From my point of view, we can get rid of them. I think these Lab Products are not being used by anybody. And in any case, they would fit better in an another add-on, with probably other functionalities related with inventory and the like.

Ok, let's decide on that later. I would like to have at least the DX port in core to make use of this code when we might refactor it into a separate add-on.

@toropok
Copy link
Contributor Author

toropok commented Jul 4, 2024

ahahah ))) that's was my best shot to make clean migration ever (I'm still learning). But anyway I agree with you guys :) no reason to keep useless code in the core module.

@ramonski
Copy link
Contributor

ramonski commented Jul 4, 2024

ahahah ))) that's was my best shot to make clean migration ever (I'm still learning). But anyway I agree with you guys :) no reason to keep useless code in the core module.

We're definitely using the code you created, because it allows us to simply use it when we port it out of the core in a separate add-on. We might consider in a separate PR to hide it from the LIMS SETUP to not confuse the users.
Going to review your code now;)

Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Thanks Leonid, works perfectly!

@ramonski ramonski merged commit c59254f into senaite:2.x Jul 4, 2024
1 check passed
@xispa
Copy link
Member

xispa commented Jul 4, 2024

Thanks @toropok !

@toropok toropok deleted the dx-labproducts branch July 8, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants