Skip to content

Commit 8e716f0

Browse files
committed
Finalize contributing
1 parent 582da46 commit 8e716f0

File tree

6 files changed

+57
-18
lines changed

6 files changed

+57
-18
lines changed

docs/contributing.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,75 @@
22

33
We're happy that you are interested in contributing to pyElli!
44

5-
There are several ways of contributing to pyElli.
6-
The easiest is reporting issues or starting discussions.
7-
If you want to dive deeper feel free to open a pull request or contact us
8-
if you need some help.
9-
We're eager to help you if you want to contribute code to pyElli even if you feel
10-
you don't bring a lot of knowledge (yet). We are happy to assist.
5+
You can contribute by reporting issues, starting discussions or open pull requests yourself
6+
to contribute code directly.
7+
In case you need help don't hesitate to ask for it.
118

129
## Reporting an Issue
1310

1411
If you are encountering problems with pyElli or have a feature request
15-
please open an issue at our [Github Issues Page](https://github.com/PyEllips/pyElli/issues).
12+
open an issue at pyElli's [Github Issues Page](https://github.com/PyEllips/pyElli/issues).
1613

17-
Please try to provide a minimal example for reproducing the issue.
18-
This makes it a lot easier for the developers to work on the problem.
14+
Ideally, you'll provide a minimal example to reproduce the issue.
15+
This will make it a lot easier to work on the problem.
1916

2017
If you are not entirely sure whether the problem you're encountering is actually a bug
21-
or if you want to discuss some feature ideas feel free to post on our [Github Discussion Page](https://github.com/orgs/PyEllips/discussions)
18+
or if you want to discuss some feature ideas feel free to post on pyElli's [Github Discussion Page](https://github.com/orgs/PyEllips/discussions)
2219

2320
## Making a Pull Request
2421

22+
In case you want to contribute your own code to pyElli you can open a pull request.
23+
To do this you need to fork pyElli first and create the pull request from your fork.
24+
[Github's excellent documentation on the topic](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) will be helpful if you need help to create a fork.
25+
26+
### Setting up the repository and development environment
27+
28+
First, clone the repo to start working on the code.
29+
Replace `https://github.com/PyEllips/pyElli` with the url of your fork.
30+
2531
```sh
2632
git clone --recurse-submodules https://github.com/PyEllips/pyElli
2733
cd pyElli
2834
```
2935

36+
In the next step we install the package in development mode.
37+
We recommend using [uv](https://docs.astral.sh/uv/), which will manage a dedicated python
38+
virtual environment for the project.
39+
However, any virtual environment should work.
40+
41+
=== "uv"
42+
43+
```sh
44+
uv sync --extra dev --extra docs --extra fitting
45+
```
46+
3047
=== "pip"
3148

3249
```sh
3350
pip install -e '.[dev,docs,fitting]
3451
```
3552

53+
Now you're ready to make your changes to the code.
54+
55+
### Testing
56+
57+
Before opening a pull request please ensure that the tests pass and the code passes
58+
the linting checks and is formatted properly.
59+
We use the tool [ruff](https://docs.astral.sh/ruff/) to check linting and formatting
60+
and [pytest](https://docs.pytest.org/en/stable/) for testing.
61+
3662
=== "uv"
3763

3864
```sh
39-
uv sync --extra dev --extra docs --extra fitting
65+
uv run pytest
66+
uv run ruff check .
67+
uv run ruff format .
68+
```
69+
70+
=== "pip"
71+
72+
```sh
73+
pytest
74+
ruff check .
75+
ruff format .
4076
```

docs/explanation/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Learning
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Custom Fitting
1+
# Fitting Multiple Angles
22

33
Custom fitting

docs/howto/mueller_matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Mueller Matrix
1+
# Mueller Matrix Fitting
22

33
Mueller matrix
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# Working with Dispersions
1+
# Working with Dispersions Models
22

3-
TODO:
4-
- How to construct and add dispersions
5-
- Formula dispersions
6-
- How to load dispersions from rii
3+
## Adding Dispersions
4+
5+
## Using a Formula Dispersion
6+
7+
## Using Dispersions from refractiveindex.info

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ nav:
2121
- Tutorials:
2222
- tutorial/index.md
2323
- tutorial/simple_fit.md
24+
- tutorial/working_with_dispersions.md
2425
- How-Tos:
2526
- howto/index.md
2627
- howto/fitting_multiple_angles.md

0 commit comments

Comments
 (0)