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

Add unittests with a country file outside of the repo #237

Open
treee111 opened this issue Dec 3, 2023 · 0 comments
Open

Add unittests with a country file outside of the repo #237

treee111 opened this issue Dec 3, 2023 · 0 comments

Comments

@treee111
Copy link
Owner

treee111 commented Dec 3, 2023

          Your option 2 sounds like a good idea.

Maybe tests using such files could then be tagged or disabled by default, do that one has to invoke these tests with an option, when one has these goods locally present?

I have also been wondering if you should make a subset of the land polygon shapefile, just covering enough of Europe for the tests, so that it could be checked in with a small file size ?

And then add some test with your option 2 with the complete land polygon file.

I also consider to add tests for Faroe Islands, as a country with coastline, and a small country with at least a handful of tiles, but with osm file at 50 MB, so it could be checked in.

Regards
Alf

  1. nov. 2023, 23:01 kl. 23:01 skrev "Benjamin K." @.***>:

@treee111 I am tempted to write a unit test for this tile generation,
and the tile in Norway where I observed similar issues, and then run
the test with the old version of the code, using the incorrect way of
spawning command, and the updated code, which should not have any
isses.

What do you think ?

unittests are always good. The more, the better.

For checking this particular issue I think running it manually should
do the trick. One could run via the repo and checkout different tags or
commits or via pypi installation older versions could also be
installed.

I guess the main issue is that it would require the Netherlands and
Norway osm files to be part of the unit test resources, at least if the
test should be "enabled". It couild also be disabled, and only
something a developer would enable if he has a local version of the two
country OSM files.

There are also other unit testcases I consider writing, where it
would be useful to have a larger country OSM file, like Norway. Any
thoughts ?

To have a small repo for fast response and cloning I decided to use
small countries having the .osm files in the repo and only
land-poligons outside of the repo (this particular version is also
backuped etc.).
Using norway and/or netherlands both having 1,25GB would not suit into
this anymore.

A compromise could be that we have two ways of accessing .osm files:

  1. the one implemented now where the .osm file is in the repo
  2. another way where we access the .osm file from the
    ~/wahooMapsCreatorData/_unittest similar to land-poligons.

Norway and netherlands would suit into 2. then.
What do you think?
Should I implement the casing/infrastructure for 2. and you can take on
the unittest coding?

--
Reply to this email directly or view it on GitHub:
#214 (comment)
You are receiving this because you commented.

Message ID:
@.***>

Originally posted by @alfh in #214 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant