mysociety / mapit

A web service to map postcodes to administrative boundaries and more
Other
269 stars 88 forks source link

Add an admin flow for the mapit_import command. #397

Closed neprune closed 1 year ago

neprune commented 1 year ago

Note that the area adding logic has been kept 'as is' and many paths still don't have coverage yet.

Link to new view in admin page:

link to new admin view

Form submission:

Screenshot 2023-01-12 at 18 14 10

Successful run:

Screenshot 2023-01-12 at 18 14 22

Unsuccessful run:

Screenshot 2023-01-12 at 18 15 08
codecov[bot] commented 1 year ago

Codecov Report

Merging #397 (92bbbd9) into master (a784963) will increase coverage by 2.67%. The diff coverage is 78.68%.

@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   72.43%   75.10%   +2.67%     
==========================================
  Files          40       45       +5     
  Lines        2380     2740     +360     
==========================================
+ Hits         1724     2058     +334     
- Misses        656      682      +26     
Impacted Files Coverage Δ
mapit/admin.py 97.36% <ø> (ø)
mapit/management/command_utils.py 69.30% <50.00%> (-1.70%) :arrow_down:
mapit/add_areas_from_file/core.py 56.58% <56.58%> (ø)
mapit/management/commands/mapit_import.py 74.25% <71.83%> (+21.80%) :arrow_up:
mapit/tests/add_areas_from_file/skeletons.py 92.23% <92.23%> (ø)
mapit/tests/add_areas_from_file/test_admin_flow.py 98.63% <98.63%> (ø)
mapit/add_areas_from_file/admin_flow.py 100.00% <100.00%> (ø)
mapit/tests/add_areas_from_file/test_cli.py 100.00% <100.00%> (ø)
mapit/tests/add_areas_from_file/test_core.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

neprune commented 1 year ago

@davea sharing early in case of any feedback on top-level approach - not blocked.

neprune commented 1 year ago

@davea Ready for review. Very sorry for the big PR, I couldn't find a good way to break it down.