Skip to content

Commit 8c2cfa6

Browse files
author
Uwe Hernandez Acosta
committed
started updating the docs
1 parent 03b1290 commit 8c2cfa6

File tree

6 files changed

+187
-3
lines changed

6 files changed

+187
-3
lines changed

docs/make.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ open(readme_path, "r") do readme_in
3030
end
3131

3232
pages = [
33-
"Home" => "index.md", "Interface" => "10-interface.md", "Reference" => "95-reference.md"
33+
"Home" => "index.md",
34+
"Interface" => "10-interface.md",
35+
"Tutorial" => [
36+
"New Four-Vector" => "tutorial/20-new_four_vector.md",
37+
"New Coordinate System" => "tutorial/21-new_coord_system.md",
38+
],
39+
"Contributors guide" => "90-contributing.md",
40+
"Developer docs" => "91-dev_docs.md",
41+
"API Reference" => "95-reference.md",
3442
]
3543

3644
try

docs/src/10-interface.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# [Interface](@id interface)
22

3-
This section explains how an object can become a _object with kinematic informations_.
3+
The main purpose of `LorentzVectorBase` is to provide a general interface for _Julia
4+
objects with Lorentz vector informations_. This means one implements a minimal set of
5+
accessor functions, specified by a _coordinate system_, and `LorentzVectorBase` provides
6+
implementations for a whole suite of additional accessor functions.
47

58
## Definition
69

710
A type that adheres to the interface described in this section will be referred to as
8-
_`KinematicInterface`-compliant_. A package providing such a type will be called _the provider_.
11+
_`LorentzVectorBase`-compliant_. A package providing such a type will be called _the provider_.
912

1013
## Coordinate Systems
1114

