Skip to content
Snippets Groups Projects
Unverified Commit 7d0e9d5c authored by Duncan Macleod's avatar Duncan Macleod :flag_scotland:
Browse files

setup.py: remove setup_requires

use pytest to execute tests, not `setup.py test`
parent 1b44c43f
Branches master
No related tags found
1 merge request!42Restructure project into a single namespace
Pipeline #472670 passed
......@@ -9,7 +9,7 @@ stages:
- test
- doc
tarball:
dist:
extends:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/#.python:build
- .python:build
......@@ -21,10 +21,21 @@ tarball:
extends:
- .python:pytest
stage: test
needs:
- dist
variables:
GIT_STRATEGY: fetch
# install from the wheel
GIT_STRATEGY: none
INSTALL_TARGET: "p_astro-*.whl"
# options for pytest
# NOTE: these options are weirdly formatted to get around nuances
# of coverage.py's data collection. I think this is related
# to the namespace package configuration.
COVERAGE_TARGET: "ligo.p_astro"
PYTEST_OPTIONS: "-ra -v --pyargs ligo.p_astro.tests --cov=p_astro"
TESTS_REQUIRE: "coverage<6"
script:
- python setup.py test
- !reference [".python:pytest", script]
# get list of entry points
- entrypoints=$(python -c "import pkg_resources; print('\n'.join(e.name for e in pkg_resources.iter_entry_points('console_scripts') if 'p-astro' in e.dist.project_name))")
# run --help for each of them
......
......@@ -2,17 +2,23 @@ Welcome to `p-astro`, the LIGO-Virgo low-latency estimator of the probability th
candidate event belongs to an astrophysical source category.
More information can be found at the review documentation website:
https://git.ligo.org/shasvath.kapadia/Multicomponent_FGMC_Rates-pAstro
<https://git.ligo.org/shasvath.kapadia/Multicomponent_FGMC_Rates-pAstro>
A version of this documentation is included as a PDF file in the docs/ subdirectory.
To install `p-astro` locally:
`python setup.py install --prefix=/path/to/install/directory`
```shell
python -m pip install .
```
To test:
`python setup.py test`
```shell
python -m pytest ligo/p_astro/tests
```
Documentation:
https://lscsoft.docs.ligo.org/p-astro/
\ No newline at end of file
<https://lscsoft.docs.ligo.org/p-astro/>
[aliases]
test=pytest
[build_sphinx]
project = p_astro
release = 1.0.1
......
......@@ -35,7 +35,6 @@ setup(
],
packages=find_namespace_packages(include=("ligo.*")),
include_package_data=True,
setup_requires=['pytest-runner'],
tests_require=['pytest'],
namespace_packages=['ligo'],
install_requires=[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment