New to Julia: edit a package module without using Revise or dev #274
Replies: 6 comments 7 replies
-
You should be able to use In other words, clone This is the standard way to develop a Julia package, so its good to learn! |
Beta Was this translation helpful? Give feedback.
-
I'll convert this to a discussion since it can't be resolved by any changes to the souce code and we can continue the conversation there! |
Beta Was this translation helpful? Give feedback.
-
I have used these comments to edit some files from ClimaOcean, and written up a draft set of instructions which (after reviewing and fixing!) may make it easier for others to get started. Then again, I may have made this more complicated than it need be!!: |
Beta Was this translation helpful? Give feedback.
-
Good. I have amended the instructions to be more generic. Are they ok? |
Beta Was this translation helpful? Give feedback.
-
Here it is: Draft recipe for editing code in a package from git: We use ExPkg as the example package ExPkg, could be ClimaOcean for example. In the case of Windows, Navigate to a convenient local directory in the power shell PS. Download a copy of the package: Check to see you have the version you need to edit: Next move into the package directory in your own file system and stay there: Run Julia but don't use the flag --project If needed, for example for ECCO files, establish your credentials using .netrc in .Julia or within a Julia session going Next turn on the development version: Next switch into the environment for EXPkg: Add any other packages used by ExPkg: In addition you may need to add the Revise package: Now load two packages explicitly: You can now edit and save files, for example file.jl, directly out of your cloned copy, e.g. edit src/file.jl and then Depending on the file structure, you may have to include some additional source files. |
Beta Was this translation helpful? Give feedback.
-
PS please amend the recipe by going shell> cd ExPkg |
Beta Was this translation helpful? Give feedback.
-
I want to edit a src file of a cloned ClimaOcean module from the rev="main" version without using Revise which requires using the dev version which is out of date.
Is there a link giving some straight forward instructions for reincluding the edited module so that it is in the standard place in the package (and not for example in Main) and not having to build a whole new environment of module dependencies for example.
How do I ensure the cloned version of the package is being used?
Thanks for your advice.
Beta Was this translation helpful? Give feedback.
All reactions