* fix : tests updated

* fix : tests updated

* fix : tests updated

* doc : minor edit in description
pull/162/head
Sepand Haghighi 2022-11-08 08:22:13 +03:30 zatwierdzone przez GitHub
rodzic 3d1005185f
commit 5be1cc35fc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 79 dodań i 3 usunięć

Wyświetl plik

@ -39,7 +39,7 @@
## Overview
<p align="justify">
Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.
Samila is a generative art generator written in Python, Samila lets you create images based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.
</p>

Wyświetl plik

@ -6,7 +6,8 @@ except ImportError:
from distutils.core import setup
MINIMAL_DESCRIPTION = '''Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.'''
MINIMAL_DESCRIPTION = '''Samila is a generative art generator written in Python, Samila lets you create images based on many thousand points. The position of every single point is calculated by a
formula, which has random parameters. Because of the random numbers, every image looks different.'''
def get_requires():

Wyświetl plik

@ -88,6 +88,10 @@ True
'#555555'
>>> g.bgcolor
'#aaaaaa'
>>> g.marker
'x'
>>> g.spot_size
100
>>> g.plot(bgcolor=(.1, .2, .8), spot_size=0.1)
>>> g.plot(size=(20, 20))
>>> g.size
@ -166,7 +170,7 @@ True
>>> g.plot(color="white", bgcolor="transparent")
>>> g.bgcolor == "TRANSPARENT"
True
>>> g.plot(color="white", bgcolor="black", spot_size=0.1)
>>> g.plot()
>>> result = g.save_config()
>>> result["status"]
True
@ -190,6 +194,16 @@ True
True
>>> g.spot_size == g_.spot_size
True
>>> g.projection == g_.projection
True
>>> g.marker == g_.marker
True
>>> g.alpha == g_.alpha
True
>>> g.linewidth == g_.linewidth
True
>>> g.depth == g_.depth
True
>>> g_ = GenerativeImage(data=open("data.json", 'r'))
>>> g.color == g_.color
True
@ -197,6 +211,67 @@ True
True
>>> g.spot_size == g_.spot_size
True
>>> g.projection == g_.projection
True
>>> g.marker == g_.marker
True
>>> g.alpha == g_.alpha
True
>>> g.linewidth == g_.linewidth
True
>>> g.depth == g_.depth
True
>>> g.plot(color="white", bgcolor="black", spot_size=2, projection=Projection.POLAR, marker=Marker.X, alpha=0.2, linewidth=1)
>>> result = g.save_config()
>>> result["status"]
True
>>> isinstance(result["message"], str)
True
>>> result = g.save_data()
>>> result["status"]
True
>>> isinstance(result["message"], str)
True
>>> g_ = GenerativeImage(config=open("config.json", 'r'))
>>> g_.seed == g.seed
True
>>> g_.function1_str == g.function1_str
True
>>> g_.function2_str == g.function2_str
True
>>> g.color == g_.color
True
>>> g.bgcolor == g_.bgcolor
True
>>> g.spot_size == g_.spot_size
True
>>> g.projection == g_.projection
True
>>> g.marker == g_.marker
True
>>> g.alpha == g_.alpha
True
>>> g.linewidth == g_.linewidth
True
>>> g.depth == g_.depth
True
>>> g_ = GenerativeImage(data=open("data.json", 'r'))
>>> g.color == g_.color
True
>>> g.bgcolor == g_.bgcolor
True
>>> g.spot_size == g_.spot_size
True
>>> g.projection == g_.projection
True
>>> g.marker == g_.marker
True
>>> g.alpha == g_.alpha
True
>>> g.linewidth == g_.linewidth
True
>>> g.depth == g_.depth
True
>>> with open("config.json", 'w') as fp:
... json.dump({'f1': 'y', 'f2': 'x'}, fp)
>>> g = GenerativeImage(config=open("config.json", 'r'))