Upgrading a package to v1.0 and developping

  1. You can do (v1.0) pkg> generate PDMP and copy over the Project.toml file to the already existing project. Just make sure the existing project contains this subtree
    ├── Project.toml
    └── src
        └── PDMP.jl
    
    At this point, your project will be a valid Pkg project. The rest of the process is more documented.
  2. To develop the project: activate it and add dependencies:
    • (v1.0) pkg> activate ~/work/prog_gd/julia/dev/PDMP.jl
    • (PDMP) pkg> add Dep1 Dep2 ...
  3. Now you can develop your project; just make sure your project stays activated. In other words: as long as the Pkg prompt is (PDMP) pkg> you will be able to do julia> import PDMP.

Conceptually:

  1. Step 1 gets you to a valid project directory in a slightly hacky way (there is an open PR.)
  2. Pkg is based on environments. You point Pkg at the environment you want to use by using activate. You specify the packages which should be available in that environment by using add.
  3. Once you set up your environment, you can develop normally. You can load any dependency declared in your Project.toml file with using/import.
1 Like