Installation
How to install this module?
From pip
pip install mlgw-bns
Having TEOBResumS
installed is optional, but
the functionality of the package is currently severely hampered without it —
no new models can be generated, and the only possibility is to use the
one which is provided by default.
To install it, follow the instructions to install the Python wrapper here. To check whether it is correctly installed, try to
import EOBRun_module
in a python session.
From the repo
Once you have cloned the repo, install poetry, and then run
poetry install
in the project directory. In this case, the TEOBResumS repository must be installed in the same folder as mlgw_bns:
some_folder/
|--- mlgw_bns/
|--- mlgw_bns/
|--- docs/
|--- tests/
|--- ...
|--- teobresums/
|--- Python/
|--- C/
|--- ...
Testing and dev functionality
To see whether everything is working properly, run
poetry run tox -e python3.9
where you can swap the python version to another one you have available on your system (between the supported ones — 3.7 to 3.9).
This will install all missing dependencies, run tests and also build the documentation locally, in the folder docs/html/; one can access it starting from index.html.
To only run the tests, do
poetry run pytest
To only build the documentation, do
poetry run sphinx-build docs docs/html
Make a pretty dependency graph with
poetry run pydeps mlgw_bns/
To make an html page showing the test coverage of the code, do
poetry run coverage html
There are pre-commit hooks which will clean up the code, format everything with black, check that there are no large files, check that the typing is correct with mypy.