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

Implementing Coveralls #65

Merged
merged 17 commits into from
May 21, 2018
Merged

Implementing Coveralls #65

merged 17 commits into from
May 21, 2018

Conversation

AaronV77
Copy link
Collaborator

Adding Coveralls functionality.

@AaronV77 AaronV77 requested a review from sdc50 May 17, 2018 15:40
@AaronV77 AaronV77 self-assigned this May 17, 2018
@AaronV77 AaronV77 added the enhancement New feature or request label May 17, 2018
@AaronV77 AaronV77 added this to the Quest 2.6 Release milestone May 17, 2018
@AaronV77
Copy link
Collaborator Author

fixes #64

@AaronV77
Copy link
Collaborator Author

Found this helpful article when trying to use Coveralls: https://code-maven.com/coverall-with-python-minimal-setup

@dharhas
Copy link
Collaborator

dharhas commented May 17, 2018

You can also look at what I did for ulmo:

https://github.com/ulmo-dev/ulmo/blob/master/.travis.yml

# command to run tests
script:
  coverage run --source=ulmo setup.py test

# generate test coverage information
after_success:
  coveralls

and then add the badge to the readme file (rst format below, need to use markdown instead):

.. image:: https://coveralls.io/repos/ulmo-dev/ulmo/badge.svg?branch=master&service=github
        :target: https://coveralls.io/github/ulmo-dev/ulmo?branch=master

@AaronV77
Copy link
Collaborator Author

What does the badge do in the readme file? Also the application had a lot of the Coveralls stuff already implemented into it, but this is what we have right now:

script:

  • if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
    pytest test --cov=quest -s -vv --update-cache --test-download;
    else
    pytest test --cov=quest -s -vv;
    fi

and

after_success:
coveralls

Then I had to add coveralls to both the py2 and py3 environment files.

@dharhas
Copy link
Collaborator

dharhas commented May 17, 2018

@AaronV77 what you did is equivalent.

The badge displays the % coverage as an image. i.e.:

image

@AaronV77
Copy link
Collaborator Author

AaronV77 commented May 17, 2018

Oh DUH! Alright awesome, I will add that right now to the PR~! Thanks Dharhas! Where can I get the badge for quest, or can I just replace ulmo with quest?

@@ -11,8 +11,7 @@
from urllib.parse import quote, urlencode

from quest.util.log import logger
from quest.plugins import ProviderBase, TimePeriodServiceBase
from quest import util
from quest.plugins import ProviderBase, TimePeriodServiceBase, load_plugins

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E402 module level import not at top of file

test/data.py Outdated
@@ -414,8 +414,8 @@
SERVICE_FEATURE_DOWNLOAD_OPTIONS = [
# ('svc://nasa:srtm-3-arc-second/G1034711987-LPDAAC_ECS' , None),
# ('svc://nasa:srtm-30-arc-second/G1005651728-LPDAAC_ECS', None),
('svc://noaa-ncdc:ghcn-daily/ACW00011604', {'parameter': 'air_temperature:daily:total', 'start': '1949-01-01', 'end': '1949-01-02'}),
('svc://noaa-ncdc:gsod/717580-99999', {'parameter': 'air_temperature:daily:max', 'start': '2016-01-01', 'end': '2016-01-02'}),
# ('svc://noaa-ncdc:ghcn-daily/ACW00011604', {'parameter': 'air_temperature:daily:total', 'start': '1949-01-01', 'end': '1949-01-02'}),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (139 > 120 characters)

test/data.py Outdated
('svc://noaa-ncdc:ghcn-daily/ACW00011604', {'parameter': 'air_temperature:daily:total', 'start': '1949-01-01', 'end': '1949-01-02'}),
('svc://noaa-ncdc:gsod/717580-99999', {'parameter': 'air_temperature:daily:max', 'start': '2016-01-01', 'end': '2016-01-02'}),
# ('svc://noaa-ncdc:ghcn-daily/ACW00011604', {'parameter': 'air_temperature:daily:total', 'start': '1949-01-01', 'end': '1949-01-02'}),
# ('svc://noaa-ncdc:gsod/717580-99999', {'parameter': 'air_temperature:daily:max', 'start': '2016-01-01', 'end': '2016-01-02'}),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (132 > 120 characters)

@sdc50 sdc50 mentioned this pull request May 18, 2018
@AaronV77
Copy link
Collaborator Author

fixes #14

@sdc50 sdc50 merged commit 26de89a into erdc:master May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants