Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure for tests #13

Merged
merged 3 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/pythontests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ jobs:
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
python -m pip install -e .[test]
- name: Install optional dependencies for tests
run: |
pip install boost-histogram uproot pandas || true
- name: Run tests
run: |
python -m histoprint.test
python -m pytest tests/test.py
eduardo-rodrigues marked this conversation as resolved.
Show resolved Hide resolved
- name: Run CLI
run: |
histoprint testdata/1D.txt
histoprint testdata/2D.txt
histoprint testdata/3D.txt -s -l A -l B -l C -t "HISTOPRINT"
histoprint testdata/3D.txt -s -f 0 -l A -f 2 -l C
histoprint testdata/3D.csv -s -f x -f z
histoprint tests/data/1D.txt
histoprint tests/data/2D.txt
histoprint tests/data/3D.txt -s -l A -l B -l C -t "HISTOPRINT"
histoprint tests/data/3D.txt -s -f 0 -l A -f 2 -l C
histoprint tests/data/3D.csv -s -f x -f z
wget http://scikit-hep.org/uproot/examples/Event.root
histoprint -s Event.root -f T/event/fTracks.fYfirst -f T/event/fTracks/fTracks.fYlast
histoprint -s Event.root -f htime
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
with open("README.rst") as f:
long_description = f.read()

extras = {"test": ["pytest"]}

setup(
name="histoprint",
version="1.4.0",
Expand All @@ -24,7 +26,8 @@
license="MIT",
packages=["histoprint"],
install_requires=["numpy>=1.0.0", "click>=7.0.0"],
extras_require={},
extras_require=extras,
tests_require=extras["test"],
python_requires=">=2.7",
classifiers=[
# How mature is this project? Common values are
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.