ebrithiljonas / fittrackee-uploader

A companion application for FitTrackee to upload your workout files
GNU Affero General Public License v3.0
13 stars 4 forks source link

Slackline/10 pre commit lint #12

Closed slackline closed 3 months ago

slackline commented 3 months ago

Hi @ebrithiljonas

I've setup the repository with a bunch of pre-commit hooks that lint and check the code and have been going through addressing many of the issues. Not complete yet but I go on holiday in a couple of days and wanted to get this out to you before hand.

There aren't any unit tests in place to check each of the modifications I've made but the UI still appears to run ok and it uploads tracks to my instance :slightly_smiling_face:

I've started adding numpydoc style typestrings and a smattering of Typehints but haven't applied any type checking such as mypy yet.

Part of my aim with this is to get the codebase following things like PEP8 and the NumpyDoc along with adding an entry point (which may require a bit of re-organising) so that a package can be released to PyPI.

I've used .git-blame-ignore-revs to hopefully ensure that the blame associated with these changes is ignored.

Let me know what you think.

Cheers,

@slackline

slackline commented 3 months ago

Hi @ebrithiljonas ,

The vast majority of changes so far are to get the code compliant with PEP8 as well as adding skeleton Numpydoc strings.

I'll continue to work on things as my time permits as there are still lots of minor changes to be made such as replacing many of the os.* calls with the newer (and better) pathlib (see Why you should be using pathlib and No really, pathlib is great).

I'll go ahead and merge this now though (and hopefully I won't have broken anything, as I say it worked with my local instance for fittrackee and I could still upload GPX tracks).