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

Regenerated some worlds using the numpy-branch. #1

Merged
merged 4 commits into from
Oct 20, 2015

Conversation

tcld
Copy link
Contributor

@tcld tcld commented Oct 19, 2015

I hope this is what I was supposed to do.

@tcld tcld changed the title Regenerated plates_279 using the numpy-branch. Regenerated some worlds using the numpy-branch. Oct 19, 2015
@tcld
Copy link
Contributor Author

tcld commented Oct 19, 2015

I am not sure if this is done correctly or not. Right now the tests on my system don't go through, so I will have to check some more things. Hold on.
(And if there are more files to update, please tell me.)

EDIT: I thought I generated a pickle-file (28070), but for some reason it is being read with protobuf - and that fails. Do you have any hints? I used the following parameters:
worldengine --output-dir=. --seed=28070 --step=full --height=100 --width=100 --number-of-plates=5 --rivers world

EDIT: According to drawing_functions_test.py it should be a protobuf-file. xP

@tcld
Copy link
Contributor Author

tcld commented Oct 19, 2015

Now I am left with a dozen blessed_pixel-errors. How do I deal with those? I assume I have to replace the images, too. But since they are named a bit strange I am not sure.

To clarify: Before I updated the world I had one blessed-pixel error. Hence I think that it is not the drawing functions but the world generation that changed (probably due to the change to the seeding done here:
Mindwerks/worldengine@2adb20a )

@tcld
Copy link
Contributor Author

tcld commented Oct 19, 2015

Ok, I updated the images.

The pickle-save is left untouched and that is now the cause for the only failed test that remains. But since it differs depending on the used version of Python there wouldn't be much use in regenerating it anyway. (Because then other peoples tests would fail.)

================================================================================================================= FAILURES ==================================================================================================================
____________________________________________________________________________________________ TestDrawingFunctions.test_draw_ancient_map_factor1 _____________________________________________________________________________________________

self = <tests.drawing_functions_test.TestDrawingFunctions testMethod=test_draw_ancient_map_factor1>

    def test_draw_ancient_map_factor1(self):
>       w_large = World.from_pickle_file("%s/seed_48956.world" % self.tests_data_dir)

tests/drawing_functions_test.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'worldengine.world.World'>, filename = '/media/tcl/Software/Code/UnrealProjects/Worldengine/master/worldengine-data/tests/data/seed_48956.world'

    @classmethod
    def from_pickle_file(cls, filename):
        with open(filename, "rb") as f:
>           return pickle.load(f)
E           UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 3: ordinal not in range(128)

worldengine/world.py:50: UnicodeDecodeError
=================================================================================================== 1 failed, 39 passed in 17.60 seconds ====================================================================================================

@tcld
Copy link
Contributor Author

tcld commented Oct 19, 2015

Summary: I think I am done with this. It was a bit difficult to figure out what to do, though.

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

I noticed that I regenerated plates_279.world, which is actually a pickle-file. So I guess that file would break Python 2-compatibility.

A possible solution is suggested here:
Mindwerks/worldengine#139 (comment)

@psi29a
Copy link
Member

psi29a commented Oct 20, 2015

Yup, two problems.

  1. Python2 vs. Python3 pickle format
  2. Old pickle formats (without numpy)

We solve the 1st one by writting tests specific to python version that created the pickle file.

The second one requires that we replace all the old pickle worlds and images in worldengine-data.

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

The tests-problem seems to be easy to solve. I can generate the Python 3-worlds, too.

@psi29a
Copy link
Member

psi29a commented Oct 20, 2015

So once this branch is merged, the tests in worldengine will work again?

Also I noticed this when looking at the "files changed": tests/images/temperature_28070.png
The old way seems to have more... chaos in it instead of just stripes. Was this the intention?

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

I noticed that, too. I had not changed anything about the temperature-file yet, so I am not sure why it looks so different. Maybe it is just the differently-shaped world that is responsible?

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

The temperature image here also looks a lot noisier:
https://github.com/Mindwerks/worldengine-data/blob/master/images/examples/world_seed_1_temperature.png

That can't be a coincidence, can it? Did something about the temperature-algorithm change within the last ~4 months? Are my changes responsible for this? (I don't think I ever generated a map like that, though. Not even with the release-version. I might have to go back and check that.)

@ftomassetti
Copy link
Member

Could that depends on the elevation? I think it affects the temperature

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

Yes, it does. Flat areas might influence it. However, when I ran the (slightly modified) temperature-generation here Mindwerks/worldengine#143 all of the outputs I got were much less random than the one linked to above.

@psi29a
Copy link
Member

psi29a commented Oct 20, 2015

We'll get back to this later. I'm happy to merge this to get our tests back in order. :)

You OK with this @ftomassetti ?

@ftomassetti
Copy link
Member

Yes, go on!

psi29a added a commit that referenced this pull request Oct 20, 2015
Regenerated some worlds using the numpy-branch.
@psi29a psi29a merged commit 05fae8e into Mindwerks:master Oct 20, 2015
@tcld tcld deleted the fresh_data branch October 21, 2015 07:06
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

Successfully merging this pull request may close these issues.

3 participants