Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v0.4.4-dev #259

Merged
merged 29 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fb2109d
Bump package version
ConnectedSystems Dec 22, 2022
5d9f859
Add Requires to compat
ConnectedSystems Dec 22, 2022
8f2d948
Display URL to VS Code sysimage guide as a link
ConnectedSystems Dec 20, 2022
22a316e
Add detail on deployed documentation
ConnectedSystems Dec 20, 2022
bb8f211
Add usage page
ConnectedSystems Dec 22, 2022
ad6892c
Small change to imply robustness of scenarios is desired
ConnectedSystems Dec 22, 2022
de7f4a4
Mention documentation system in use
ConnectedSystems Dec 22, 2022
089a782
Explicitly mention cloning then navigating to project directory
ConnectedSystems Dec 22, 2022
4ba2208
Add details on re-registering updated package
ConnectedSystems Dec 22, 2022
d2cfae6
Set Documenter to ignore private functions
ConnectedSystems Dec 22, 2022
096854f
Make threshold value smaller
ConnectedSystems Dec 22, 2022
b8f5f85
Merge branch 'docs' into v0.4.4
ConnectedSystems Dec 22, 2022
e4c0d0d
Support identification of Pareto optimal scenarios
ConnectedSystems Jan 4, 2023
9576552
Reorganize analysis functions into sub-module
ConnectedSystems Jan 4, 2023
25c91b5
Consolidate `relative_importance()` -> `normalize()`
ConnectedSystems Jan 5, 2023
ab18b6d
Correctly handle matrices and vectors
ConnectedSystems Jan 5, 2023
005c0f1
Simplify logic for bin edges
ConnectedSystems Jan 5, 2023
b02f779
Helper function to discretize outcomes for plots
ConnectedSystems Jan 5, 2023
ead3222
Complete regional sensitivity analysis function
ConnectedSystems Jan 5, 2023
99f3060
Add outcome mapping method
ConnectedSystems Jan 5, 2023
3f387c3
Reorder module includes
ConnectedSystems Jan 5, 2023
f6b71cf
Merge pull request #258 from open-AIMS/regional-sensitivity-analysis
ConnectedSystems Jan 5, 2023
650fb81
Additional notes for dev setup
ConnectedSystems Jan 3, 2023
c9d3126
Add update instructions
ConnectedSystems Jan 3, 2023
9b7e65b
Replace square with superscript text
ConnectedSystems Jan 3, 2023
08e15a2
Disable preview on PR
ConnectedSystems Jan 5, 2023
19bd9d5
Remove empty entry
ConnectedSystems Jan 5, 2023
14a3510
Add PR template
ConnectedSystems Jan 5, 2023
4f0539c
Minor adjustments to wording in dev setup and release guide
ConnectedSystems Jan 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Before submitting the Pull Request, check that:

- [ ] Relevant files auto-formatted
- [ ] All debug packages and references (`@infiltrate`, `using Revise`, etc) removed
- [ ] If relevant, tests pass locally
2 changes: 0 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main # update to match your development branch (master, main, dev, trunk, ...)
tags: '*'
pull_request:

jobs:
build:
permissions:
Expand Down
5 changes: 3 additions & 2 deletions Aviz/src/analysis.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import ADRIA.sensitivity: pawn, relative_importance
import ADRIA.analysis: normalize
import ADRIA.sensitivity: pawn


function relative_sensitivities(X, y; S=10, stat=:median)::Vector{Float64}
return relative_importance(pawn(X, Array(y); S=S)[:, stat])
return normalize(pawn(X, Array(y); S=S)[:, stat])
end

3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ADRIA"
uuid = "7dc409a7-fbe5-4c9d-b3e2-b0c19a6ba600"
authors = ["Takuya Iwanaga", "Rose Crocker", "Ken Anthony"]
version = "0.4.3"
version = "0.4.4"

