Closed tkphd closed 2 years ago
Ah, asked & answered...
julia>
(trebuchet) pkg> remove Trebuchet
(trebuchet) pkg> add https://github.com/FluxML/Trebuchet.jl
✓ Trebuchet
1 dependency successfully precompiled in 7 seconds (123 already precompiled)
1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
restart Julia, then
julia> ]
(1.7) pkg> activate project/trebuchet
(trebuchet) pkg> add https://github.com/FluxML/Trebuchet.jl
(trebuchet) pkg> status
Status `project/trebuchet/Project.toml`
[98b73d46] Trebuchet v0.2.1 `https://github.com/FluxML/Trebuchet.jl#master`
julia> import Trebuchet as Trebuchets
julia> names(Trebuchets)
6-element Vector{Symbol}:
:Trebuchet
:TrebuchetState
:run
:shoot
:simulate
:visualise
julia> ?Trebuchets.shoot
shoot(ws, angle, w)
shoot((ws, angle, w))
Shoots a Trebuchet with weight w in kg. Releases the weight at the release angle angle in
radians. The current wind speed is ws in m/s. Returns (t, dist), with travel time t in s
and travelled distance dist in m.
I'll update the docs to pull the GitHub version, and perhaps ping those folks to release :grinning:
add Trebuchet#master
would be also an option (maybe Main instead of master)
I thought that should work, but for some reason it didn't, or I tried something similar but slightly wrong... Thanks!
I'm working through ep. 4, and did the following as instructed:
Then, in ep. 5,
Note:
shoot
is not listed!Indeed, there are no docstrings in
utils.jl
.The current Trebuchet.jl source tree annotation shows the docstrings, but they were added in 2021 (about a year after v0.2.1 was released). Indeed, the commit message is "export and document shoot," so this explains both errors here (no
shoot
innames()
and no docstrings).So... how do I
add
the current/GitHub version of Trebuchet? I would like to update the lesson to show how to get matching output, with the docstrings forshoot
without which the learner would have no idea what function signature to use.