1
- # Contributor guide
1
+ # Contributor guide
2
2
3
3
Thank you for your interest in improving this project. This project is
4
4
open-source under the [ MIT license] and welcomes contributions in the
@@ -21,16 +21,16 @@ introduction to rye, see the [postmodern python] blog post.
21
21
Use rye to add and remove dependencies from ` pyproject.toml ` .
22
22
Development packages are added by applying the ` --dev ` flag:
23
23
24
- rye add package
25
- rye add dev-package --dev
26
- rye remove package
27
- rye remove dev-package --dev
24
+ rye add package
25
+ rye add dev-package --dev
26
+ rye remove package
27
+ rye remove dev-package --dev
28
28
29
29
After modifying dependencies, make sure to run ` rye sync ` to update
30
30
the virtual environment.
31
31
32
32
[ rye ] : https://rye.astral.sh/
33
- [ postmodern python] : https://rdrn.me/postmodern-python/
33
+ [ postmodern python ] : https://rdrn.me/postmodern-python/
34
34
35
35
## Virtual environment
36
36
@@ -40,7 +40,7 @@ you have `pyenv` installed you may run into the issue that nothing
40
40
seems to load. This is a known issue (see [ pyenv issue] ). You can
41
41
always run programs in the virtual environment with ` rye run ` , e.g.,
42
42
43
- rye run pytest -v -s
43
+ rye run pytest -v -s
44
44
45
45
[ pyenv issue ] : https://github.com/astral-sh/rye/issues/317
46
46
@@ -49,25 +49,44 @@ always run programs in the virtual environment with `rye run`, e.g.,
49
49
rye provides support for Python code formatting, linting, and more.
50
50
The steps can be run separately
51
51
52
- rye fmt
53
- rye lint --fix
54
- rye run check
55
- rye test
56
-
57
- Alternativel, you can run the entire toolchain with
52
+ rye fmt
53
+ rye lint --fix
54
+ rye run check
55
+ rye test
58
56
59
- rye run all
57
+ Alternatively, you can run the entire toolchain with
58
+
59
+ rye run all
60
60
61
61
## Development with small test data set
62
62
63
63
Development is facilitated by loading the small data set that is
64
64
provided and reloading upon code changes:
65
65
66
- rye run python -m tseda tests/data/test.trees
67
-
66
+ rye run python -m tseda tests/data/test.trees
67
+
68
68
The test data is a modified simulation of the [ out of Africa]
69
69
demographic model (stdpopsim model ` OutOfAfrica_3G09 ` ), amended with
70
70
three outgroup species. The geolocations are dummy locations meant to
71
71
reflect typical metadata.
72
72
73
73
[ out of africa ] : https://github.com/popsim-consortium/stdpopsim/blob/main/stdpopsim/catalog/HomSap/demographic_models.py
74
+
75
+ ## Monitoring resource usage and user behaviour
76
+
77
+ The ` --admin ` option will activate the ` /admin ` panel:
78
+
79
+ rye run python -m tseda tests/data/test.trees --admin
80
+
81
+ If the project is served locally on port 5006, the ` /admin ` endpoint
82
+ would be available at `http://localhost:5006/admin . See [ admin] for
83
+ more information.
84
+
85
+ [ admin ] : https://panel.holoviz.org/how_to/profiling/admin.html
86
+
87
+ ## Serving the application in development mode
88
+
89
+ For interactive development, you can serve the app in development mode
90
+ with ` panel serve ` :
91
+
92
+ rye run panel serve src/tseda --dev --show --args tests/data/test.trees
0 commit comments