[deps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
Expand Down Expand Up @@ -85,6 +85,7 @@ OnlineStats = "1.5"
PkgVersion = "0.2, 0.3"
ProgressMeter = "1"
RelocatableFolders = "1"
Requires = "1"
SciMLBase = "1"
Setfield = "0.8, 1"
SnoopPrecompile = "1"
Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ makedocs(sitename="ADRIA Documentation",
pages=[
"index.md",
"synopsis.md",
"usage.md",
"dMCDA.md",
# "Examples" => [
# "Usage" => [
Expand All @@ -31,5 +32,5 @@ deploydocs(
repo="github.com/open-AIMS/ADRIA.jl.git",
devbranch="main",
target="build",
push_preview=true
push_preview=false
)
2 changes: 2 additions & 0 deletions docs/src/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
```@autodocs
Modules = [ADRIA.metrics]
Order = [:function, :type]
Private = false
```

## Performance indicators
Expand All @@ -26,5 +27,6 @@ Order = [:function, :type]
```@autodocs
Modules = [ADRIA]
Order = [:function, :type]
Private = false
```

21 changes: 20 additions & 1 deletion docs/src/development/building_docs.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
# Building Documentation

ADRIA documentation is built using [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl).


## Building documentation locally

From the ADRIA project directory:

```bash
$ cd docs
$ julia --project=. make.jl
```
```

Locally generated documentation can be found under `docs/build`. Open the `index.html` file with any web browser.


## Documentation deployment

Documentation is hosted on [GitHub Pages](https://pages.github.com/) via [GitHub Actions](https://github.com/features/actions).

Configuration is found [here](https://github.com/open-AIMS/ADRIA.jl/blob/main/.github/workflows/documentation.yml).

Documentation is automatically built and deployed:

- When a PR targeting `main` is submitted
In this case, a preview URL is created: e.g., a URL with `previews/PR###` at the end, where `PR###` refers to the PR ID.
- On commit/merge to `main`
In this case the main documentation website is updated
17 changes: 13 additions & 4 deletions docs/src/development/development_setup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Development setup

First, clone the repository.

Then navigate to the project folder and start Julia.

```bash
# Start julia specifying the current directory as the project
$ julia --project=.
Expand Down Expand Up @@ -28,7 +32,10 @@ julia> ]activate .
# Press ctrl+c to exit the package manager
```

Development scripts/functions can then be worked on in the `sandbox` folder without these polluting the ADRIA project itself.
Development scripts/functions can then be worked on in the `sandbox` folder, and its sub-folders, without these polluting the ADRIA project itself.

We recommend [VS Code](https://code.visualstudio.com/) with its Julia extension when developing ADRIA.
We also recommend the built-in Julia REPL within VS Code be used (see the notes below).


## Testing
Expand All @@ -53,10 +60,12 @@ See the documentation [here](https://github.com/open-AIMS/ADRIA.jl/tree/main/bui
Note: compilation time to create a sysimage can be upwards of 30mins, and has to be repeated if the included packages are to be updated.

!!! note "VS Code"
VS Code now has (experimental support) for generating a custom sysimage for its REPL.
The same caveats as above apply (it has to be recreated if the project specification has changed for any reason).
VS Code now has (experimental) support for generating a custom sysimage for its REPL.
The same caveats as above apply: the sysimage has to be recreated if the project specification has changed for any reason.

It is highly recommended that this sysimage be built and used.

See: https://www.julia-vscode.org/docs/dev/userguide/compilesysimage/
See: [This guide](https://www.julia-vscode.org/docs/dev/userguide/compilesysimage/)


```julia
Expand Down
24 changes: 21 additions & 3 deletions docs/src/development/release_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,32 @@
3. Submit PR from development branch into `main` and request code review/approval
4. Once PR is merged into main, go to the [releases page](https://github.com/open-AIMS/ADRIA.jl/releases) and draft a new release
5. Under "choose a tag" create a new tag "on publish"
Note version numbers should follow Semantic Versioning: https://semver.org/
Note version numbers should follow [Semantic Versioning](https://semver.org/)
6. Click the "Generate release notes" button (top-right of textbox).
Under "Whats new" add a short description of the major changes.
Explicitly note any major breaking changes (i.e., anything that results obtained with previous versions of ADRIA incompatible)
7. Release title should match the version number.

Click "Publish release" (green button at the bottom)

Finally, register the updated package with the Julia registry by:

1. Opening a new issue. The title can be anything, but something along the lines of "Register [version number]"
e.g., Register v1.0
2. State in the comment: `@JuliaRegistrator register`

Release notes should also be included when appropriate, like so:

```
@JuliaRegistrator register

Release notes:

Some details of new features!
```

See Julia Registrator usage notes [here](https://github.com/JuliaComputing/Registrator.jl?installation_id=32448289&setup_action=install#details-for-triggering-juliaregistrator-for-step-2-above) for more details.


## Development Release

Expand All @@ -25,7 +43,7 @@ Deploying a Development Release follows the same steps as "Public" releases, exc

1. Add "-dev.x" to the version number.
e.g., v1.2.3-dev.1; v1.2.3-dev.2 for the second development release, etc.
2. Untick the "Set as the latest release" option and tick the "Set as a pre-release" option.
2. Untick "Set as the latest release" and tick the "Set as a pre-release" option.


## Release Candidates
Expand All @@ -37,5 +55,5 @@ Deploying a Release Candidate follows the same steps as "Public" releases, excep

1. Add "-rc.x" to the version number.
e.g., v1.2.3-rc.1; v1.2.3-rc.2 for the second release candidate, etc.
2. Untick the "Set as the latest release" option and tick the "Set as a pre-release" option.
2. Untick "Set as the latest release" and tick the "Set as a pre-release" option.

2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To specify user-specific options, a `config.toml` file should be created with th
```toml
[operation]
num_cores = 2 # No. of cores to use. Values <= 0 will use all available cores.
threshold = 1e-6 # Result values below this will be set to 0.0
threshold = 1e-8 # Result values below this will be set to 0.0 (to save disk space)
debug = false # Disable multi-processing to allow error messages to be shown

[results]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/synopsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Deciding where, when, and how to intervene – if at all - using new reef restor

To help reef modellers, decision-support teams and reef managers address these questions, AIMS has developed the Adaptive, Dynamic Reef Intervention Algorithm (ADRIA). In short, ADRIA simulates a reef decision maker operating inside the dynamic state space of a coral reef.

For reef managers, ADRIA help provide line of sight to conservation solutions in complex settings where multiple objectives need to be considered. For investors, ADRIA helps analysts identify which options (R&D and/or deployment solutions) might have the highest likelihood of providing ecological and social returns on investment. While ADRIA’s key function is as a decision-support tool for intervention deployment, it uses a simple proxy model for reef coral dynamics, consisting of vital rates parameterised in a set of linked differential equations for four coral groups. The growth, mortality and recruitment of those four coral groups are further parameterised by environmental drivers and by different restoration and adaptation interventions.
For reef managers, ADRIA help provide line of sight to conservation solutions in complex settings where multiple objectives need to be considered. For investors, ADRIA helps analysts identify which options (R&D and/or deployment solutions) might have the highest likelihood of providing ecological and social returns on investment across a range of considered environmental conditions. While ADRIA’s key function is as a decision-support tool for intervention deployment, it uses a simple proxy model for reef coral dynamics, consisting of vital rates parameterised in a set of linked differential equations for four coral groups. The growth, mortality and recruitment of those four coral groups are further parameterised by environmental drivers and by different restoration and adaptation interventions.

The primary purpose of ADRIA is to help guide intervention deployment such that net benefits are maximised against primary objectives and minimised against costs. Solutions can be tuned (eventually optimised) via heuristics that control the selection of sites and/or reefs and the prioritisation of species, ecosystem services or benefits that favour what people (society) want. The key benefits considered in ADRIA are consistent with a triple-bottom-line approach, i.e.

Expand Down
Loading