Skip to content

Commit a877005

Browse files
committed
honza's fixes! :)
1 parent 44f686f commit a877005

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

docs/src/lecture_04/hw.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ The autoeval system expects you to upload a `.zip` file of your `Ecosystem`
1010
with at least the following files
1111
```
1212
.
13-
── Ecosystem
14-
   ├── Project.toml
15-
   ├── src
16-
   │   └── Ecosystem.jl
17-
   └── test
18-
   ├── every_nth.jl
19-
   ├── mushroom.jl
20-
   └── runtests.jl
13+
── Ecosystem
14+
   ├── Project.toml
15+
   ├── src
16+
   │   └── Ecosystem.jl
17+
   └── test
18+
   ├── every_nth.jl
19+
   ├── mushroom.jl
20+
   └── runtests.jl
2121
```
2222
The files `every_nth.jl` and `mushroom.jl` have to contain a single testset,
2323
so for example, the `every_nth.jl` file should look like this:

docs/src/lecture_04/lab.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ world
9898

9999
3. 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([...])
119119
simulate!(world,100)
120120
```
121121
You 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]
158163
test = ["Test"]
159164
```
160-
165+
Alternatively, you can create another `Project.toml` in your `test` folder.
161166
With `Test.jl` as an extra dependency you can start writing your `test/runtests.jl` file.
162167
```@example lab04
163168
using Scientific_Programming_in_Julia # hide
@@ -177,6 +182,8 @@ nothing # hide
177182
```
178183
Create a `@testset` and fill it with tests for `agent_count` that cover all
179184
of 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.
219226
Create a new repository called `Ecosystem.jl` on Github (public or private,
220227
however you want). A good repo should also contain a `README.md` file which
221228
briefly 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

Comments
 (0)