From c8238790bfd3165abb36e3aae9a721e1fda2df57 Mon Sep 17 00:00:00 2001 From: danielwilczak101 <44122838+danielwilczak101@users.noreply.github.com> Date: Sun, 20 Sep 2020 02:32:15 -0400 Subject: [PATCH] Add files via upload --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ ga_tests.py | 1 + setup.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 README.md create mode 100644 ga_tests.py create mode 100644 setup.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..dff82bf --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# EasyGA - A general solution to Genetic Algorithms + +The projects has just started + +## Installation + +Run the rolling to install: + +```Python +pip3 install EasyGA +``` + +To use the package +```python +import EasyGA as ga +``` + +## Usage + +```python +import EasyGA as ga + +chromosome = ga.chromosome() + +# Fill the chromosome with genes with Gene Number i'th number +for i in range(10): + gene_value = f"Gene Number {i}" + new_gene = ga.gene("gene_value") + chromosome.add_gene(new_gene) + +# Chromosome has 10 genes in it +print(len(chromosome.genes)) + +# Get the first genes value +print(chromosome.genes[0].get_value()) + +``` + +# Developing EasyGA + +To install EASY, along with the tools you need to develop and run tests, run the following in your virtual env: + +```bash +$ pip install -e .[dev] +``` \ No newline at end of file diff --git a/ga_tests.py b/ga_tests.py new file mode 100644 index 0000000..728fc95 --- /dev/null +++ b/ga_tests.py @@ -0,0 +1 @@ +# Tests for the ga diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..94da1c2 --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +from setuptools import setup + +with open("README.md", "r") as fh: + long_description = fh.read() + +setup( + name='EasyGA', + version='0.0.6', + description='A ubiquitous or general purpuse GA', + py_modules=["EasyGA"], + package_dir={'':'src'}, + url="https://github.com/danielwilczak101/EasyGA", + author="Daniel Wilczak", + author_email="danielwilczak101@gmail.com", + long_description = long_description, + long_description_content_type = "text/markdown", + classifier=[ + "Programming Language :: Python :: 3.0", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: OS Independent", + ], + install_requires = ["blessings ~= 1.7", + ], + extra_require = { + "dev": [ + "pytest>=3.7", + ], + }, + )