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

internal function topological_sort() is defined in teal.slice and teal.data #516

Closed
kartikeyakirar opened this issue Jan 10, 2024 · 4 comments · Fixed by #520
Closed

internal function topological_sort() is defined in teal.slice and teal.data #516

kartikeyakirar opened this issue Jan 10, 2024 · 4 comments · Fixed by #520
Assignees
Labels

Comments

@kartikeyakirar
Copy link
Contributor

kartikeyakirar commented Jan 10, 2024

What happened?

The topological_sort function is defined in both the teal.slice and teal.data packages, sharing identical logic.

Should we utilize it in teal.slice by employing the getFromNamespace() function (pending feedback from CRAN for teal.code)? Alternatively, do we consider exporting this function in teal.data?

@kartikeyakirar kartikeyakirar added the bug Something isn't working label Jan 10, 2024
@kartikeyakirar kartikeyakirar changed the title [Bug]: internal function topological_sort() is defined in teal.slice and teal.data internal function topological_sort() is defined in teal.slice and teal.data Jan 10, 2024
@kartikeyakirar kartikeyakirar added core and removed bug Something isn't working labels Jan 10, 2024
@chlebowa
Copy link
Contributor

I assume you mean to place the getNamespace call in zzz.R in teal.slice like we do in teal.
While it would reduce code duplication and make changes easier, teal Depends on teal.data but teal.slice Imports teal.data. I am in two minds about this.

@kartikeyakirar
Copy link
Contributor Author

kartikeyakirar commented Jan 11, 2024

I assume you mean to place the getNamespace call in zzz.R in teal.slice like we do in teal

Yes, however , the presence of the 'teal.data' package in the import section of 'teal.slice' triggers a note on check().

image

@chlebowa
Copy link
Contributor

I don't see how this is related.

@kartikeyakirar
Copy link
Contributor Author

my mistake, I am getting this note because the function getFromNamespace() not because of the package is in import.

@chlebowa chlebowa self-assigned this Jan 12, 2024
@chlebowa chlebowa linked a pull request Jan 12, 2024 that will close this issue
chlebowa added a commit that referenced this issue Jan 12, 2024
Fixes #516 

Replaced function definition for `topological_sort` with wrapper for the
same function defined in `teal.data`.
The new definition remains in `FilteredData-utils.R` to maintain
documentation (would be too much to put i `zzz.R`).
@donyunardi donyunardi mentioned this issue Jan 12, 2024
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants