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

Refactor the data class in teal #41

Closed
donyunardi opened this issue Aug 24, 2023 · 17 comments
Closed

Refactor the data class in teal #41

donyunardi opened this issue Aug 24, 2023 · 17 comments
Labels

Comments

@donyunardi
Copy link
Collaborator

donyunardi commented Aug 24, 2023

Summary

We're improving the teal's data class (tdata, TealData, etc) and how it's being used in teal framework.
Read the milestone description here

1. Introduction of teal_data

Target: done by first week of sprint 1 (1 week)

2. Task to do after the foundation code is merged:

Target: done by end of sprint 1

CHECKPOINT

sprint 1

3. Introduction of ddl

Target: done by the end of sprint 2

4. Introducing teal_data to the modules

Target: start this part by in sprint 3

Replacing data argument from tdata to teal_data will introduce breaking change. Problems in teal.transform can be mitigated by making "patches", this will give us possibility to release teal even if teal.transform isn't a final version.

Q: Instruction on migration, should we write vignette (static) or other platform, i.e. GitHub Discussion?
A: We will use GitHub Discussion insightsengineering/teal#945

Q: We have functions (or PR) to support upgrade and downgrade of teal_data. Does this mean we need to keep old classes (i.e. TealData)? How long do we want to support these functions?
A: We're not supporting the old ways. As discussed and agreed upon, the next release will be breaking change.

5. Release teal packages to CRAN

Target: start releasing in the beginning of Jan 2024

  • teal.code
  • teal.data
  • teal.slice
  • teal.transform
  • teal
  • teal.modules.general
  • Rest of the teal modules released to GH (potentially even to CRAN?)
  • connectors internally

Breaking changes should not occur once sent on CRAN.

UPDATE: Release of teal frameworks (not module), will be done here: #42

Related issues for later

Addressing step 1-4 automatically closes:

Definition of Done

  • Completion of the refactors where we introduce new teal_data and ddl class with the implementation to teal and teal modules packages by end of Dec 2023.
@donyunardi
Copy link
Collaborator Author

@insightsengineering/nest-core-dev

Release teal.data internally once we introduce teal_data: insightsengineering/teal.data#171
We need to do this before CRAN release.

We need to rethink this.

teal.data is a blocker for other teal framework packages so teal.data has to go to CRAN first.
If we release to CRAN after the refactor, that would take too long.

I thought of couple options:

Option 1

  1. Provide soft-deprecate message on related functions.
  2. Release to CRAN and internal
  3. NOT merge Introduce teal_data class teal.data#171 to main but instead to refactor branch.

Option 2

  1. Merge Introduce teal_data class teal.data#171 to main.
  2. Provide soft-deprecate message on related functions.
  3. Release to CRAN and internal

Option 3 (what's currently suggested)

  1. Merge Introduce teal_data class teal.data#171 to main.
  2. Provide soft-deprecate message on related functions.
  3. Release to internal only
  4. Finish the refactor branch
  5. Remove all soft-deprecated functions
  6. Release to CRAN and internal

I think option 3 is quite risky and could affect our CRAN timeline.
I think option 1 would be ideal.

Please let me know that you think.

@m7pr
Copy link

m7pr commented Oct 11, 2023

I think it would be really awkward to upload teal.data to CRAN as a first official release and have deprecation messages already. If we do not think 3 is feasible in the timeline we hoped it go get done, then I would suggest

  1. uploading current main to CRAN without the soft-deprecation messages,
  2. uploading another version to CRAN with soft-deprecation messages once the refactor is merged,
  3. uploading another release after another 2 months with a deletion of deprecated functions, so that users have a time to realize some part of functionality is being removed

@kartikeyakirar
Copy link

kartikeyakirar commented Oct 11, 2023

I agree with Marcin on the initial deprecation message release, also believe in providing users ample time to adapt to the changes for a smoother transition.Option 1 with approach is to first upload the current main version to CRAN without the soft-deprecation messages, and then follow up with another version containing the deprecated messages, which I believe would be an improved approach.

@vedhav
Copy link

vedhav commented Oct 11, 2023

Now for some unpopular opinion.
The two problems that I see are:

  1. Not being able to release old + new compatible release on GitHub followed by the new only release on CRAN because creating deprecation will take time.
  2. Releasing CRAN with deprecated functions/methods

What if?
We can take a release branch and just merge the new changes without compatibility and release on CRAN and come back to do the old + new compatibility release on the main branch on GitHub followed by quickly updating the GitHub to the CRAN version.
Not sure if this is feasible, but if it's possible my vote will be for this. Otherwise, I'm good with Marcin's proposal.

P.S While typing this I see how insane this scenario is

@m7pr
Copy link

m7pr commented Oct 11, 2023

I don't understand this proposition

@vedhav
Copy link

vedhav commented Oct 11, 2023

Nevermind, I was just thinking out loud. We scraped my proposition in the daily :)

