rowingdata 3.8.3__tar.gz → 3.8.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rowingdata-3.8.3/rowingdata.egg-info → rowingdata-3.8.5}/PKG-INFO +2 -1
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/data/fit_export_spec.json +4 -4
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/fitwrite.py +72 -20
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/fitwrite_spec.py +2 -2
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/rowingdata.py +1 -1
- {rowingdata-3.8.3 → rowingdata-3.8.5/rowingdata.egg-info}/PKG-INFO +2 -1
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata.egg-info/requires.txt +1 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/setup.py +1 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/tests/test_fit_standard.py +104 -7
- {rowingdata-3.8.3 → rowingdata-3.8.5}/tests/test_rowingdata.py +2 -2
- {rowingdata-3.8.3 → rowingdata-3.8.5}/LICENSE +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/MANIFEST.in +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/README.rst +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/bin/crewnerddata.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/bin/crewnerddata.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/bin/testdata.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/.buildinfo +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/2x20min.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/editrower.JPG +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/greghoc.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/image001.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/otwlogbook.JPG +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/otwscreenshot.JPG +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/screenshot.JPG +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/screenshotlogbook.JPG +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_images/woensdag.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_sources/index.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_sources/modules.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_sources/rowingdata.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/ajax-loader.gif +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/alabaster.css +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/basic.css +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/comment-bright.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/comment-close.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/comment.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/custom.css +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/doctools.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/down-pressed.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/down.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/file.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/jquery-1.11.1.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/jquery.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/minus.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/plus.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/pygments.css +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/searchtools.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/underscore-1.3.1.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/underscore.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/up-pressed.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/up.png +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/_static/websupport.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/genindex.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/index.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/modules.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/objects.inv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/py-modindex.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/rowingdata.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/search.html +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/docs/_build/html/searchindex.js +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/__init__.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/__main__.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/boatedit.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/checkdatafiles.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/copystats.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/crewnerdplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/crewnerdplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/csvparsers.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergdataplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergdataplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergdatatotcx.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergstickplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergstickplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/ergsticktotcx.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/fit_garmin_bridge.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/fit_transcode.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/gpxtools.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/gpxwrite.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/konkatenaadje.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/laptesting.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/obsolete.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/otherparsers.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsled_desktop_plot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsled_desktop_plottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsled_desktop_toc2.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsledplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsledplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/painsledtoc2.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/roweredit.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/rowproplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/rowproplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/speedcoachplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/speedcoachplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/speedcoachtoc2.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxplot.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxplot_nogeo.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxplottime.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxplottime_nogeo.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxtoc2.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/tcxtools.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/trainingparser.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/utils.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/windcorrected.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata/writetcx.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata.egg-info/SOURCES.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata.egg-info/dependency_links.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata.egg-info/not-zip-safe +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/rowingdata.egg-info/top_level.txt +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/setup.cfg +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/2016-03-25-0758.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/2016-03-25-0758_data.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/2x20min_o.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/2x2km.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/3km_cd_o.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/3x250m.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/EUBoatCoach.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/EmpowerSpeedCoachForce.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/NKEmporfromgreg.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/NKLiNKv130.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/NoHR.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/PainsledForce.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/RP_interval.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/RP_interval.csv_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/RP_testdata.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpdCoach2_imp_inconsistent.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpdCoachAmbiguous.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpeedCoach GPS Workout.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpeedCoach2Link_interval.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpeedCoach2Linkv1.27.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/SpeedCoach2v2.12.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/Speedcoach2example.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/aritmo.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/bc1.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/bc2.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/bc3.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/boatcoach.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/boatcoach_fixed_distance.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/boatcoach_otw.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/correctedpainsled.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/cottwich.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/coxmate.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/crewnerd_interval.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/crewnerddata.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/crewnerddata.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/crewnerddata_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/cumvalues.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergdata_example.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergdata_example.csv_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergstick.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergstick.csv_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergstick2.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ergstick_o.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/example.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/example_data.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/faketcx.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/float.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/herodata.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/humon.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/impeller_empower.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/invalidchar.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/kinomap.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/mystery.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/nk_logbook.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/painsled.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/painsled_desktop_example.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/painsled_out_data.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/painsled_to_csv_20160221-105218_erg-400150318_760465m.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/quiske_per_stroke_left.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/quiske_per_stroke_new.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/quiske_per_stroke_right.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/quiske_per_stroke_seat.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/recover.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/ritmointervals.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowingdata_eth.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowinginmotionexample.TCX +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowinginmotionexample.TCX_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowperfect.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowpro5.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rowpro_carrick.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rp3_curve.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rp3intervals.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rp3intervals2.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/rp_out.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/smartrow.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/smartrow_intervals.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/spdcoach2noheader.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/speedcoach2test2.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/speedcoach3test3.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/speedcoachexample.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/speedcoachexample.csv_o.CSV +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/strava_export.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/summarytest.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testdata.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testdata_part1.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testdata_part2.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testdatasummary.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testlapidx.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testtcs_210614.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testtcx.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/testtcx_210614.tcx +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata/tim.csv +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/testdata//345/210/222/350/210/271.csv" +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/tests/test_fit_instroke_export.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/tests/test_fit_transcode.py +0 -0
- {rowingdata-3.8.3 → rowingdata-3.8.5}/tests/testparser.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rowingdata
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.5
|
|
4
4
|
Summary: The rowingdata library to create colorful plots from CrewNerd, Painsled and other rowing data tools
|
|
5
5
|
Home-page: https://github.com/sanderroosendaal/rowingdata
|
|
6
6
|
Author: Sander Roosendaal
|
|
@@ -18,6 +18,7 @@ Requires-Dist: fitparse
|
|
|
18
18
|
Requires-Dist: fit-tool>=0.9.14
|
|
19
19
|
Requires-Dist: arrow>=1.0.2
|
|
20
20
|
Requires-Dist: python-dateutil
|
|
21
|
+
Requires-Dist: six
|
|
21
22
|
Requires-Dist: docopt
|
|
22
23
|
Requires-Dist: tqdm
|
|
23
24
|
Requires-Dist: rowingphysics>=0.2.3
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 5,
|
|
3
3
|
"protocol_version": 1,
|
|
4
4
|
"handle_force_curve_field_id": 60,
|
|
5
|
-
"_comment": "Authoritative FIT developer field definitions for rowingdata fitwrite. Field IDs, scales and units must match the Rowing Data Standard registry at https://github.com/Rowing-Industry-Trade-Association/rowing-data-standard (registry/field-ids.md); that repository is the source of truth, this file is only rowingdata's machine-readable copy of the subset it emits. v2: mm precision for DriveLength/PeakForcePositionAbs (scale 1000); StrokeRate dev field (93); instroke curve Y-scale registry. v4: main of 2026-10-31: AverageBoatSpeed scale 100; EffectiveLength -> EffectiveArc (deg, scale 10; 16, 210, 211); force fields named without the N suffix. v3: standard draft 0.1: WorkoutState holds FIT intensity values; StrokeState (96); SlipThreshold/WashThreshold (94/95); HandleForceCurve fixed at 60; fields 4, 5 and 93 are not in the standard and are read-only (group legacy).",
|
|
5
|
+
"_comment": "Authoritative FIT developer field definitions for rowingdata fitwrite. Field IDs, scales and units must match the Rowing Data Standard registry at https://github.com/Rowing-Industry-Trade-Association/rowing-data-standard (registry/field-ids.md); that repository is the source of truth, this file is only rowingdata's machine-readable copy of the subset it emits. v2: mm precision for DriveLength/PeakForcePositionAbs (scale 1000); StrokeRate dev field (93); instroke curve Y-scale registry. v5: main of 2026-11-05: record field 9 (WorkoutState) was removed from the standard and its ID is reserved, so it is read-only here (group legacy) and never written; always_emit_field_ids is empty (axis fields 90-92 are only written with curve data and never as UNKNOWN). v4: main of 2026-10-31: AverageBoatSpeed scale 100; EffectiveLength -> EffectiveArc (deg, scale 10; 16, 210, 211); force fields named without the N suffix. v3: standard draft 0.1: WorkoutState holds FIT intensity values; StrokeState (96); SlipThreshold/WashThreshold (94/95); HandleForceCurve fixed at 60; fields 4, 5 and 93 are not in the standard and are read-only (group legacy).",
|
|
6
6
|
"instroke_dynamic": {
|
|
7
7
|
"summary_start": 20,
|
|
8
8
|
"summary_id_padding": "ceil_to_10",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"NORMALIZED_DRIVE_0_1": 4
|
|
39
39
|
},
|
|
40
40
|
"instroke_axis_field_ids": [90, 91, 92],
|
|
41
|
-
"always_emit_field_ids": [
|
|
41
|
+
"always_emit_field_ids": [],
|
|
42
42
|
"instroke_column_map": {
|
|
43
43
|
"curve_data": "HandleForceCurve",
|
|
44
44
|
"boat accelerator curve": "BoatAcceleratorCurve",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
{"field_id": 6, "group": "rowing", "fit_name": "AverageDriveForce", "base_type": "UINT16", "size": 2, "scale": 10, "units": "N", "df_columns": [" AverageDriveForce (N)"]},
|
|
56
56
|
{"field_id": 7, "group": "rowing", "fit_name": "PeakDriveForce", "base_type": "UINT16", "size": 2, "scale": 10, "units": "N", "df_columns": [" PeakDriveForce (N)"]},
|
|
57
57
|
{"field_id": 8, "group": "rowing", "fit_name": "AverageBoatSpeed", "base_type": "UINT16", "size": 2, "scale": 100, "units": "m/s", "df_columns": [" AverageBoatSpeed (m/s)"]},
|
|
58
|
-
{"field_id": 9, "group": "
|
|
58
|
+
{"field_id": 9, "group": "legacy", "fit_name": "WorkoutState", "base_type": "UINT8", "size": 1, "scale": 1, "units": "", "df_columns": [" WorkoutState"]},
|
|
59
59
|
{"field_id": 10, "group": "metadata", "fit_name": "RecordingStrategy", "base_type": "UINT8", "size": 1, "scale": 1, "units": "", "df_columns": [], "message_type": "session"},
|
|
60
60
|
{"field_id": 94, "group": "metadata", "fit_name": "SlipThreshold", "base_type": "UINT16", "size": 2, "scale": 1, "units": "N", "df_columns": [], "message_type": "session"},
|
|
61
61
|
{"field_id": 95, "group": "metadata", "fit_name": "WashThreshold", "base_type": "UINT16", "size": 2, "scale": 1, "units": "N", "df_columns": [], "message_type": "session"},
|
|
@@ -10,6 +10,7 @@ import datetime
|
|
|
10
10
|
import json
|
|
11
11
|
import os
|
|
12
12
|
import uuid
|
|
13
|
+
import warnings
|
|
13
14
|
import numpy as np
|
|
14
15
|
import pandas as pd
|
|
15
16
|
from dateutil import parser as ps
|
|
@@ -69,8 +70,10 @@ WASH_THRESHOLD_FIELD_ID = 95
|
|
|
69
70
|
STROKE_STATE_FIELD_ID = 96
|
|
70
71
|
HANDLE_FORCE_CURVE_FIELD_ID = int(_FIT_EXPORT_RAW.get('handle_force_curve_field_id', 60))
|
|
71
72
|
HANDLE_FORCE_CURVE_NAME = 'HandleForceCurve'
|
|
73
|
+
INSTROKE_AXIS_FIELD_IDS = frozenset((90, 91, 92))
|
|
72
74
|
|
|
73
|
-
#
|
|
75
|
+
# Values of the native FIT ``intensity`` enum, set on every Lap (standard §4.1).
|
|
76
|
+
# (Record field 9, WorkoutState, was removed from the standard; it is never written.)
|
|
74
77
|
INTENSITY_ACTIVE = 0
|
|
75
78
|
INTENSITY_REST = 1
|
|
76
79
|
INTENSITY_WARMUP = 2
|
|
@@ -334,7 +337,9 @@ def _default_instroke_abscissa_type(df, curve_canonical_names):
|
|
|
334
337
|
def _compute_instroke_axis_arrays(df, n_points, instroke_abscissa_type, instroke_sample_interval_ms):
|
|
335
338
|
"""
|
|
336
339
|
Per-record arrays for InstrokeAbscissaType (90), InstrokeSampleInterval (91), InstrokePointCount (92).
|
|
337
|
-
Returns None if n_points < 2
|
|
340
|
+
Returns None if n_points < 2, if the abscissa type is UNKNOWN, or if the sample
|
|
341
|
+
interval cannot be determined: producers MUST NOT write type 0 (standard §6.3) and
|
|
342
|
+
must not write a placeholder interval (§7.2). The caller then leaves the curve out.
|
|
338
343
|
"""
|
|
339
344
|
nr = len(df)
|
|
340
345
|
if n_points < 2:
|
|
@@ -344,6 +349,8 @@ def _compute_instroke_axis_arrays(df, n_points, instroke_abscissa_type, instroke
|
|
|
344
349
|
else:
|
|
345
350
|
atype = (INSTROKE_ABSCISSA_TIME_UNIFORM_MS if ' DriveTime (ms)' in df.columns
|
|
346
351
|
else INSTROKE_ABSCISSA_UNKNOWN)
|
|
352
|
+
if atype == INSTROKE_ABSCISSA_UNKNOWN:
|
|
353
|
+
return None
|
|
347
354
|
if instroke_sample_interval_ms is not None:
|
|
348
355
|
if np.isscalar(instroke_sample_interval_ms):
|
|
349
356
|
interval = np.full(nr, float(instroke_sample_interval_ms))
|
|
@@ -362,7 +369,7 @@ def _compute_instroke_axis_arrays(df, n_points, instroke_abscissa_type, instroke
|
|
|
362
369
|
interval = np.round(drive_ms / np.maximum(n_points - 1, 1))
|
|
363
370
|
interval = np.clip(interval, 0, UINT16_MAX_VALID)
|
|
364
371
|
else:
|
|
365
|
-
|
|
372
|
+
return None # no way to derive the spacing: do not write a placeholder
|
|
366
373
|
pc = np.full(nr, float(min(int(n_points), 127)))
|
|
367
374
|
ta = np.full(nr, float(atype))
|
|
368
375
|
return ta, interval, pc
|
|
@@ -761,6 +768,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
761
768
|
dev_specs = []
|
|
762
769
|
DEV_DATA_IDX = 0
|
|
763
770
|
instroke_private_field_ids = set()
|
|
771
|
+
axis_row_ok = None # per row: the curve's X-axis is fully known (§6.3)
|
|
764
772
|
|
|
765
773
|
def _dev_index_for(field_id):
|
|
766
774
|
"""Developer data index: private namespace for unallocated curve IDs."""
|
|
@@ -784,8 +792,6 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
784
792
|
if col is not None:
|
|
785
793
|
arr = df[col].values
|
|
786
794
|
arr = _values_for_fit_field(arr, units, scale, base_type)
|
|
787
|
-
if field_id == 9:
|
|
788
|
-
arr = _workout_state_to_intensity(arr)
|
|
789
795
|
dev_arrays[field_id] = arr
|
|
790
796
|
dev_specs.append((field_id, col, name, base_type, size, scale, units))
|
|
791
797
|
for fd in OARLOCK_DEV_FIELDS:
|
|
@@ -809,6 +815,24 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
809
815
|
arr = _values_for_fit_field(arr, units, scale, base_type)
|
|
810
816
|
dev_arrays[field_id] = arr
|
|
811
817
|
dev_specs.append((field_id, col, name, base_type, size, scale, units))
|
|
818
|
+
# Standard §5.3: with per-side fields present, summary fields 11-16 SHOULD
|
|
819
|
+
# carry the port/starboard average. A side reading 0 counts as missing, so
|
|
820
|
+
# the other side's value is used (§5.3, "when only one side is available").
|
|
821
|
+
_summary_by_name = {fd[2]: fd for fd in OARLOCK_DEV_FIELDS}
|
|
822
|
+
for _pair_key, port_fd, starboard_fd in OARLOCK_DUAL_PAIRS:
|
|
823
|
+
summary_fd = _summary_by_name.get(port_fd[2][:-len('Port')])
|
|
824
|
+
if summary_fd is None or port_fd[0] not in dev_arrays or starboard_fd[0] not in dev_arrays:
|
|
825
|
+
continue
|
|
826
|
+
port_arr = np.asarray(dev_arrays[port_fd[0]], dtype=np.float64)
|
|
827
|
+
star_arr = np.asarray(dev_arrays[starboard_fd[0]], dtype=np.float64)
|
|
828
|
+
averaged = np.where(
|
|
829
|
+
port_arr == 0, star_arr,
|
|
830
|
+
np.where(star_arr == 0, port_arr, (port_arr + star_arr) / 2.0))
|
|
831
|
+
summary_id = summary_fd[0]
|
|
832
|
+
if summary_id not in dev_arrays:
|
|
833
|
+
dev_specs.append((summary_id, port_fd[1][0], summary_fd[2], summary_fd[3],
|
|
834
|
+
summary_fd[4], summary_fd[5], summary_fd[6]))
|
|
835
|
+
dev_arrays[summary_id] = averaged
|
|
812
836
|
for fd in PEAK_POSITION_DEV_FIELDS:
|
|
813
837
|
field_id, possible_cols, name, base_type, size, scale, units, transformer, clip_max = fd
|
|
814
838
|
col = next((c for c in possible_cols if c in df.columns), None)
|
|
@@ -903,6 +927,7 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
903
927
|
nmax = max(nmax, np_)
|
|
904
928
|
except (ValueError, KeyError, TypeError):
|
|
905
929
|
pass
|
|
930
|
+
axis_tuples = None
|
|
906
931
|
if nmax >= 2:
|
|
907
932
|
axis_abscissa = instroke_abscissa_type
|
|
908
933
|
if axis_abscissa is None:
|
|
@@ -910,19 +935,34 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
910
935
|
axis_abscissa = _default_instroke_abscissa_type(df, canonicals)
|
|
911
936
|
axis_tuples = _compute_instroke_axis_arrays(
|
|
912
937
|
df, nmax, axis_abscissa, instroke_sample_interval_ms)
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
938
|
+
if axis_tuples is None:
|
|
939
|
+
# A curve without a declared X-axis is not conforming (§6.3): leave it
|
|
940
|
+
# out of the FIT file (it can still go in the companion JSON file).
|
|
941
|
+
warnings.warn(
|
|
942
|
+
'In-stroke force curve not written to the FIT file: the X-axis '
|
|
943
|
+
'(InstrokeAbscissaType / InstrokeSampleInterval) cannot be determined. '
|
|
944
|
+
'Pass instroke_abscissa_type and instroke_sample_interval_ms, or provide '
|
|
945
|
+
"' DriveTime (ms)' or ' DriveLength (meters)'.",
|
|
946
|
+
UserWarning, stacklevel=2)
|
|
947
|
+
for curve_id in instroke_downsampled_arrays.values():
|
|
948
|
+
dev_arrays.pop(curve_id, None)
|
|
949
|
+
curve_ids = set(instroke_downsampled_arrays.values())
|
|
950
|
+
dev_specs[:] = [d for d in dev_specs if d[0] not in curve_ids]
|
|
951
|
+
instroke_downsampled_arrays.clear()
|
|
952
|
+
else:
|
|
953
|
+
ta, interval, pc = axis_tuples
|
|
954
|
+
axis_row_ok = np.nan_to_num(np.asarray(interval, dtype=np.float64)) > 0
|
|
955
|
+
axis_arrays = [ta, interval, pc]
|
|
956
|
+
for axis_row, arr in zip(
|
|
957
|
+
fitwrite_spec.load_fit_spec()['INSTROKE_AXIS_DEV_FIELDS'], axis_arrays):
|
|
958
|
+
fid, name, bt, size, scale, units = axis_row
|
|
959
|
+
arr = np.nan_to_num(arr, nan=0.0, posinf=0.0, neginf=0.0)
|
|
960
|
+
if bt == BaseType.UINT8:
|
|
961
|
+
arr = np.clip(arr, 0, UINT8_MAX_VALID)
|
|
962
|
+
elif bt == BaseType.UINT16:
|
|
963
|
+
arr = np.clip(arr, 0, UINT16_MAX_VALID)
|
|
964
|
+
dev_arrays[fid] = arr
|
|
965
|
+
dev_specs.append((fid, '_instroke_axis', name, bt, size, scale, units))
|
|
926
966
|
|
|
927
967
|
# Build FIT file
|
|
928
968
|
min_str = 50 if dev_specs else 8
|
|
@@ -1080,8 +1120,9 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
1080
1120
|
elif lap_col is not None:
|
|
1081
1121
|
work_mask = np.ones(nr_rows, dtype=bool)
|
|
1082
1122
|
|
|
1083
|
-
# Laps follow lapIdx and are split wherever the intensity changes, so
|
|
1084
|
-
#
|
|
1123
|
+
# Laps follow lapIdx and are also split wherever the intensity changes, so each
|
|
1124
|
+
# Lap's native ``intensity`` describes all of its records. (The standard allows
|
|
1125
|
+
# a Lap to contain pauses; this is a choice, not a requirement, §4.1.)
|
|
1085
1126
|
lap_values = df[lap_col].values if lap_col is not None else np.zeros(nr_rows, dtype=int)
|
|
1086
1127
|
changed = np.zeros(nr_rows, dtype=bool)
|
|
1087
1128
|
if nr_rows > 1:
|
|
@@ -1095,6 +1136,14 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
1095
1136
|
work_mask, intensity_arr
|
|
1096
1137
|
)
|
|
1097
1138
|
|
|
1139
|
+
def _curve_in_row(i):
|
|
1140
|
+
# A curve is written only where its X-axis is fully known: a Record without
|
|
1141
|
+
# a sample interval (e.g. no drive time) carries neither curve nor axis fields.
|
|
1142
|
+
curve = dev_arrays.get(HANDLE_FORCE_CURVE_FIELD_ID)
|
|
1143
|
+
if curve is None or curve.ndim != 2 or not np.any(np.nan_to_num(curve[i]) != 0):
|
|
1144
|
+
return False
|
|
1145
|
+
return axis_row_ok is None or bool(axis_row_ok[i])
|
|
1146
|
+
|
|
1098
1147
|
def _emit_record(i):
|
|
1099
1148
|
"""Emit a single Record message for row index i."""
|
|
1100
1149
|
dev_fields = []
|
|
@@ -1102,6 +1151,9 @@ def write_fit(file_name, df, row_date="2016-01-01", notes="Exported by Rowingdat
|
|
|
1102
1151
|
for field_id, col, name, base_type, size, scale, units in dev_specs:
|
|
1103
1152
|
if field_id not in dev_arrays:
|
|
1104
1153
|
continue
|
|
1154
|
+
if (field_id in INSTROKE_AXIS_FIELD_IDS
|
|
1155
|
+
or field_id == HANDLE_FORCE_CURVE_FIELD_ID) and not _curve_in_row(i):
|
|
1156
|
+
continue # curve and axis metadata go together, or not at all (§6.3)
|
|
1105
1157
|
arr = dev_arrays[field_id]
|
|
1106
1158
|
is_array_field = (base_type == BaseType.UINT16 and size > 2)
|
|
1107
1159
|
if is_array_field and arr.ndim == 2:
|
|
@@ -78,9 +78,9 @@ def load_fit_spec_raw():
|
|
|
78
78
|
|
|
79
79
|
def _validate_spec(raw):
|
|
80
80
|
version = raw.get('version', 0)
|
|
81
|
-
if version not in (1, 2, 3, 4):
|
|
81
|
+
if version not in (1, 2, 3, 4, 5):
|
|
82
82
|
warnings.warn(
|
|
83
|
-
'fit_export_spec.json version %s may be unsupported (expected 1, 2, 3 or
|
|
83
|
+
'fit_export_spec.json version %s may be unsupported (expected 1, 2, 3, 4 or 5)' % version,
|
|
84
84
|
UserWarning,
|
|
85
85
|
stacklevel=2,
|
|
86
86
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rowingdata
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.5
|
|
4
4
|
Summary: The rowingdata library to create colorful plots from CrewNerd, Painsled and other rowing data tools
|
|
5
5
|
Home-page: https://github.com/sanderroosendaal/rowingdata
|
|
6
6
|
Author: Sander Roosendaal
|
|
@@ -18,6 +18,7 @@ Requires-Dist: fitparse
|
|
|
18
18
|
Requires-Dist: fit-tool>=0.9.14
|
|
19
19
|
Requires-Dist: arrow>=1.0.2
|
|
20
20
|
Requires-Dist: python-dateutil
|
|
21
|
+
Requires-Dist: six
|
|
21
22
|
Requires-Dist: docopt
|
|
22
23
|
Requires-Dist: tqdm
|
|
23
24
|
Requires-Dist: rowingphysics>=0.2.3
|
|
@@ -168,15 +168,56 @@ class TestStandardEncoding(unittest.TestCase):
|
|
|
168
168
|
]
|
|
169
169
|
assert versions == [1]
|
|
170
170
|
|
|
171
|
-
def
|
|
171
|
+
def test_workout_state_field_9_is_never_written(self):
|
|
172
|
+
"""Field 9 was removed from the standard; intensity lives on the Lap only."""
|
|
172
173
|
df = _sample_df()
|
|
173
174
|
df[' WorkoutState'] = [1, 3, 5] # rowing, interval rest, interval work
|
|
174
175
|
fit = self._write(df=df)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
assert
|
|
176
|
+
assert 9 not in _descriptions(fit)
|
|
177
|
+
for r in fit.get_messages('record'):
|
|
178
|
+
assert _record_field(r, 'WorkoutState') is None
|
|
179
|
+
laps = list(fit.get_messages('lap'))
|
|
180
|
+
assert [lap.get_value('intensity') for lap in laps] == ['active', 'rest', 5] # 5 = interval
|
|
181
|
+
|
|
182
|
+
def test_unknown_abscissa_curve_is_not_written(self):
|
|
183
|
+
"""InstrokeAbscissaType 0 must never be written (§6.3): the curve is left out."""
|
|
184
|
+
import warnings
|
|
185
|
+
df = _sample_df(curve=True).drop(columns=[' DriveTime (ms)', ' DriveLength (meters)'])
|
|
186
|
+
with warnings.catch_warnings(record=True) as caught:
|
|
187
|
+
warnings.simplefilter('always')
|
|
188
|
+
fit = self._write(df=df, instroke_export='downsampled')
|
|
189
|
+
assert any('X-axis' in str(w.message) for w in caught)
|
|
190
|
+
descriptions = _descriptions(fit)
|
|
191
|
+
for field_id in (60, 90, 91, 92):
|
|
192
|
+
assert field_id not in descriptions
|
|
193
|
+
|
|
194
|
+
def test_abscissa_fields_only_with_curve_data(self):
|
|
195
|
+
df = _sample_df(curve=True)
|
|
196
|
+
df.loc[1, 'curve_data'] = None
|
|
197
|
+
fit = self._write(df=df, instroke_export='downsampled')
|
|
198
|
+
for r, has_curve in zip(fit.get_messages('record'), (True, False, True)):
|
|
199
|
+
assert (_record_field(r, 'InstrokeAbscissaType') is not None) == has_curve
|
|
200
|
+
if has_curve:
|
|
201
|
+
assert _record_field(r, 'InstrokeAbscissaType').raw_value != 0
|
|
202
|
+
|
|
203
|
+
def test_curve_without_known_interval_is_dropped_with_its_axis(self):
|
|
204
|
+
"""A Record whose sample interval is unknown carries no curve and no axis (§6.3)."""
|
|
205
|
+
df = _sample_df(curve=True)
|
|
206
|
+
df.loc[1, ' DriveLength (meters)'] = 0 # interval cannot be derived for this stroke
|
|
207
|
+
fit = self._write(df=df, instroke_export='downsampled')
|
|
208
|
+
for r, expected in zip(fit.get_messages('record'), (True, False, True)):
|
|
209
|
+
names = {f.name for f in r}
|
|
210
|
+
for name in ('HandleForceCurve', 'InstrokeAbscissaType',
|
|
211
|
+
'InstrokeSampleInterval', 'InstrokePointCount'):
|
|
212
|
+
assert (name in names) == expected, name
|
|
213
|
+
|
|
214
|
+
def test_dual_oarlock_summary_is_side_average(self):
|
|
215
|
+
df = _sample_df(dual_oarlock=True)
|
|
216
|
+
df['catch'] = [-10.0, -10.0, -10.0] # source summary is overridden by the average
|
|
217
|
+
fit = self._write(df=df)
|
|
218
|
+
first = next(iter(fit.get_messages('record')))
|
|
219
|
+
assert _record_field(first, 'Catch').raw_value == round(-32.1 * 10) # (-32.0 + -32.2) / 2
|
|
220
|
+
assert _record_field(first, 'EffectiveArc').raw_value == round(85.25 * 10)
|
|
180
221
|
|
|
181
222
|
def test_every_lap_has_intensity_and_rest_is_its_own_lap(self):
|
|
182
223
|
df = _sample_df()
|
|
@@ -301,7 +342,7 @@ class TestInstrokeNamespace(unittest.TestCase):
|
|
|
301
342
|
fit = self._write_curves('full')
|
|
302
343
|
by_index = _dev_index_by_app_id(fit)
|
|
303
344
|
desc = _descriptions(fit)
|
|
304
|
-
for field_id in (0,
|
|
345
|
+
for field_id in (0, 10):
|
|
305
346
|
assert by_index[desc[field_id]['dev_index']] == fitwrite.ROWINGDATA_APP_ID
|
|
306
347
|
|
|
307
348
|
|
|
@@ -342,6 +383,62 @@ class TestReaderMapsStandardFields(unittest.TestCase):
|
|
|
342
383
|
parsed = rowingdata.FITParser(self.outfile).df
|
|
343
384
|
assert list(parsed[' WorkoutState']) == [1, 3, 5]
|
|
344
385
|
|
|
386
|
+
def _write_file_with_field_9(self, states, protocol_version):
|
|
387
|
+
"""An older file: record field 9 (WorkoutState), written by hand since
|
|
388
|
+
the exporter no longer produces it. No Lap carries an intensity, so the
|
|
389
|
+
record field is the only source of the state."""
|
|
390
|
+
from fit_tool.base_type import BaseType
|
|
391
|
+
from fit_tool.developer_field import DeveloperField
|
|
392
|
+
from fit_tool.fit_file_builder import FitFileBuilder
|
|
393
|
+
from fit_tool.profile.messages.developer_data_id_message import DeveloperDataIdMessage
|
|
394
|
+
from fit_tool.profile.messages.field_description_message import FieldDescriptionMessage
|
|
395
|
+
from fit_tool.profile.messages.file_id_message import FileIdMessage
|
|
396
|
+
from fit_tool.profile.messages.record_message import RecordMessage
|
|
397
|
+
from fit_tool.profile.profile_type import FileType, Manufacturer
|
|
398
|
+
|
|
399
|
+
builder = FitFileBuilder(auto_define=True, min_string_size=50)
|
|
400
|
+
file_id = FileIdMessage()
|
|
401
|
+
file_id.type = FileType.ACTIVITY
|
|
402
|
+
file_id.manufacturer = Manufacturer.GARMIN.value
|
|
403
|
+
file_id.time_created = 1_000_000_000_000
|
|
404
|
+
builder.add(file_id)
|
|
405
|
+
dev_id = DeveloperDataIdMessage()
|
|
406
|
+
dev_id.application_id = fitwrite.ROWINGDATA_APP_ID
|
|
407
|
+
dev_id.developer_data_index = 0
|
|
408
|
+
if protocol_version is not None:
|
|
409
|
+
dev_id.application_version = protocol_version
|
|
410
|
+
builder.add(dev_id)
|
|
411
|
+
desc = FieldDescriptionMessage()
|
|
412
|
+
desc.developer_data_index = 0
|
|
413
|
+
desc.field_definition_number = 9
|
|
414
|
+
desc.fit_base_type_id = BaseType.UINT8.value
|
|
415
|
+
desc.field_name = 'WorkoutState'
|
|
416
|
+
desc.scale = 1
|
|
417
|
+
desc.offset = 0
|
|
418
|
+
desc.units = ''
|
|
419
|
+
builder.add(desc)
|
|
420
|
+
for i, state in enumerate(states):
|
|
421
|
+
field = DeveloperField(
|
|
422
|
+
developer_data_index=0, field_id=9, size=1, name='WorkoutState',
|
|
423
|
+
base_type=BaseType.UINT8, scale=1, offset=0, units='')
|
|
424
|
+
field.set_value(0, state)
|
|
425
|
+
rec = RecordMessage(developer_fields=[field])
|
|
426
|
+
rec.timestamp = 1_000_000_000_000 + i * 2000
|
|
427
|
+
rec.distance = 8.5 * (i + 1)
|
|
428
|
+
builder.add(rec)
|
|
429
|
+
builder.build().to_file(self.outfile)
|
|
430
|
+
|
|
431
|
+
def test_field_9_is_still_read_from_older_files(self):
|
|
432
|
+
"""Field 9 left the standard, but files that carry it are still read."""
|
|
433
|
+
# Protocol version 1: field 9 holds FIT intensity values (0 Active, 1 Rest, 5 Interval)
|
|
434
|
+
self._write_file_with_field_9([0, 1, 5], protocol_version=1)
|
|
435
|
+
parsed = rowingdata.FITParser(self.outfile).df
|
|
436
|
+
assert list(parsed[' WorkoutState']) == [1, 3, 5] # rowingdata codes
|
|
437
|
+
# No application_version: pre-protocol files carry rowingdata codes as they are
|
|
438
|
+
self._write_file_with_field_9([1, 3, 5], protocol_version=None)
|
|
439
|
+
parsed = rowingdata.FITParser(self.outfile).df
|
|
440
|
+
assert list(parsed[' WorkoutState']) == [1, 3, 5]
|
|
441
|
+
|
|
345
442
|
def test_unknown_intensity_is_read_as_other(self):
|
|
346
443
|
from rowingdata import otherparsers
|
|
347
444
|
f = otherparsers._fit_intensity_to_workout_state
|
|
@@ -1067,7 +1067,7 @@ class TestFITParser:
|
|
|
1067
1067
|
"""fit_export_spec.json loads; field IDs and names match exporter expectations."""
|
|
1068
1068
|
from rowingdata import fitwrite_spec
|
|
1069
1069
|
raw = fitwrite_spec.load_fit_spec_raw()
|
|
1070
|
-
assert raw['version'] ==
|
|
1070
|
+
assert raw['version'] == 5
|
|
1071
1071
|
assert raw['protocol_version'] == 1
|
|
1072
1072
|
assert raw['handle_force_curve_field_id'] == 60
|
|
1073
1073
|
assert raw['instroke_dynamic']['summary_start'] == 20
|
|
@@ -1076,7 +1076,7 @@ class TestFITParser:
|
|
|
1076
1076
|
assert sorted(ids) == sorted(set(ids)), 'duplicate field_id in spec'
|
|
1077
1077
|
assert 0 in ids and 17 in ids and 19 in ids and 90 in ids and 93 in ids
|
|
1078
1078
|
spec = fitwrite_spec.load_fit_spec()
|
|
1079
|
-
assert len(spec[
|
|
1079
|
+
assert len(spec["ROWING_DEV_FIELDS"]) == 9 # fields 4, 5, 9 and 93 are read-only legacy
|
|
1080
1080
|
assert len(spec['OARLOCK_DEV_FIELDS']) == 6
|
|
1081
1081
|
assert len(spec['OARLOCK_DUAL_PAIRS']) == 6
|
|
1082
1082
|
assert spec['OARLOCK_DUAL_PAIRS'][0][1][0] == 200
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|