# Best practice for script with ARGS that can also be run with \`include\`

**URL:** https://discourse.julialang.org/t/best-practice-for-script-with-args-that-can-also-be-run-with-include/74435
**Category:** General Usage
**Tags:** question, workflow, code-organization
**Created:** [January 11, 2022, 9:31pm UTC](https://discourse.julialang.org/t/best-practice-for-script-with-args-that-can-also-be-run-with-include/74435 "2022-01-11T21:31:22Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)
#### Post date: [January 14, 2022, 4:11am UTC](https://discourse.julialang.org/t/best-practice-for-script-with-args-that-can-also-be-run-with-include/74435/4 "2022-01-14T04:11:02Z")

</div>

Oh, I agree 100%! This is for those short top-level scripts, e.g., [this one](https://github.com/goerz-research/2022-01_Rydberg_Krotov_Spectral_Constraints/blob/a2a8654cd00c6c3db79b982d045bfd321b8249d0/scripts/2022-01-13_constrained_stage1.jl). A more fleshed-out “driver” to run that script to programmatically is [here](https://github.com/goerz-research/2022-01_Rydberg_Krotov_Spectral_Constraints/blob/a2a8654cd00c6c3db79b982d045bfd321b8249d0/src/makerules.jl#L42-L69), as part of a `make`-like system to programmatically run all the scripts in the project, cf. [Julia-based Makefile replacement for research workflows](https://discourse.julialang.org/t/julia-based-makefile-replacement-for-research-workflows/74368). Of course, I still want to be able to run the script either from the command line with normal arguments, or from the REPL or a notebook, for playing around with different parameters.

---

_[View the full topic](https://discourse.julialang.org/t/best-practice-for-script-with-args-that-can-also-be-run-with-include/74435)._
