You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All halotools development happens in the github repository. To contribute, first clone the repo.
8
+
Then install the dependencies listed on the :ref:`step_by_step_install` page.
9
+
10
+
11
+
Code
12
+
====
13
+
14
+
Halotools contains a compiled component. To compile all cython (``.pyx``) files inplace run, ::
15
+
16
+
python3 setup.py build_ext --inplace
17
+
18
+
If you modify a ``.pyx`` file use the same command to recompile it. Subsequent runs will only compile files whose source has changed and so will be much quicker.
19
+
20
+
Halotools also has comprehensive unit tests and uses pytest. To run all tests, assuming you are in the base of the repository, first change directory into ``halotools`` and then run ``pytest``. ::
21
+
22
+
cd halotools
23
+
pytest
24
+
25
+
If you have made a change and only want to run a subset of tests run, ::
26
+
27
+
pytest -k tests_matching_this_string_will_run
28
+
29
+
Run ``pytest --help`` for a full list of options.
30
+
31
+
32
+
Docs
33
+
====
34
+
35
+
First ensure that the halotools package and sphinx are installed. From the base of the repository run, ::
36
+
37
+
pip3 install -e .
38
+
pip3 install sphinx==1.3.1 # see docs/conf.py for the sphinx version
39
+
40
+
Then build documentation with, ::
41
+
42
+
cd docs
43
+
make html
44
+
45
+
You can see the built documentation in ``docs/_build/html/``. The easiest way to view it in your browser is to spin up a local server. One way to do this is to run, from the built directory, ::
46
+
47
+
python3 -m http.server
48
+
49
+
The docs should then be viewable at ``localhost:8000`` (the port will be logged when you start the server).
0 commit comments