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

Update metadata #207

Merged
merged 14 commits into from
Dec 11, 2023
Merged

Update metadata #207

merged 14 commits into from
Dec 11, 2023

Conversation

trevorb1
Copy link
Member

@trevorb1 trevorb1 commented Dec 7, 2023

Description

In this PR I update the following docs:

  • The .zenodo.json to match JOSS requirements
  • The changelog

@trevorb1
Copy link
Member Author

trevorb1 commented Dec 8, 2023

ugh. I dont know what is up with coveralls right now, but will come back to this tomorrow or on monday. Using the existing action, I get the following traceback error only on the pull_request action.

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/coveralls/cli.py", line 95, in main
    result = coverallz.wear()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/coveralls/api.py", line 257, in wear
    return self.submit_report(json_string)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/coveralls/api.py", line 293, in submit_report
    raise CoverallsException(
coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs

Using the Coveralls GitHub Action I get the following error. Coveralls can find the coverage file, but just wont upload it.

Run coveralls report --debug       
  coveralls report --debug       
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
    COVERALLS_DEBUG: true
    COVERALLS_CARRYFORWARD_FLAGS: 
    COVERALLS_FLAG_NAME: 
    COVERALLS_PARALLEL: 
    COVERALLS_ENDPOINT: https://coveralls.io/
    COVERALLS_GIT_BRANCH: 
    COVERALLS_GIT_COMMIT: 
    COVERALLS_REPO_TOKEN: ***
    COVERALLS_COMPARE_REF: 
    COVERALLS_COMPARE_SHA: 
    COVERALLS_SOURCE_HEADER: github-action
 
⠀⠀⠀⠀⠀⠀⣿
⠀⠀⠀⠀⠀⣼⣿⣧⠀⠀⠀⠀⠀⠀⠀ ⣠⣶⣾⣿⡇⢀⣴⣾⣿⣷⣆ ⣿⣿⠀⣰⣿⡟⢸⣿⣿⣿⡇ ⣿⣿⣿⣷⣦⠀⠀⢠⣿⣿⣿⠀⠀⣿⣿⠁⠀⣼⣿⡇⠀⢀⣴⣾⣿⡷
⠶⣶⣶⣶⣾⣿⣿⣿⣷⣶⣶⣶⠶  ⣸⣿⡟ ⠀⢠⣿⣿⠃⠈⣿⣿⠀⣿⣿⢠⣿⡿⠀⣿⣿⣧⣤⠀⢸⣿⡇⣠⣿⡿⠀⢠⣿⡟⣿⣿⠀⢸⣿⡿⠀⠀⣿⣿⠃⠀⢸⣿⣧⣄
⠀⠀⠙⢻⣿⣿⣿⣿⣿⡟⠋⠁⠀⠀ ⣿⣿⡇⠀ ⢸⣿⣿⠀⣸⣿⡟⠀⣿⣿⣾⡿⠁ ⣿⣿⠛⠛⠀⣿⣿⢿⣿⣏⠀⢀⣿⣿⣁⣿⣿⠀⣾⣿⡇⠀⢸⣿⡿⠀⠀⡀⠙⣿⣿⡆
⠀⠀⢠⣿⣿⣿⠿⣿⣿⣿⡄⠀⠀⠀ ⠙⢿⣿⣿⠇⠈⠿⣿⣿⡿⠋⠀⠀⢿⣿⡿⠁⠀⢸⣿⣿⣿⡇⢸⣿⣿⠀⣿⣿⣄⣾⣿⠛⠛⣿⣿⢠⣿⣿⣿ ⣼⣿⣿⣿ ⣿⣿⡿⠋⠀
⠀⢀⣾⠟⠋⠀⠀⠀⠙⠻⣷⡀⠀⠀
 
  v0.6.6

🔍 Detected coverage file: .coverage
☝️ Detected coverage format: python - .coverage
⏱️ Report parsing: 00:00:00.016743520
🚨 Nothing to report
Error: Process completed with exit code 1.

@willu47
Copy link
Member

willu47 commented Dec 8, 2023

We don't need to post coverage from each of the CI workflows - I suggest constraining coverage to only the one of the ubuntu python versions. That should speed up the workflows a little as well.

@willu47
Copy link
Member

willu47 commented Dec 8, 2023

Some hints:

The action's step needs to run after your test suite has outputted an LCOV file. Most major test runners can be configured to do so; if you're using Node, see more info here.

See pytest plugin pytest-cov documentation

You probably need to update the options for pytest in either the tox.ini config file or the setup.cfg file in the root directory

@trevorb1
Copy link
Member Author

Thanks for the note, @willu47. What I ended up doing was just putting the following conditional in the action. This way, tests are run for all versions but coverage is only uploaded for the one specific python version on ubuntu.

- name: Upload coverage data to converalls.io
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
  run: |
    pip install --upgrade coveralls
    coveralls --service=github

Then, if you check non-ubuntu python 3.11 actions, you can see that this step is skipped.

image

image

@trevorb1
Copy link
Member Author

Researching this, I guess we should switch to using the official Coveralls Action, as this is the recommended way by Coveralls. I will probably just create a new issue ticket for this tho, as getting Coveralls set up is a little outside the scope of this issue.

@trevorb1
Copy link
Member Author

For the time being, since the action is now working, I am going to merge this to wrap everything up for the JOSS review. If you have any concerns/feedback on this solution @willu47, please leave them in issue #208. Thanks! :)

@trevorb1 trevorb1 merged commit 96dab31 into master Dec 11, 2023
14 checks passed
@trevorb1 trevorb1 deleted the update-metadata branch December 29, 2023 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants