hundreds-father-404
05/17/2022, 10:49 PMdocs
, docsgen
, docs-gen
, gen-docs
?
2. Where do we write the result? dist/docs/<project_name>
?export-codegen
and package
.
β’ It's not quite codegen
β’ You iterate on docs much more than packaging binaries. Making it easy to distinguish those makes sense to me
β’ for Marketingβ’οΈ, we want to make clear Pants will soon support docshigh-yak-85899
05/17/2022, 10:51 PMgen-docs
because it follows how I would say "generate documentation" and all the other goals have an actionable take to them (run
, test
, format
, etc.)wide-midnight-78598
05/17/2022, 10:52 PM./pants docs ::
Keeps the simplicity vibe going with the rest of the goals. But it's not a verb, which kinda sucks.
Hyphens in goals are a bit annoying to type and seepackage
is half reasonable, but it feels as right as it feels wronghundreds-father-404
05/17/2022, 10:53 PMgen-docs
Note we already have the hyphen like export-codegen
wide-midnight-78598
05/17/2022, 10:54 PMwitty-crayon-22786
05/17/2022, 10:55 PMpackage
probably, for the reasons in https://pantsbuild.slack.com/archives/C046T6T9U/p1649178458914749?thread_ts=1649176870.827779&cid=C046T6T9Upublish
goalflat-zoo-31952
05/17/2022, 10:57 PMdocument
? since it's a verbhundreds-father-404
05/17/2022, 10:57 PMpublish
You iterate on docs much more than packaging binaries. Making it easy to distinguish those makes sense to meActually this is pretty contrived. You iterate on one docsite at a time. So just use
./pants package path/to:project
, rather than ::
for Marketingβ’οΈ, we want to make clear Pants will soon support docsalso not a compelling reason for a whole new goal. There are other ways of marketing this
wide-midnight-78598
05/17/2022, 10:58 PMpackage
and extract to a new goal if a compelling reason comes down the pipeline? Not sure if that's easily, automatically updatablehundreds-father-404
05/17/2022, 10:58 PMpackage
, which answers both questions π
Feel free anyone to argue in favor of a docs goal tho! It is very helpful for us to due diligence nowwide-midnight-78598
05/17/2022, 10:59 PMhundreds-father-404
05/17/2022, 11:00 PMAlmost reaching a full screen of goals on my desktop monitor πYeah true. Proliferation of goals can be an issue. More APIs for you as a user to learn
wide-midnight-78598
05/17/2022, 11:00 PMwitty-crayon-22786
05/17/2022, 11:02 PMhundreds-father-404
05/17/2022, 11:04 PMtailor
and update-build-files
. And then Benjy has proposed merging export
and export-codegen
help
and help-all
proud-dentist-22844
05/17/2022, 11:09 PM./pants package docs/
might invoke sphinx, if the right target is in place?hundreds-father-404
05/17/2022, 11:11 PMsphinx_project
target, which has default sources=["conf.py", "**/*.rst"]
(Markdown/Myst support is my next task)proud-dentist-22844
05/17/2022, 11:15 PMpackage
feels odd at first, but grows on me and I can get used to it.sphinx_project
target define the output directory under dist/
?hundreds-father-404
05/17/2022, 11:16 PMβ― ./pants package sphinx-demo:
18:15:32.12 [INFO] Wrote dist/sphinx-demo/sphinx
Just gotta write some tests and Pants will support Sphinx hopefully in a few hoursproud-dentist-22844
05/17/2022, 11:17 PMhundreds-father-404
05/17/2022, 11:17 PMoutput_path
field, like all binary targets. Defaults to path.to.build_file_dir/tgt_name
. But you can override it. It will set the directory pathpackage
goal integration is neat because you can do things like for tests the runtime_package_dependencies
field: Pants will build your docs for you, and you can use them in your testwitty-crayon-22786
05/17/2022, 11:20 PMarchive
, orβ¦hundreds-father-404
05/17/2022, 11:29 PM@rule
logic: https://github.com/pantsbuild/pants/pull/15512
@happy-kitchen-89482 you'll like this PRwide-midnight-78598
05/17/2022, 11:50 PM.md
files?high-yak-85899
05/17/2022, 11:52 PMrecommonmark
I think)wide-midnight-78598
05/17/2022, 11:58 PM