Closed arthir closed 5 years ago
Almost forgot -- this would also need an entry in the changelog.
Thanks for adding this! High level comments -- Keith may have other opinions, but I think that
civis.utils._jobs
is the most natural place to put this new function. It's not IO related. It should also take anAPIClient
object as its last parameter, defaulting toNone
. The other helper functions use this pattern, and it does make testing much easier.
Moved the function; also added the client as the last parameter.
@arthir and I talked about this online, but we agree with @stephen-hoover that civis.utils._jobs
is the right place for this function. As a reminder, once we move that we'll need to add this function to __all__
in civis.utils.__init__
in order to import it with civis.utils.run_template
.
Almost forgot -- this would also need an entry in the changelog.
Added to the changelog (I'm not sure if there's a specific style to follow).
How is the user going to discover this awesome new function? Would it be documented in the Sphinx docs? Relatedly, I could also see the run_job
function is arguably undocumented (though subtly mentioned). Would both run_X
functions deserve a small section on the User Guide page, for example?
How is the user going to discover this awesome new function? Would it be documented in the Sphinx docs? Relatedly, I could also see the
run_job
function is arguably undocumented (though subtly mentioned). Would bothrun_X
functions deserve a small section on the User Guide page, for example?
I can add (both) to the docs. Thanks for pointing it out.
Code looks good to me. Before merging would you mind
- Adding a test
- Addressing @stephen-hoover's comment about examples in the docstring.
@keithing Tests added (and work!) Also docs.
@keithing @stephen-hoover I think I need to re-request reviews after that last comment change.
Mimics the civis-R run_template function.