@@ -16,3 +16,39 @@ cp resources/config.sample.json config.20240405.json
16
16
```
17
17
18
18
Then `` scicat_ingestor `` will automatically use the configuration file.
19
+
20
+ ## Developer's Guide
21
+
22
+ ### Virtual Environments
23
+ We use [ pip-compile-multi] ( https://pip-compile-multi.readthedocs.io/en/latest/ ) to maintain
24
+ the ` pip ` recipes under ` requirements ` .
25
+ Each ` *.in ` files have the dependencies for specific purposes and ` *.txt ` files are compiled frozen dependencies.
26
+ ` base.in ` is auto-generated by ` make_base.py ` script based on ` pyproject.toml ` ,
27
+ but you can add/pin dependencies manually above the marker in the file.
28
+
29
+ We use [ tox] ( #Tox ) command, ` tox -e deps ` to freeze the dependencies.
30
+
31
+ ### Pre-commit Hooks
32
+ We use ` pre-commit ` for formatting and static analysis of the code.
33
+ Once you clone the repository and set up the virtual environment (i.e. installed ` requirements/dev.txt ` )
34
+ you need to install [ pre-commit] ( https://pre-commit.com/index.html ) by
35
+ ``` bash
36
+ pre-commit install
37
+ ```
38
+ ` pre-commit ` will be hooked whenever you make a ` git commit ` and screen the files of interest.
39
+
40
+ It will not pass CI test if ` pre-commit ` complains.
41
+ If you want to push the change while having a PR open, even if you know that ` pre-commit hooks ` fail,
42
+ you can add ` [ci-skip] ` tag in your commit and CI action will be skipped.
43
+
44
+ ### Copier Template
45
+ This repository was based on [ scipp/copier_template] ( https://github.com/scipp/copier_template ) .
46
+ We can apply common updates/dependency updates using
47
+ ``` bash
48
+ copier update
49
+ ```
50
+
51
+ ### Tox
52
+ ` tox ` controls virtual environment and commands for various purposes.
53
+ Developers and CI actions can use the command.
54
+ For example, ` tox -e docs ` builds documentation under ` ./html ` directory and ` tox -e py310 ` will run unit tests with python version ` 3.10 ` .
0 commit comments