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

Command to load packages from src/ado #18

Open
arthur-shaw opened this issue Jan 10, 2024 · 2 comments
Open

Command to load packages from src/ado #18

arthur-shaw opened this issue Jan 10, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@arthur-shaw
Copy link
Contributor

For (interactive) testing, it would be good to automate a few otherwise manual actions:

  • Load command definitions from src/ado (e.g., find *.ado files, run them).
  • Copy *.ado from src/ado to tests/plus-ado

In effect, this inspired from R's devtools::load_all(), which loads all functions from disk to memory. For interactive development, this loads functions into memory. For testing/checking, this does the same in a pipeline of actions (e.g., code health, rebuild documentaiton, etc.). See more here and here.

@kbjarkefur
Copy link
Collaborator

This is what repado is doing. With one but important difference. When installing .ado files to the PLUS folder, only the command sharing name with the file is made availible outside the file. This is what repado is doing.

It is also possible to load all commands that are in an ado file (not just the one sharing the name with the file) to memory. This is done when executing do "path/filename.ado". However, this type of test simulates the real world user experience less well than what repado is doing as all sub-command in the ado file is also made availible.

Using repado to set up a dev testing environment creates a simulation identical to the real world users' experience.


What you are suggesting above is possible and not hard. But I do not think we should do it. Let me know if you still want me to do that.

@kbjarkefur
Copy link
Collaborator

kbjarkefur commented Mar 6, 2024

Suggesting to not address this. repado is included in the test-file template and is IMHO the best way to solve this. I'll let you close this issue if you agree. Or let me know if you see any concern relying on repado.

@kbjarkefur kbjarkefur added the wontfix This will not be worked on label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants