EntilZha / PyFunctional

Python library for creating data pipelines with chain functional programming
http://pyfunctional.pedro.ai
MIT License
2.41k stars 132 forks source link

Use tox for testing #133

Closed chrisrink10 closed 4 years ago

chrisrink10 commented 6 years ago

When I was working on #132, I wanted to run the test suite across several versions. I have used tox for other projects and I thought it might be worthwhile to use here too. Here's the file I used locally:

[tox]
envlist = py27,py33,py34,py36,py37,lint

[testenv]
deps =
    -rrequirements.txt
    coverage
    nose
commands =
    python -m 'nose' --with-coverage --cover-package=functional --cover-erase

[testenv:lint]
deps = pylint
commands =
    pylint functional

I'm happy to submit as a PR and change the Travis script too if that would be helpful.

EntilZha commented 6 years ago

It would be great to have something like this instead of the build matrix. The main things to replicate would be having pypy in there, and testing things with and without pandas. I'm unfamiliar with tox, but since its virtualenv based seems like that should be possible

chrisrink10 commented 6 years ago

I think Tox can test PyPy out of the box as well by just adding pypy-[version] into the envlist. I don't know much about Pandas personally, so I can't comment, but I suspect we could just use the generated environments feature to test each with and without Pandas.

EntilZha commented 6 years ago

Looks like generative environments would do the job. In this case, pandas being installed or not being installed causes slightly different execution path (throw exception with message versus converting sequence to dataframe) so testing both cases is ideal. A PR would be great to wrap everything together.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.