Skip to content

Commit f500d13

Browse files
Contributor Guideline (adapted from Ferrite.jl) (#204)
1 parent 203130d commit f500d13

1 file changed

Lines changed: 87 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Thunderbolt.jl contributor guide
2+
3+
Welcome to Thunderbolt.jl contributor documentation! In this document you find
4+
information about:
5+
6+
- [Documentation](#documentation)
7+
- [Reporting issues](#reporting-issues)
8+
- [Code changes](#reporting-issues)
9+
10+
If you are new to open source development in general there are many guides online to help
11+
you get started, for example [first-contributions][first-contributions]. Another great
12+
resource, which specifically discusses Julia contributions, is the video [Open source, Julia
13+
packages, git, and GitHub][tim-git].
14+
15+
## Documentation
16+
17+
Contributing to documentation is a great way to get started with any new project. As a new
18+
user you have a unique perspective of what things need to be documented and explained better
19+
-- if something confuses you, chances are you're not alone. Remember that also simple
20+
changes like fixing typos are welcome contributions. If you are looking for specific things
21+
to work on you can look at [open issues][open-issues].
22+
23+
Small changes can be done easily in GitHub's web interface (see [Editing
24+
files][gh-edit-files]). Every page in the documentation have an `Edit on GitHub` button at
25+
the top, which takes you to the correct source file. The video [Making Julia documentation
26+
better][tim-doc] guides you through these steps.
27+
28+
Making larger changes is easier locally after cloning the repository. With a local
29+
repository you can also preview the changes in your own browser. After starting a Julia REPL
30+
in the root of the repository you can execute the following snippet:
31+
32+
```julia
33+
include("docs/liveserver.jl")
34+
```
35+
36+
This uses [`LiveServer.jl`][liveserver] to launch a local webserver which you can visit at
37+
[http://localhost:8000](http://localhost:8000). `LiveServer.jl` will monitor changes to the
38+
source files. When you make a change, and save the file, `LiveServer.jl` will automatically
39+
rebuild the documentation, and automatically refresh your browser window. Note that the
40+
first build may take longer, but subsequent runs should be substantially faster and give you
41+
almost instant feedback in the browser.
42+
43+
**Useful resources**
44+
- General information about documenting Julia code in the [Julia manual][julia-doc].
45+
- [Documentation for `Documenter.jl`][documenter] which is used to render the HTML pages.
46+
- [Documentation for `Literate.jl`][literate] which is used for tutorials/examples.
47+
48+
49+
## Reporting issues
50+
51+
If you have found a bug or a problem with Thunderbolt you can open an [issue][new-issue]. Try
52+
to include as much information about the problem as possible and preferably some code that
53+
can be copy-pasted to reproduce it (see [How to create a Minimal, Reproducible
54+
Example][so-mre]).
55+
56+
If you can identify a fix for the bug you can submit a pull request without first opening an
57+
issue, see [Code changes](#code-changes).
58+
59+
60+
## Code changes
61+
62+
Bug fixes and improvements to the code, or to the unit tests are always welcome. If you have
63+
ideas about new features or functionality it might be good to first open an
64+
[issue][new-issue] or [discussion][new-discussion] to get feedback before spending too much
65+
time implementing something.
66+
67+
If you are looking for specific things to work on you can look at [open
68+
issues][open-issues].
69+
70+
71+
72+
[documenter]: https://juliadocs.github.io/Documenter.jl/
73+
[first-contributions]: https://github.com/firstcontributions/first-contributions
74+
[gh-edit-files]: https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files#editing-files-in-another-users-repository
75+
[julia-doc]: https://docs.julialang.org/en/v1/manual/documentation/
76+
[literate]: https://fredrikekre.github.io/Literate.jl/v2/
77+
[liveserver]: https://github.com/tlienart/LiveServer.jl
78+
[new-discussion]: https://github.com/JuliaHealth/Thunderbolt.jl/discussions/new
79+
[new-issue]: https://github.com/JuliaHealth/Thunderbolt.jl/issues/new
80+
[open-issues]: https://github.com/JuliaHealth/Thunderbolt.jl/issues
81+
[pre-commit-install]: https://pre-commit.com/#install
82+
[pre-commit]: https://pre-commit.com/
83+
[runic-readme]: https://github.com/fredrikekre/Runic.jl/blob/master/README.md
84+
[runic]: https://github.com/fredrikekre/Runic.jl
85+
[so-mre]: https://stackoverflow.com/help/minimal-reproducible-example
86+
[tim-doc]: https://youtu.be/ZpH1ry8qqfw
87+
[tim-git]: https://youtu.be/cquJ9kPkwR8

0 commit comments

Comments
 (0)