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

Move recommendation on startup.jl from README to docs #317

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 0 additions & 24 deletions EpiAware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,3 @@ We use [`Pluto.jl`](https://plutojl.org/) scripts as part of our documentation a

## Opinionated guide to using Julia for project development
Some user and potential contributors may not be familiar with using Julia for, or part of, project development. In documentation we give our opinions on how to use Julia for project development focussing on Julia version control with the command line tool `juliaup`, typical patterns for using stacked environments and useful settings for development using the Julia extension of VS-Code as an interactive development environment (IDE) for Julia project. Please find the documentation [here](https://cdcgov.github.io/Rt-without-renewal/dev/man/getting-started-julia/).

### `startup.jl` recommendation

We recommend adding a `startup.jl` file to import `Revise` and `Term` at the start of any Julia session. This file should be located in the `~/.julia/config` directory. Here is an example of a `startup.jl` file that loads the `Revise` and `Term`:

```julia
atreplinit() do repl
# Load Revise if it is installed
try
@eval using Revise
catch e
@warn "error while importing Revise" e
end
# Load Term if it is installed
try
@eval using Term
@eval install_term_repr()
@eval install_term_stacktrace()
catch e
@warn "error while importing Term" e
end
end

```
25 changes: 25 additions & 0 deletions EpiAware/docs/src/man/getting-started-julia.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,31 @@ In our view these packages are useful for the primary environment, and therefore
- `TestEnv`: For easy use of test environments for package testing.
- `UnicodePlots`: For simple and quick plotting in the REPL without needing to install a fully featured plotting package.


### `startup.jl` recommendation

`Revise` and `Term` useful to have available in every Julia session. It is convenient to have these packages loaded automatically when you start a Julia session by adding a `startup.jl` file. This file should be located in the `~/.julia/config` directory. Here is an example of a `startup.jl` file that loads the `Revise` and `Term`:

```julia
atreplinit() do repl
# Load Revise if it is installed
try
@eval using Revise
catch e
@warn "error while importing Revise" e
end
# Load Term if it is installed
try
@eval using Term
@eval install_term_repr()
@eval install_term_stacktrace()
catch e
@warn "error while importing Term" e
end
end

```

## Developing a Julia project from VS-Code

### Julia extension for VS-Code
Expand Down
Loading