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

R/ subfolder is full of spaghetti #32

Open
4 of 5 tasks
bryce-carson opened this issue Jul 16, 2024 · 3 comments
Open
4 of 5 tasks

R/ subfolder is full of spaghetti #32

bryce-carson opened this issue Jul 16, 2024 · 3 comments
Assignees
Labels
🍝 spaghetti with tomato sauce UNSTABLE The work is to be completed in the unstable branch

Comments

@bryce-carson
Copy link
Collaborator

bryce-carson commented Jul 16, 2024

🍝 The spaghetti should be refrigerated, and then baked into a leftover-spaghetti-caserolle; see the branch of that name for progress.

@bryce-carson bryce-carson self-assigned this Jul 16, 2024
@ashokkrish
Copy link
Owner

Spaghetti alle vongole? Spaghetti aglio e olio? Spaghetti alla carbonara? :)

@bryce-carson
Copy link
Collaborator Author

Spaghetti alle vongole? Spaghetti aglio e olio? Spaghetti alla carbonara? :)

I haven't heard of any of those, honestly! 😆 Spaghetti code, unfortunately! Maybe pizza code; I'm unsure. They're not really useful terms.

In short, the code is too interdependent to justify splitting it into so many files, and no single file has a clear role other than to call functions from another file, and so on, until some input data is finally needed. I can't test them in isolation or outside of the Shiny app.

I reviewed the function call diagram you shared with me, and I found that it is inaccurate. Some scripts call functions from files that were not listed as dependencies on the graph, and overall these files really aren't independent.

As they sat, they posed a problem for cleaning up the global.R file. Shiny already sources all R files under the R/ folder, so source calls aren't necessary. The source calls and further calls to library in the files underneath R/ make things even more complex and fragile, and prone to breakage.

It'll get better, slowly. Maybe a week to get through all of these files? I hope by the end of Wednesday, actually, I can have these refactored into a single package which will work independently of the Shiny app, and will have plenty of documentation that we can work on together to ensure that it is useful and testable (in isolation from Shiny). Real modularization.

@bryce-carson bryce-carson added 🍝 spaghetti with tomato sauce RESOLVED_IN_BRANCH This issue will automatically close when a branch is merged. UNSTABLE The work is to be completed in the unstable branch and removed RESOLVED_IN_BRANCH This issue will automatically close when a branch is merged. labels Jul 17, 2024
@bryce-carson bryce-carson added the duplicate This issue or pull request already exists label Jul 18, 2024
@bryce-carson
Copy link
Collaborator Author

See the mention of this issue in the storyline above this comment.

@bryce-carson bryce-carson removed the duplicate This issue or pull request already exists label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍝 spaghetti with tomato sauce UNSTABLE The work is to be completed in the unstable branch
Projects
None yet
Development

No branches or pull requests

2 participants