ppannuto / python-titlecase

Python library to capitalize strings as specified by the New York Times Manual of Style
MIT License
244 stars 36 forks source link

Add GitHub Actions for comprehensive testing and modernise packaging #85

Closed brocksam closed 3 years ago

brocksam commented 3 years ago

This PR improves the use of GitHub Actions by Titlecase and modernises the packaging of Titlecase.

Regarding GitHub Actions, this PR adds (or improves) the workflows:

Regarding the package modernisation, this PR takes packaging recommendations inline with PEP 517/PEP 518, including:

This PR also:

Note to @ppannuto: for publish.yml to work, it is required that an API token for Titlecase on PyPI is created and added to this repository as a secret called "PYPI_TOKEN".

EDIT: an API token for Titlecase on Coveralls is also required. This must be added as a secret called "COVERALLS_TOKEN".

brocksam commented 3 years ago

I have also removed Python 3.4 and 3.5 as their end of life dates were 18th March 2019 and 13th September 2020 respectively.

brocksam commented 3 years ago

Waiting for further input from @fireundubh on issue #86 to try and resolve the test failures on Windows with Python 3.6 and 3.7 before this is taken further.

brocksam commented 3 years ago

This is ready to be merged (pending creation of the PyPI and Coveralls tokens as explained above) as I believe it will greatly help with the resolution of issue #86.

brocksam commented 3 years ago

Recommendation from @fireundubh on issue #86 implemented in https://github.com/ppannuto/python-titlecase/pull/85/commits/e7ca9fbbb519c8e2fafa6dcb3f0d7885b5ca313a. All tests now passing on Windows for all supported Python versions.

I suggest rerunning the coverage.yml workflow once the suggested tokens have been created and added to this repo as secrets before merging the PR to ensure that it's working correctly. Assuming that that is successful, this PR is now good to go.

ppannuto commented 3 years ago

Why is this so hard to configure coveralls? WIP status, got something uploading, but it seems to be an empty job: https://coveralls.io/jobs/82790913

brocksam commented 3 years ago

Sorry @ppannuto, I don't think I can help more specifically with the Coveralls stuff and I've not used it before. I only made the GitHub Actions workflow for it so that we could fully transfer over from Travis CI and did so just by using the Coveralls workflow docs.

ppannuto commented 3 years ago

No worries; maybe the answer is to abandon coveralls and move to something that more easily integrates with GH actions. I'm not attached to coveralls at all, just want something that generates a coverage report. Will try to look around lunchtime for a solution hopefully.

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@edaaec4). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage        ?   79.06%           
=======================================
  Files           ?        2           
  Lines           ?      215           
  Branches        ?        0           
=======================================
  Hits            ?      170           
  Misses          ?       45           
  Partials        ?        0           

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 edaaec4...300cf5e. Read the comment docs.