You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updating the differenceequations related unit tests
* Stripped out old sequential stuff
* Use new DifferenceEquations tag
* Shutting off some of the slower CI
* Finalized unit test cleanup
* Updated benchmarks
Copy file name to clipboardExpand all lines: development.md
+61-17Lines changed: 61 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,25 @@
3
3
4
4
## Setup
5
5
One time setup:
6
-
1. First, setup your environment for [VS Code](https://julia.quantecon.org/software_engineering/tools_editors.html), [github](https://julia.quantecon.org/software_engineering/version_control.html) and [unit testing](https://julia.quantecon.org/software_engineering/testing.html).
7
-
2. In your global environment, (i.e. start julia without `--project` or use `]activate` to deactivate the current project) add in
1. Setup your environment for [VS Code](https://julia.quantecon.org/software_engineering/tools_editors.html), [github](https://julia.quantecon.org/software_engineering/version_control.html) and [unit testing](https://julia.quantecon.org/software_engineering/testing.html).
7
+
2. First start up a Julia repl in vscode this project
8
+
3. Activate the global environment with `] activate` instead of the project environment
9
+
4. Add in global packages for debugging and benchmarking
6. Connect it the current version of the DSSM package,
18
+
```julia
19
+
] dev .
20
+
```
21
+
7. Instantiate all benchmarking dependencies,
22
+
```julia
23
+
] instantiate
24
+
```
12
25
## Formatting Code
13
26
Within VS Code, format code before committing with `> Format Document` or `> Format Document With...` choices. This uses the `.JuliaFormatter.toml` file with [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl).
14
27
@@ -24,6 +37,14 @@ using TestEnv; TestEnv.activate()
24
37
```
25
38
At that point, you should be able to edit as if the `test/Project.toml` package was activated. For example, `include("test/runtests.jl")` should be roughly equivalent to `]test`.
26
39
40
+
If you wish to test the integration with a local version of a package, then after each time you do this step you will need to update the manifest accordingly. For example, if you have downloaded a `DifferenceEquations.jl` in a parallel folder to this one, then you can do
41
+
```
42
+
] dev ../DifferenceEquations.jl/.
43
+
```
44
+
And it will use that version until you restart julia. As `]test` will only use the pinned version, you can replicate the full regression test in that state with `include("test/runtests.jl")`
45
+
46
+
### Infiltrator and Debugging
47
+
27
48
A useful trick for debugging is with `Infiltrator.jl`. Put in a `@exfiltrate` in the code, (e.g. inside of a DSSM function) and it pushes all local variables into a global associated with the module.
28
49
29
50
For example, if `call_the_dssm_function_with_exfiltrate` was a function in the DSSM package with `@exfiltrate` in it, then you could do th following in the REPL or a unit test
@@ -38,22 +59,45 @@ Do not forget to remove the exfiltrate when committing to the server though, or
38
59
This assumes you are running the repository in VS Code (and hence have the project file activated). If not, then you will need to activate it accordingly (e.g. `--project` when running Julia).
39
60
40
61
### Running the Full Benchmarks
41
-
In your terminal
42
-
```julia
62
+
63
+
Always start with the benchmarks activated, i.e. `] activate benchmark`
64
+
A few utilities
65
+
```julia
43
66
using DifferentiableStateSpaceModels, PkgBenchmark
44
-
data =benchmarkpkg(DifferentiableStateSpaceModels; resultfile =joinpath(pkgdir(DifferentiableStateSpaceModels),"benchmark/baseline.json"))
45
-
export_markdown(joinpath(pkgdir(DifferentiableStateSpaceModels),"benchmark/trial.md"), data) # can export as markdown
67
+
functionsave_benchmark(results_file ="baseline")
68
+
data =benchmarkpkg(DifferentiableStateSpaceModels; resultfile =joinpath(pkgdir(DifferentiableStateSpaceModels),"benchmark/$results_file.json"))
0 commit comments