@donyunardi
Copy link
Collaborator Author

@m7pr makes the most sense to me.
Let's discuss and make decision next week when the whole gang is in.

@lcd2yyz
Copy link

lcd2yyz commented Oct 13, 2023

Although I perfectly understand the struggle of "don't want to show my code to the world unless it's the best version", the "cost" seems too high to justify Option 3.

@m7pr's proposal looks optimal to me. This can also help to largely de-risk our upcoming PI, or any foreseen/unforeseen impact from the major refactor. It will allow us to keep the target of releasing the whole teal framework by end of year.

@m7pr
Copy link

m7pr commented Oct 16, 2023

We still have this week + next 2 weeks before the next increment starts. Maybe we can merge refactor within 3 weeks, and then we can release the final version that is ready and polished? I also think the refactor was non-committed goal/milestone for this increment so I dont think we should struggle to release this week if we have major conerns

@chlebowa
Copy link

My opinion is probably deeply ignorant but I don't think adjusting refactor pace to release schedule is the right way to go. I think it's better to put some effort in the refactor (which I firmly believe we can finish by the end of the year) than release prematurely. Having deprecation warnings in the first (CRAN) release may be a tad confusing and may undermine user confidence in the product as a whole.

@m7pr
Copy link

m7pr commented Oct 16, 2023

If there refactor finishes at the end of the year, then I think it's fine to release current main (without deprecation messages) so that we can unblock the process of releasing other packages in the line.

@gogonzo
Copy link

gogonzo commented Oct 17, 2023

I suggest to go with initial plan:

  1. Release on GitHub with soft deprecation
  2. Immediately after GH release we remove deprecated stuff on main and release on CRAN.

Thanks to above teal.data won't be postponed.

  • uploading current main to CRAN without the soft-deprecation messages,
  • uploading another version to CRAN with soft-deprecation messages once the refactor is merged,
  • uploading another release after another 2 months with a deletion of deprecated functions, so that users have a time to
  • realize some part of functionality is being removed

Releasing long awaited package to CRAN and making API changes soon after is not a good idea. We will have to support users using old version and new version

@m7pr
Copy link

m7pr commented Oct 17, 2023

Thanks @gogonzo for the message. I just dont understand what you want to

  1. Release on GitHub? The current main? Or what? Or the refactor once it's merged?
  2. By deprecated stuff you mean messages, or the whole functionality?

Releasing long awaited package to CRAN and making API changes soon after is not a good idea. We will have to support users using old version and new version

Totally, but we will support this only by some small period of time.

@gogonzo
Copy link

gogonzo commented Oct 17, 2023

Totally, but we will support this only by some small period of time.

I bet someone from NEST will announce "teal.data is on CRAN" and we will have a problem.

@m7pr
Copy link

m7pr commented Oct 20, 2023

got it. agree that we should release the final product to prevent supporting both versions and prevent people becoming discouraged becuase they need to learn new version, once they invested the time and the energy to learning the first version which is not finished

@donyunardi
Copy link
Collaborator Author

We re-discussed our strategy again and updated the original comment with the new agreed release plan and timeline.
The main changes is to not perform any internal release and force breaking change for modules.

edelarua pushed a commit to insightsengineering/teal.modules.clinical that referenced this issue Dec 1, 2023
fixes
#842
part of
insightsengineering/nestdevs-tasks#41
insightsengineering/teal.data#184

 

- [x] add thenews section for change.
- [x]  update the examples in the documentation to pass teal_data.
- [x] update join_keys calls once the pull request is completed at
insightsengineering/teal.data#184.
- [x]  Revise and update the vignettes accordingly.
- [ ] make version bump once
insightsengineering/teal.data#184. is merged.

---------

Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: vedhav <vedhaviyash4@gmail.com>
@donyunardi
Copy link
Collaborator Author

Refactor is completed.
Closing.

pawelru pushed a commit to insightsengineering/teal.goshawk that referenced this issue Apr 8, 2024
fixes #243
part of
insightsengineering/nestdevs-tasks#41
insightsengineering/teal.data#184


- [x]  add the news section for change.
- [x]  update the examples in the documentation to pass teal_data.
- [x] update join_keys calls once the pull request is completed at
insightsengineering/teal.data#184.
- [x]  Revise and update the vignettes accordingly.
- [ ] make version bump once
insightsengineering/teal.data#184. is merged.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: vedhav <vedhaviyash4@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants