-
Notifications
You must be signed in to change notification settings - Fork 0
Developer guide
This tutorial explains how to develop on a repository from the control-toolbox ecosystem based on the template CTApp.jl. We suppose you have installed Julia and that your package is called MyAwsomePackage.jl
.
Got to the location of your choice where the repository will be put. For instance,
cd ~/dev
Copy the ssh
or html
url, see where to click on the following image:
and clone the repository:
git clone the-url-you-have-copied
We recommend to use Visual Studio Code to develop. Install Visual Studio Code (denoted also VSCode).
Then, install the Julia extension.
We recommend to install the following extensions but there are not necessary for a basic usage:
- Github Actions
- GitHub Markdown Preview
- Jupyter
- Jupyter Notebook Renderers
- Markdown Preview for Github Alerts
- Run VSCode and open the folder
~/dev/MyAwsomePackage.jl
.
- Open a terminal in VSCode, open Julia's interactive session and then write the following commands.
using Pkg
Pkg.activate(".")
Pkg.test()
Tip
If you want to add some unit tests, please visit the Unit Testing page.
- Open a terminal in VSCode, open Julia's interactive session and then write the following commands.
using Pkg
Pkg.activate("docs")
Pkg.develop(path=pwd()); include("docs/make.jl"); Pkg.rm("MyAwsomePackage")
Note
There are three commands in the last line.
- The first command
Pkg.develop(path=pwd())
adds the package indocs/Project.toml
to make it visible for the documentation. Thanks to this command, you can addusing MyAwsomePackage
indocs/make.jl
or in the markdown files to get access to methods from your package to generate the documentation or to add docstrings. - The second command
include("docs/make.jl")
builds the documentation and put it indocs/build
. Opendocs/build/index.html
to see your documentation. - The third command
Pkg.rm("MyAwsomePackage")
simply removesMyAwsomePackage
todocs/Project.toml
.
Tip
See the Julia documentation generator Documenter.jl to learn how to build the documentation from the docstrings and markdown files.