# Package Development

**URL:** https://discourse.julialang.org/t/package-development/64798
**Category:** New to Julia
**Tags:** question, package
**Created:** [July 17, 2021, 7:11am UTC](https://discourse.julialang.org/t/package-development/64798 "2021-07-17T07:11:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JulianDwain](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@JulianDwain](https://discourse.julialang.org/u/JulianDwain)
#### Post date: [July 17, 2021, 7:11am UTC](https://discourse.julialang.org/t/package-development/64798/1 "2021-07-17T07:11:45Z")

</div>

Hi everyone,

I am trying to start using Julia for developing my own package (just for fun), but I am having trouble using my module in, what I call them, “local test files”.

Lets assume I have the following project structure given by the julia package manager `generate MyModule`:

- src
  - MyModule.jl
  - test.jl

- Manifest.toml
- Project.toml
- test.jl

I tried creating my `test.jl` file in the project scope as well as in the `src` directory, and I also tried all different kind of combinations with `include`, `import`, and `using`, but nothing seemed to be working just fine.  
I found a previous, similar question in this thread: [Importing package into Main conflicts with an existing identifier - Usage / First steps - JuliaLang](https://discourse.julialang.org/t/importing-package-into-main-conflicts-with-an-existing-identifier/49804/3), but it did not seem to work out fine for me.

I use julia Version `1.6.2` on `Windows 10 Home` OS, my IDE is `VS Code`.  
I really don’t know what I am doing wrong.  
Any help I get is highly appreciated! Thank you in advance.

Best,  
J

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [July 17, 2021, 7:26am UTC](https://discourse.julialang.org/t/package-development/64798/2 "2021-07-17T07:26:21Z")

</div>

There are tests and there are files you just play around with. I think it’s the latter you want.

Try this, just

```julia
using MyModule

```

Try to make sure your environment is activated at the path of your MyModule folder.

Like now if you have done everything correctly, when you add a package. Your Project.toml will change

---

<div class="post-metadata">

### Author: ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)
#### Post date: [July 17, 2021, 7:57am UTC](https://discourse.julialang.org/t/package-development/64798/3 "2021-07-17T07:57:10Z")

</div>

You should give a try to [GitHub - invenia/PkgTemplates.jl: Create new Julia packages, the easy way](https://github.com/invenia/PkgTemplates.jl), it makes creation of packages so much easier and it do everything right from the start.

---

<div class="post-metadata">

### Author: ![JulianDwain](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@JulianDwain](https://discourse.julialang.org/u/JulianDwain)
#### Post date: [July 17, 2021, 8:08am UTC](https://discourse.julialang.org/t/package-development/64798/4 "2021-07-17T08:08:04Z")

</div>

Thank you, when working with my `test.jl` file within the `src` directory, this seems to be working perfectly fine.  
Since I am coming from python, I am a great fan of having my namespaces separated, i.e., using `import MyModule as MM` (or something like that).

Is there a possibility that I can use this formulation within my `src/test.jl` file?

Thank you, this solved my initial problem!

---

<div class="post-metadata">

### Author: ![JulianDwain](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@JulianDwain](https://discourse.julialang.org/u/JulianDwain)
#### Post date: [July 17, 2021, 8:09am UTC](https://discourse.julialang.org/t/package-development/64798/5 "2021-07-17T08:09:13Z")

</div>

Thank you for your answer, I had a quick look at it and I will definitely consider using this in some future packages I am planning to make! 🙂
