Contributing
- Contributing
- Code of conduct
- Join the community forum
- Improve the documentation
- File a bug report
- Contribute code to LinearElasticityBase
- Step 1: decide what to work on
- Step 2: fork LinearElasticityBase
- Step 3: install LinearElasticityBase locally
- Step 4: checkout a new branch
- Step 5: make changes
- Step 6a: test your code changes
- Step 6b: test your documentation changes
- Step 7: make a pull request
- Step 8: respond to comments
- Step 9: cleaning up
Welcome! This document explains some ways you can contribute to LinearElasticityBase.
Code of conduct
This project and everyone participating in it is governed by the "Contributor Covenant Code of Conduct". By participating, you are expected to uphold this code.
Join the community forum
First up, join the community forum.
The forum is a good place to ask questions about how to use LinearElasticityBase. You can also use the forum to discuss possible feature requests and bugs before raising a GitHub issue (more on this below).
Aside from asking questions, the easiest way you can contribute to LinearElasticityBase is to help answer questions on the forum!
Improve the documentation
Chances are, if you asked (or answered) a question on the community forum, then it is a sign that the documentation could be improved. Moreover, since it is your question, you are probably the best-placed person to improve it!
The docs are written in Markdown and are built using Documenter.jl. You can find the source of all the docs here.
If your change is small (like fixing typos, or one or two sentence corrections), the easiest way to do this is via GitHub's online editor. (GitHub has help on how to do this.)
If your change is larger, or touches multiple files, you will need to make the change locally and then use Git to submit a pull request. (See Contribute code to LinearElasticityBase below for more on this.)
File a bug report
Another way to contribute to LinearElasticityBase is to file bug reports.
Make sure you read the info in the box where you write the body of the issue before posting. You can also find a copy of that info here.
If you're unsure whether you have a real bug, post on the community forum first. Someone will either help you fix the problem, or let you know the most appropriate place to open a bug report.
Contribute code to LinearElasticityBase
Finally, you can also contribute code to LinearElasticityBase!
If you do not have experience with Git, GitHub, and Julia development, the first steps can be a little daunting. However, there are lots of tutorials available online, including:
Once you are familiar with Git and GitHub, the workflow for contributing code to LinearElasticityBase is similar to the following:
Step 1: decide what to work on
The first step is to find an open issue (or open a new one) for the problem you want to solve. Then, before spending too much time on it, discuss what you are planning to do in the issue to see if other contributors are fine with your proposed changes. Getting feedback early can improve code quality, and avoid time spent writing code that does not get merged into LinearElasticityBase.
At this point, remember to be patient and polite; you may get a lot of comments on your issue! However, do not be afraid! Comments mean that people are willing to help you improve the code that you are contributing to LinearElasticityBase.
Step 2: fork LinearElasticityBase
Go to https://github.com/MineralsCloud/LinearElasticityBase.jl and click the "Fork" button in the top-right corner. This will create a copy of LinearElasticityBase under your GitHub account.
Step 3: install LinearElasticityBase locally
Similar to Installation, open the Julia REPL and run:
julia> using Pkg
julia> Pkg.update()
Updating registry at `~/.julia/registries/General.toml` + Installed IOCapture ─────────────── v0.2.4 + Installed OpenSSL_jll ───────────── v3.0.13+1 + Installed Expat_jll ─────────────── v2.5.0+0 Installed RegistryInstances ─────── v0.1.0 Installed Libiconv_jll ──────────── v1.17.0+0 - Installed IOCapture ─────────────── v0.2.4 + Installed Git_jll ───────────────── v2.44.0+2 + Installed CodecZlib ─────────────── v0.7.4 + Installed Git ───────────────────── v1.3.1 Installed MarkdownAST ───────────── v0.1.2 - Installed Git_jll ───────────────── v2.43.0+0 - Installed Expat_jll ─────────────── v2.5.0+0 - Installed OpenSSL_jll ───────────── v3.0.13+0 - Installed AbstractTrees ─────────── v0.4.4 - Installed Git ───────────────────── v1.3.0 + Installed TranscodingStreams ────── v0.10.7 Installed LazilyInitializedFields ─ v1.2.2 - Installed Documenter ────────────── v1.2.1 + Installed AbstractTrees ─────────── v0.4.5 + Installed Documenter ────────────── v1.3.0 Updating `~/work/LinearElasticityBase.jl/LinearElasticityBase.jl/docs/Project.toml` - [e30172f5] ↑ Documenter v0.27.24 ⇒ v1.2.1 + [e30172f5] ↑ Documenter v0.27.24 ⇒ v1.3.0 Updating `~/work/LinearElasticityBase.jl/LinearElasticityBase.jl/docs/Manifest.toml` - [1520ce14] + AbstractTrees v0.4.4 - [e30172f5] ↑ Documenter v0.27.24 ⇒ v1.2.1 - [d7ba0133] + Git v1.3.0 + [1520ce14] + AbstractTrees v0.4.5 + [944b1d66] + CodecZlib v0.7.4 + [e30172f5] ↑ Documenter v0.27.24 ⇒ v1.3.0 + [d7ba0133] + Git v1.3.1 [b5f81e59] ↑ IOCapture v0.2.2 ⇒ v0.2.4 [682c06a0] ↑ JSON v0.21.3 ⇒ v0.21.4 [0e77f7df] + LazilyInitializedFields v1.2.2 [d0879d2d] + MarkdownAST v0.1.2 [69de0a69] ↑ Parsers v2.5.4 ⇒ v2.8.1 - [21216c6a] ↑ Preferences v1.3.0 ⇒ v1.4.1 + [21216c6a] ↑ Preferences v1.3.0 ⇒ v1.4.3 [2792f1a3] + RegistryInstances v0.1.0 [66db9d55] - SnoopPrecompile v1.0.3 + [3bb67fe8] + TranscodingStreams v0.10.7 [2e619515] + Expat_jll v2.5.0+0 - [f8c6e375] + Git_jll v2.43.0+0 + [f8c6e375] + Git_jll v2.44.0+2 [94ce4f54] + Libiconv_jll v1.17.0+0 - [458c3c95] + OpenSSL_jll v3.0.13+0 + [458c3c95] + OpenSSL_jll v3.0.13+1 [efcefdf7] + PCRE2_jll v10.42.0+1 Precompiling project... - ✓ IOCapture - ✓ LazilyInitializedFields - ✓ AbstractTrees - ✓ RegistryInstances - ✓ OpenSSL_jll - ✓ Expat_jll - ✓ Libiconv_jll - ✓ MarkdownAST - ✓ Git_jll - ✓ Git - ✓ Documenter - 11 dependencies successfully precompiled in 22 seconds. 34 already precompiled. - 2 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions + ✓ LazilyInitializedFields + ✓ IOCapture + ✓ AbstractTrees + ✓ TranscodingStreams + ✓ Libiconv_jll + ✓ Expat_jll + ✓ OpenSSL_jll + ✓ RegistryInstances + ✓ MarkdownAST + ✓ TranscodingStreams → TestExt + ✓ Git_jll + ✓ CodecZlib + ✓ Git + ✓ Documenter + 14 dependencies successfully precompiled in 24 seconds. 34 already precompiled. + 2 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions Info We haven't cleaned this depot up for a bit, running Pkg.gc()... Active manifest files: 3 found Active artifact files: 5 found @@ -54,9 +61,9 @@ [c9ccf908] ~ LinearElasticityBase v0.3.0 `~/work/LinearElasticityBase.jl/LinearElasticityBase.jl` ⇒ v0.3.0 `~/.julia/dev/LinearElasticityBase` Updating `~/work/LinearElasticityBase.jl/LinearElasticityBase.jl/docs/Manifest.toml` [c9ccf908] ~ LinearElasticityBase v0.3.0 `~/work/LinearElasticityBase.jl/LinearElasticityBase.jl` ⇒ v0.3.0 `~/.julia/dev/LinearElasticityBase`
Then the package will be cloned to your local machine. On *nix systems, the default path is ~/.julia/dev/LinearElasticityBase
unless you modify the JULIA_DEPOT_PATH
environment variable. If you're on Windows, this will be C:\\Users\\<my_name>\\.julia\\dev\\LinearElasticityBase
. In the following text, we will call it PKGROOT
.
Go to PKGROOT
, start a new Julia session and run
julia> using Pkg
julia> Pkg.instantiate()
Precompiling project... - ✓ LinearElasticityBase - 1 dependency successfully precompiled in 17 seconds. 44 already precompiled. - 1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
to instantiate the project.
Step 4: checkout a new branch
In the following, replace any instance of GITHUB_ACCOUNT
with your GitHub username.
The next step is to checkout a development branch. In a terminal (or command prompt on Windows), run:
cd ~/.julia/dev/LinearElasticityBase
+ ✓ LinearElasticityBase
+ 1 dependency successfully precompiled in 18 seconds. 47 already precompiled.
+ 1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
to instantiate the project.
Step 4: checkout a new branch
In the following, replace any instance of GITHUB_ACCOUNT
with your GitHub username.
The next step is to checkout a development branch. In a terminal (or command prompt on Windows), run:
cd ~/.julia/dev/LinearElasticityBase
git remote add GITHUB_ACCOUNT https://github.com/GITHUB_ACCOUNT/LinearElasticityBase.jl.git
@@ -74,4 +81,4 @@
git checkout main
-git pull
If you have suggestions to improve this guide, please make a pull request! It's particularly helpful if you do this after your first pull request because you'll know all the parts that could be explained better.
Thanks for contributing to LinearElasticityBase!