Closed zhezhaozz closed 1 year ago
@kdpsingh @rdboyes Not sure why the Documenter check gives me this error:
Error: could not evaluate expression from doctest setup.
│ expression = :($(Expr(:toplevel, :(#= /home/runner/work/Tidier.jl/Tidier.jl/docs/make.jl:5 =#), :(using Tidier, DataFrames, Chain, Statistics))))
│ exception =
│ ArgumentError: Package Chain not found in current path, maybe you meant `import/using .Chain`.
│ - Otherwise, run `import Pkg; Pkg.add("Chain")` to install the Chain package.
└ @ Documenter.DocTests ~/.julia/packages/Documenter/H5y27/src/DocTests.jl:188
Feel free to comment or make edits!
The build is failing. It looks like the Info output is causing the problem.
The build is failing. It looks like the Info output is causing the problem.
Very strange. Didn't have this error when testing locally. Will fix it later
Seems like the names that are generated inside of a chain are not consistent? :raccoon vs. :chinchilla - I'm guessing these are autogenerated. Maybe the solution is to have a way to disable the Info: flags? People may not want the DataFrames code showing up every time they run the macros anyway...
You're right. Those are randomly generated, and while they may even be deterministic if run in a fresh session, they are a pain to keep track of and update.
I also agree with you that the info that is outputted isn't really all that helpful, especially as the generated code has gotten more complex. I do want to leave the option of seeing it because it's been incredibly helpful for troubleshooting purposes.
Here's what I'm thinking: @zzhaozheUM, remove all the info-created update and push an updated commit to the PR.
Once you're done, I'll add a function that updates a global variable within the package namespace that determines whether logging will happen. I will set logging to off by default but give users a way to turn it on.
After I fix that, then can have @rdboyes review.
Let me know if that makes sense or if you have any thoughts. Thank you! And have a great weekend.
@kdpsingh just removed all info-related messages and commented out @info
code lines to pass the build.
Excellent! I'll implement a way to turn the code output on through a new exported function but agree with leaving it off as a default.
Once I do that, will ask @rdboyes to take a look before merging.
@rdboyes this is ready for you to take a look.
@zzhaozheUM removed the @info
output.
We left the existing tests folder in place in case we want to add other tests there that aren't in the documentation.
I moved docstrings and parsing functions to separate files just because they were taking up a lot of space in the Tidier.jl file.
I added a Tidier_set
function that enables you to enable code logging using Tidier_set("code", true)
although it defaults to false.
I used a package-wide global variable (which is not exported) to keep track of this setting. I used a Ref
type based on this discussion here: https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720.
Going to work on the @group_by
and joins today/tomorrow and hoping to release v0.4.0 by the weekend.
Thanks @zzhaozheUM. Can we undo the tabs and leave the old style of formatting where the """
starts on a new line?
Thanks @zzhaozheUM. Can we undo the tabs and leave the old style of formatting where the
"""
starts on a new line?
Done
Thank you @zzhaozheUM!
Looks like it is passing all tests. From looking at the build logs (for Documenter and CI, respectively), the doctests and the original tests appear to be running.
I'm going to move forward and merge this commit just so I can move onto the other parts of the code. @rdboyes, if you have any concerns, can file an issue and we will re-evaluate, but I think we are good. Appreciate both your help.
Sounds like you two got everything! Sorry, just saw this now, busy day today
This PR adds
doctests
to docstrings. For example:When running
make.jl
, it will run thejldoctest
within all docstrings in Julia-REPL and compare the output with the expected output specified.