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

[FIX] Allow Apidae Trek parser to handle traces not in utf-8 #3899

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

juggler31
Copy link
Contributor

@juggler31 juggler31 commented Jan 22, 2024

Description

Related Issue

Checklist

  • I have followed the guidelines in our Contributing document
  • My code respects the Definition of done available in the Development section of the documentation
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes
  • I added an entry in the changelog file
  • My commits are all using prefix convention (emoji + tag name) and references associated issues
  • I added a label to the PR corresponding to the perimeter of my contribution
  • The title of my PR mentionned the issue associated

@juggler31 juggler31 marked this pull request as draft January 22, 2024 10:49
@juggler31 juggler31 force-pushed the filter_advised_parking branch from 0f95674 to 720f8c5 Compare January 22, 2024 10:53
Copy link

cypress bot commented Jan 22, 2024

Passing run #7882 ↗︎

0 24 0 0 Flakiness 0

Details:

Merge 5ac38e6 into 3bde71c...
Project: Geotrek-admin Commit: 360094cbbc ℹ️
Status: Passed Duration: 02:12 💡
Started: Jan 29, 2024 1:31 PM Ended: Jan 29, 2024 1:33 PM

Review all test suite changes for PR #3899 ↗︎

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3bde71c) 98.35% compared to head (5ac38e6) 98.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3899   +/-   ##
=======================================
  Coverage   98.35%   98.36%           
=======================================
  Files         293      294    +1     
  Lines       22174    22203   +29     
=======================================
+ Hits        21810    21839   +29     
  Misses        364      364           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juggler31 juggler31 force-pushed the filter_advised_parking branch 7 times, most recently from d6fa9a3 to 7daefd6 Compare January 23, 2024 13:36
@juggler31 juggler31 requested a review from a team January 23, 2024 14:01
@juggler31 juggler31 marked this pull request as ready for review January 23, 2024 14:01
@juggler31 juggler31 force-pushed the filter_advised_parking branch 2 times, most recently from 99b840e to 8037c31 Compare January 23, 2024 14:06
@juggler31 juggler31 changed the title fix convert encoding kml or gpx file from parseur to utf-8 💫 fix convert encoding kml or gpx file from parser to utf-8 Jan 23, 2024
Copy link
Contributor

@marcantoinedupre marcantoinedupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @juggler31! 👍
I have made a few comments.
I suggest to rephrase your commit message. What do you think of:

[FIX] Allow Apidae Trek parser to handle traces not in utf-8

geotrek/trekking/parsers.py Outdated Show resolved Hide resolved
geotrek/trekking/parsers.py Outdated Show resolved Hide resolved
geotrek/trekking/parsers.py Show resolved Hide resolved
geotrek/trekking/parsers.py Outdated Show resolved Hide resolved
@juggler31 juggler31 force-pushed the filter_advised_parking branch from 8037c31 to df2070e Compare January 24, 2024 16:01
@juggler31 juggler31 changed the title 💫 fix convert encoding kml or gpx file from parser to utf-8 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 Jan 24, 2024
@juggler31 juggler31 force-pushed the filter_advised_parking branch 2 times, most recently from 2bd49aa to 4f7c68b Compare January 24, 2024 16:15
@juggler31 juggler31 changed the title 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 (#3847) Jan 24, 2024
@juggler31 juggler31 changed the title 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 (#3847) 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 Jan 24, 2024
Copy link
Contributor

@marcantoinedupre marcantoinedupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, thanks!

I suggest some renaming. Nice one with the os.replace!

geotrek/trekking/parsers.py Outdated Show resolved Hide resolved
geotrek/trekking/parsers.py Show resolved Hide resolved
geotrek/trekking/parsers.py Outdated Show resolved Hide resolved
geotrek/trekking/tests/test_parsers.py Outdated Show resolved Hide resolved
@juggler31 juggler31 force-pushed the filter_advised_parking branch from c58cf3e to 68d7d93 Compare January 26, 2024 20:32
Copy link
Contributor

@marcantoinedupre marcantoinedupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have spotted some more issues. And there is a failing CI check on tests (I have not looked at it).

geotrek/trekking/tests/test_parsers.py Outdated Show resolved Hide resolved
geotrek/trekking/tests/data/file_good_encoding.kml Outdated Show resolved Hide resolved
geotrek/trekking/tests/data/file_bad_encoding.kml Outdated Show resolved Hide resolved
@juggler31 juggler31 force-pushed the filter_advised_parking branch 4 times, most recently from 7ae2cb0 to 8075f71 Compare January 29, 2024 10:51
@juggler31 juggler31 merged commit 942174f into master Jan 30, 2024
16 checks passed
@juggler31 juggler31 deleted the filter_advised_parking branch January 30, 2024 09:57
@babastienne babastienne changed the title 💫 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 [FIX] Allow Apidae Trek parser to handle traces not in utf-8 Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants