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

Refactoring workflow #17

Open
moodymudskipper opened this issue Mar 16, 2022 · 0 comments
Open

Refactoring workflow #17

moodymudskipper opened this issue Mar 16, 2022 · 0 comments

Comments

@moodymudskipper
Copy link
Owner

I'd like this package to go further than providing independent tools.

We want to clean up a project, or a codebase, where do we start ?

We could have a flow chart of the different steps, and guide the user.

Should start as basic as :

  • Do all .R files in root folder (recursively) contain syntactic code ?
  • Do all absolute paths mentioned in the project refer to existing files ?
  • ...

Then we tackle one by one issues such as trying not to use absolute paths, setting library calls at the beginning of the main script only, up to refactoring in functions etc.

There might not be a single path (i.e. getting a package passing cmd check without a single note might not be necessary) but even so ideally there would be landmarks, for instance :

  • The code is syntactic
  • The code is selfcontained (no ref to non existing file, needed packages are attached)
  • The main script(s) can run
  • Most scripts are turned into functions (We still haven't established the right criteria)
  • We have a package
  • The package passes checks with
  • aving self contained code having clean scripts is one, having refactored into functions is another one, having a package is another one, passing tests is another one, having decent coverage is another one.

We have a sample of client projects already, so we can try to make these steps as universal as possible.

This might take a while, we could try to reduce the scope to have something usable for early steps and build up from there.

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

No branches or pull requests

1 participant