9898
99993 . Export all types and functions that should be accessible from outside your
100100 package. This should include at least ` agent_count ` , ` simulate! ` ,
101- ` every_nth ` , probably at all species types, and the ` World ` .
101+ ` every_nth ` , all species types, and the ` World ` .
102102``` @raw html
103103</div></div>
104104<details class = "solution-body">
@@ -119,7 +119,10 @@ world = World([...])
119119simulate! (world,100 )
120120```
121121You can put your simulation scripts in the same package in a new folder called
122- ` scripts ` or ` examples ` if you like.
122+ ` scripts ` or ` examples ` if you like. It often makes sense to have a separate
123+ ` Project.toml ` in this folder, because it forces you think about which
124+ functions you need to export and which additional packages are necessary e.g.
125+ for visualization of your results.
123126``` @raw html
124127</p></details>
125128```
@@ -134,6 +137,8 @@ files. A minimal package structure can look like below.
134137.
135138├── Project.toml
136139├── README.md
140+ ├── scripts
141+ │ └── run.jl
137142├── src
138143│ └── Ecosystem.jl
139144└── test
@@ -157,7 +162,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
157162[targets]
158163test = ["Test"]
159164```
160-
165+ Alternatively, you can create another ` Project.toml ` in your ` test ` folder.
161166With ` Test.jl ` as an extra dependency you can start writing your ` test/runtests.jl ` file.
162167``` @example lab04
163168using Scientific_Programming_in_Julia # hide
@@ -177,6 +182,8 @@ nothing # hide
177182```
178183Create a ` @testset ` and fill it with tests for ` agent_count ` that cover all
179184of its four methods.
185+
186+ * Hint* : You can use ` isapprox ` or ` ≈ ` to test equaity of real numbers.
180187``` @raw html
181188</div></div>
182189<details class = "solution-body">
@@ -219,6 +226,10 @@ some of your work.
219226Create a new repository called ` Ecosystem.jl ` on Github (public or private,
220227however you want). A good repo should also contain a ` README.md ` file which
221228briefly describes what it is about.
229+
230+ If you have never used ` git ` before you can check out the
231+ [ tutorial] ( https://juliateachingctu.github.io/Julia-for-Optimization-and-Learning/stable/installation/tutorial/ )
232+ of our Bachelor Course on Julia.
222233``` @raw html
223234</div></div>
224235<details class = "solution-body">
0 commit comments