Create a Package

Did you try to set one with user=username? I.e. Template(user = "marouane").

2 Likes

it shows me this:
ERROR: MethodError: no method matching Template(::String)

Could you copy paste what you wrote?

julia>using PkgTemplates

julia> t=Template(“midow”)

Template(user = "marouane").
Template("midow")

There is a difference.

3 Likes

ohhhh yeah you’re right i didn’t notice that, thank you very much.

still when i wrote my github username and went to the next command which is:
generate(“name of Pkg”,t), it shows me this:

ERROR: GitError(Code:ENOTFOUND, Class:Config, config value ‘user.name’ was not found)

Here is a beginners tutorial that provides a tested and simple (if inflexible) workflow. It may be useful to get started https://lectures.quantecon.org/jl/testing.html

4 Likes

everything was okay till it showed me a warning:
Git config option ‘user.name’ missing, package generation will fail unless you supply a GitConfig
after typing the command of
generate(“Cwrap”.jl, ourTemplate)
this error showed up:
ERROR: type String has no field jl
and i don’t know what does it mean.

Well, you need to read/type carefully! This "Cwrap".jl not the same as the correct "Cwrap.jl".

Then concerning the git error, a quick google brings up Git - First-Time Git Setup, which should get you up to speed with your git setup.

PS: please quote your code! Best have a read through: Please read: make it easier to help you.

1 Like

If you look at https://lectures.quantecon.org/jl/testing.html#Julia-Setup it shows you the right command for the git config. Alternatively, I think you can use the user = argument in the function.

1 Like

thank you very much i’ve created the package succefully and now i need to put the content inside it and there is another package like mine but it’s outdated i want to put the content of that package in mine it’s like cloning.

Cool. Using the other package, just be sure to include the appropriate stuff into your license file. (and maybe a shout-out in the README)

1 Like

the problem right now is i’m struggling on how am i suppose to do that cause it’s my first time.

If you keep the same license, then just add your name to it. Say it was this original license https://github.com/mauro3/Parameters.jl/blob/master/LICENSE.md, then change it to something like:

Copyright (c): Mauro Werder (2015-2018), Han Hasse (2019)

If it is not the same type of license (or no license, or no open source license), then it’s more tricky.

1 Like

the problem is the outdated package is not mine

Yes, but if it has an open source license you can use the code, subject to the license.

2 Likes

same error,
could you tell me where the problem is?

have you checked https://lectures.quantecon.org/jl/testing.html

Page not found…
I guess it is moved here:
https://julia.quantecon.org/more_julia/testing.html

1 Like