Skip to content

Commit f621fd2

Browse files
authored
Extend development instructions (#36)
* Extend development instructions Instructions for collaborators on source code formatting, building the documentation, and running tests. Added blue-style badge to README Added `Makefile` * Remove `Makefile`
1 parent a84a33d commit f621fd2

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ To make a good PR, follow these steps:
1717
5. Feel free to explicitly tag (with `@`) one of the maintainers to request a review of your PR when it is ready.
1818

1919

20+
## Source Code Formatting
21+
22+
This project uses the [Blue code style](https://github.com/JuliaDiff/BlueStyle), enforced via [JuliaFormatter](https://github.com/domluna/JuliaFormatter.jl). For pull requests, adherence to the code style is automatically checked during continuous integration.
23+
24+
To apply the code style locally, you should have `JuliaFormatter` installed in your global Julia environment. Then, in a Julia REPL within the `Bijections` project folder, run `using JuliaFormatter; format(".")`.
25+
26+
27+
## Running the Tests
28+
29+
In order to run the tests, start a Julia REPL with `julia --project=.`, then type `] test`. This used `Pkg` to run the test suite in a subprocess. When running the tests repeatedly, it may be faster to avoid the subprocess. To run tests directly, start a Julia REPL in the test environment with `julia --project=test`. Consider using [Revise](https://github.com/timholy/Revise.jl). Instantiate with `] instantiate`, then run the tests with `include("test/runtests.jl")`. On Julia < 1.11, you may need `] dev .` to ensure that the test environment uses the current code.
30+
31+
32+
## Building the Documentation
33+
34+
To build the documentation locally, start a Julia REPL in the docs environment with `julia --project=docs`. Instantiate with `] instantiate`, then build the documentation with `include("docs/make.jl")`. On Julia < 1.11, you may need `] dev .` to ensure that the test environment uses the current code.
35+
36+
This will build the documentation in `./docs/build`. The preview it, you must run a web server, either via the [LiveServer](https://github.com/JuliaDocs/LiveServer.jl) package, or (if you have Python installed), via `python3 -m http.server`. See the [Documenter Guide](https://documenter.juliadocs.org/stable/man/guide/#Note-6b659cc6046c5199) for details.
37+
38+
2039
## Maintainer Notes
2140

2241
### Maintainers

0 commit comments

Comments
 (0)