docs/src/90-contributing.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [Contributing guidelines](@id contributing)
2+
3+
First of all, thanks for the interest!
4+
5+
We welcome all kinds of contribution, including, but not limited to code, documentation, examples, configuration, issue creating, etc.
6+
7+
Be polite and respectful, and follow the code of conduct.
8+
9+
## Bug reports and discussions
10+
11+
If you think you found a bug, feel free to open an [issue](https://github.com/JuliaHEP/LorentzVectorBase.jl/issues).
12+
Focused suggestions and requests can also be opened as issues.
13+
Before opening a pull request, start an issue or a discussion on the topic, please.
14+
15+
## Working on an issue
16+
17+
If you found an issue that interests you, comment on that issue what your plans are.
18+
If the solution to the issue is clear, you can immediately create a pull request (see below).
19+
Otherwise, say what your proposed solution is and wait for a discussion around it.
20+
21+
!!! tip
22+
23+
Feel free to ping us after a few days if there are no responses.
24+
25+
If your solution involves code (or something that requires running the package locally), check the [developer documentation](91-dev_docs.md).
26+
Otherwise, you can use the GitHub interface directly to create your pull request.

docs/src/91-dev_docs.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# [Developer documentation](@id dev_docs)
2+
3+
!!! note "Contributing guidelines"
4+
5+
If you haven't, please read the [Contributing guidelines](90-contributing.md) first.
6+
7+
If you want to make contributions to this package that involves code, then this guide is for you.
8+
9+
## First time clone
10+
11+
!!! tip "If you have writing rights"
12+
13+
If you have writing rights, you don't have to fork. Instead, simply clone and skip ahead. Whenever **upstream** is mentioned, use **origin** instead.
14+
15+
If this is the first time you work with this repository, follow the instructions below to clone the repository.
16+
17+
1. Fork this repo
18+
2. Clone your repo (this will create a `git remote` called `origin`)
19+
3. Add this repo as a remote:
20+
21+
```bash
22+
git remote add upstream https://github.com/JuliaHEP/LorentzVectorBase.jl.git
23+
```
24+
25+
This will ensure that you have two remotes in your git: `origin` and `upstream`.
26+
You will create branches and push to `origin`, and you will fetch and update your local `main` branch from `upstream`.
27+
28+
## Code Formatting
29+
30+
To maintain code consistency, format your code with:
31+
32+
```julia
33+
julia --project=.formatting -e 'using Pkg; Pkg.instantiate(); include(".formatting/format_all.jl")'
34+
```
35+
36+
This ensures adherence to the project's formatting standards.
37+
38+
## Testing
39+
40+
As with most Julia packages, you can just open Julia in the repository folder, activate the environment, and run `test`:
41+
42+
```julia-repl
43+
julia> # press ]
44+
pkg> activate .
45+
pkg> test
46+
```
47+
48+
## Working on a new issue
49+
50+
We try to keep a linear history in this repo, so it is important to keep your branches up-to-date.
51+
52+
1. Fetch from the remote and fast-forward your local main
53+
54+
```bash
55+
git fetch upstream
56+
git switch main
57+
git merge --ff-only upstream/main
58+
```
59+
60+
2. Branch from `main` to address the issue (see below for naming)
61+
62+
```bash
63+
git switch -c 42-add-answer-universe
64+
```
65+
66+
3. Push the new local branch to your personal remote repository
67+
68+
```bash
69+
git push -u origin 42-add-answer-universe
70+
```
71+
72+
4. Create a pull request to merge your remote branch into the org main.
73+
74+
### Branch naming
75+
76+
- If there is an associated issue, add the issue number.
77+
- If there is no associated issue, **and the changes are small**, add a prefix such as "typo", "hotfix", "small-refactor", according to the type of update.
78+
- If the changes are not small and there is no associated issue, then create the issue first, so we can properly discuss the changes.
79+
- Use dash separated imperative wording related to the issue (e.g., `14-add-tests`, `15-fix-model`, `16-remove-obsolete-files`).
80+
81+
### Commit message
82+
83+
- Use imperative or present tense, for instance: _Add feature_ or _Fix bug_.
84+
- Have informative titles.
85+
- When necessary, add a body with details.
86+
- If there are breaking changes, add the information to the commit message.
87+
88+
### Before creating a pull request
89+
90+
!!! tip "Atomic git commits"
91+
92+
Try to create "atomic git commits" (recommended reading: [The Utopic Git History](https://blog.esciencecenter.nl/the-utopic-git-history-d44b81c09593)).
93+
94+
- Make sure the tests pass.
95+
- Make sure the pre-commit tests pass.
96+
- Fetch any `main` updates from upstream and rebase your branch, if necessary:
97+
98+
```bash
99+
git fetch upstream
100+
git rebase upstream/main BRANCH_NAME
101+
```
102+
103+
- Then you can open a pull request and work with the reviewer to address any issues.
104+
105+
## Building and viewing the documentation locally
106+
107+
Following the latest suggestions, we recommend using `LiveServer` to build the documentation.
108+
Here is how you do it:
109+
110+
1. Run `julia --project=docs` to open Julia in the environment of the docs.
111+
1. If this is the first time building the docs
112+
1. Press `]` to enter `pkg` mode
113+
1. Run `pkg> dev .` to use the development version of your package
114+
1. Press backspace to leave `pkg` mode
115+
1. Run `julia> using LiveServer`
116+
1. Run `julia> servedocs()`
117+
118+
## Making a new release
119+
120+
To create a new release, you can follow these simple steps:
121+
122+
- Create a branch `release-x.y.z`
123+
- Update `version` in `Project.toml`
124+
- Update the `CHANGELOG.md`:
125+
- Rename the section "Unreleased" to "[x.y.z] - yyyy-mm-dd" (i.e., version under brackets, dash, and date in ISO format)
126+
- Add a new section on top of it named "Unreleased"
127+
- Add a new link in the bottom for version "x.y.z"
128+
- Change the "[unreleased]" link to use the latest version - end of line, `vx.y.z ... HEAD`.
129+
- Create a commit "Release vx.y.z", push, create a PR, wait for it to pass, merge the PR.
130+
- Go back to main screen and click on the latest commit (link: <https://github.com/JuliaHEP/LorentzVectorBase.jl/commit/main>)
131+
- At the bottom, write `@JuliaRegistrator register`
132+
133+
After that, you only need to wait and verify:
134+
135+
- Wait for the bot to comment (should take < 1m) with a link to a PR to the registry
136+
- Follow the link and wait for a comment on the auto-merge
137+
- The comment should said all is well and auto-merge should occur shortly
138+
- After the merge happens, TagBot will trigger and create a new GitHub tag. Check on <https://github.com/JuliaHEP/LorentzVectorBase.jl/releases>
139+
- After the release is create, a "docs" GitHub action will start for the tag.
140+
- After it passes, a deploy action will run.
141+
- After that runs, the [stable docs](https://JuliaHEP.github.io/LorentzVectorBase.jl/stable) should be updated. Check them and look for the version number.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# [Implement New Four-Vector Type](@id tutorial_new_four_vector)
2+
3+
TBW
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# [Implement Coordinate System](@id tutorial_new_coord_system)
2+
3+
TBW

0 commit comments

Comments
 (0)