FM-17 / poglink

A bot that integrates the ARK Web API with Discord.
MIT License
12 stars 4 forks source link

travis test coverage #57

Closed travipross closed 2 years ago

travipross commented 2 years ago

Added some tests to improve coverage. Omitted some code from coverage reports where it seemed unreasonable to need to test them.

Commit summary:

codecov[bot] commented 2 years ago

Codecov Report

Merging #57 (79400e7) into main (1e610d0) will increase coverage by 19.77%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #57       +/-   ##
===========================================
+ Coverage   73.13%   92.90%   +19.77%     
===========================================
  Files          13       10        -3     
  Lines         510      409      -101     
===========================================
+ Hits          373      380        +7     
+ Misses        137       29      -108     
Impacted Files Coverage Δ
poglink/cogs/rates.py 98.05% <100.00%> (+22.22%) :arrow_up:
poglink/cogs/test.py
poglink/main.py
poglink/__init__.py
poglink/bot.py 100.00% <0.00%> (+8.92%) :arrow_up:

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 1e610d0...79400e7. Read the comment docs.

travipross commented 2 years ago

Also note: The python release may be currently failing, not the tests. Just because the dev version number is already taken by another opern branch (I'm guessing because #35 is still hanging around)

EDIT:

The commit before last was failing when I wrote this. Pushing another commit resolved the issue. And to elaborate, it's because setuptools_scm will automatically assign a version number which is based on the number of commits since the last known tag, plus some has of the latest commit (in case there are multiple branches that have the same commit distance from the last tag). Like poglink==0.8.1.dev3+ga3efdb.

But PyPi doesn't allow/understand version numbers with + chars, so in the CI I have to strip it from the version number. This introduces the possibility of multiple branches building a dev package for PyPi which shares the same version number, and PyPi rejects it; failing the publish job.

travipross commented 2 years ago

Also note: The python release may be currently failing, not the tests. Just because the dev version number is already taken by another opern branch (I'm guessing because #35 is still hanging around)

EDIT:

The commit before last was failing when I wrote this. Pushing another commit resolved the issue. And to elaborate, it's because setuptools_scm will automatically assign a version number which is based on the number of commits since the last known tag, plus some has of the latest commit (in case there are multiple branches that have the same commit distance from the last tag). Like poglink==0.8.1.dev3+ga3efdb.

But PyPi doesn't allow/understand version numbers with + chars, so in the CI I have to strip it from the version number. This introduces the possibility of multiple branches building a dev package for PyPi which shares the same version number, and PyPi rejects it; failing the publish job.

59

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 0.8.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: