shepherdjay / ipfromwebpage

Simple script that scrapes a web page for IP addresses and prints aggregate result.
MIT License
2 stars 6 forks source link

Packaged version #8

Closed shepherdjay closed 7 years ago

shepherdjay commented 7 years ago

Packaged version for pypi

shepherdjay commented 7 years ago

@dharmab - If you have a free moment I'm not sure why it is saying no module "named" on the CI test. Works fine in pycharm but there could be some pycharm magic going on.

this is my attempt at packaging up this project for distribution

shepherdjay commented 7 years ago

nope travis.ci didn't like that either.

dharmab commented 7 years ago

Your tests are using relative imports, which require the test to be run from the correct directory. On my system py.text --cov only works if I'm in the ipfromwebpage directory. By default, Travis runs commands in the project root.

Possible solutions:

dharmab commented 7 years ago

Ah, I misled you. Should be tests, not ipfromwebpage

dharmab commented 7 years ago

Aha! pytest has weird behavior when running in a virtualenv: https://docs.pytest.org/en/latest/goodpractices.html#tox

Disregard the above directory comment, and then add pip install -e . to your travis.yml before running tests. This temporarily installs the module so that the test can import it.

shepherdjay commented 7 years ago

That seems to have worked. - The failure was a result of not grabbing the coverage reports which is separate issue i'll work on. Packaging is annoying.....

shepherdjay commented 7 years ago

It seems like the google's are mostly favoring tox instead of purely running py.test from Travis. I've never used Tox but will look into it.

codecov-io commented 7 years ago

Codecov Report

Merging #8 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #8   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         142     54   -88     
  Branches        9      8    -1     
=====================================
- Hits          142     54   -88
Impacted Files Coverage Δ
ipfromwebpage/ipfromwebpage.py 100% <ø> (ø)
ipfromwebpage/__init__.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update eb28e48...9285964. Read the comment docs.

shepherdjay commented 7 years ago

Recent commit fixed codecov ready to merge