Skip to content

Commit

Permalink
Merge pull request #211 from ahmedfgad/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
ahmedfgad authored Jun 20, 2023
2 parents d745c6d + e7f942c commit e413018
Show file tree
Hide file tree
Showing 1,995 changed files with 1,663 additions and 302 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main_py310.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python 3.10 Testing PyGAD using PyTest
name: PyGAD PyTest / Python 3.10

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_py311.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python 3.11 Testing PyGAD using PyTest
name: PyGAD PyTest / Python 3.11

on:
push:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/main_py312.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PyGAD PyTest / Python 3.12

# Cannot install packages in Python 3.12.
# The reason is that we use pip for installing packages.
# pip uses setuptools for the installation.
# setuptools depends on distutils.
# But Python 3.12 does not support distutils.
# Let's wait until setuptools changes its dependencies.

# on:
# push:
# branches:
# - github-actions
# - master
on: workflow_dispatch

jobs:
job_id_1:
runs-on: ubuntu-latest
name: PyTest Workflow Job

steps:
- name: Checkout Pre-Built Action
uses: actions/checkout@v3

- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12.0-beta.2'

- name: Build PyGAD from the Repository
run: |
python3 -m pip install --upgrade build
python3 -m build
- name: Install PyGAD after Building the .whl File
run: |
find ./dist/*.whl | xargs pip install
- name: Install PyTest
run: pip install pytest

- name: Run the Tests by Calling PyTest
run: |
pytest
2 changes: 1 addition & 1 deletion .github/workflows/main_py37.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python 3.7 Testing PyGAD using PyTest
name: PyGAD PyTest / Python 3.7

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_py38.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python 3.8 Testing PyGAD using PyTest
name: PyGAD PyTest / Python 3.8

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_py39.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python 3.9 Testing PyGAD using PyTest
name: PyGAD PyTest / Python 3.9

on:
push:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ The library is under active development and more features are added regularly. I

# Installation

To install [PyGAD](https://pypi.org/project/pygad), simply use pip to download and install the library from [PyPI](https://pypi.org/project/pygad) (Python Package Index). The library lives a PyPI at this page https://pypi.org/project/pygad.
To install [PyGAD](https://pypi.org/project/pygad), simply use pip to download and install the library from [PyPI](https://pypi.org/project/pygad) (Python Package Index). The library is at PyPI at this page https://pypi.org/project/pygad.

Install PyGAD with the following command:

```python
pip install pygad
```

To get started with PyGAD, please read the documentation at [Read The Docs](https://pygad.readthedocs.io) https://pygad.readthedocs.io.
To get started with PyGAD, please read the documentation at [Read The Docs](https://pygad.readthedocs.io/) https://pygad.readthedocs.io.

# PyGAD Source Code

Expand Down Expand Up @@ -146,7 +146,7 @@ on_stop()

# Example

Check the [PyGAD's documentation](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html) for information about the implementation of this example.
Check the [PyGAD's documentation](https://pygad.readthedocs.io/en/latest/pygad.html) for information about the implementation of this example.

```python
import pygad
Expand Down
19 changes: 3 additions & 16 deletions Tutorial Project/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# GeneticAlgorithmPython

Genetic algorithm implementation in Python

This folder under the project has the code built in the tutorial titled [**Genetic Algorithm Implementation in Python**](https://www.linkedin.com/pulse/genetic-algorithm-implementation-python-ahmed-gad) which is available in these links:
This folder has the code for the tutorial titled [**Genetic Algorithm Implementation in Python**](https://www.linkedin.com/pulse/genetic-algorithm-implementation-python-ahmed-gad) which is available at these links:

* https://www.linkedin.com/pulse/genetic-algorithm-implementation-python-ahmed-gad
* https://towardsdatascience.com/genetic-algorithm-implementation-in-python-5ab67bb124a6
* https://www.kdnuggets.com/2018/07/genetic-algorithm-implementation-python.html

The `ga.py` file holds the implementation of the GA operations such as mutation and crossover. The other file gives an example of using the GA.py file.

It is important to note that this project does not implement everything in GA and there are a wide number of variations to be applied. For example, this project uses decimal representation for the chromosome and the binary representations might be preferred for other problems.

## For Contacting the Author
The `ga.py` file has the implementation of the GA operations such as mutation and crossover. It is a primitive implementation of the genetic algorithm. The other file gives an example of using the ga.py file.

* E-mail: [email protected]
* [LinkedIn](https://www.linkedin.com/in/ahmedfgad)
* [Amazon Author Page](https://amazon.com/author/ahmedgad)
* [Paperspace](https://blog.paperspace.com/author/ahmed)
* [Hearbeat](https://heartbeat.fritz.ai/@ahmedfgad)
* [KDnuggets](https://kdnuggets.com/author/ahmed-gad)
* [TowardsDataScience](https://towardsdatascience.com/@ahmedfgad)
* [GitHub](https://github.com/ahmedfgad)
It is important to note that this project does not implement everything in GA and there are a wide number of variations to be applied. For example, this project uses decimal representation for the chromosome and the binary representations might be preferred for other problems. Check [PyGAD](https://pygad.readthedocs.io/en) for extensive features.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'PyGAD'
copyright = '2020, Ahmed Fawzy Gad'
copyright = '2023, Ahmed Fawzy Gad'
author = 'Ahmed Fawzy Gad'

# The full version, including alpha/beta/rc tags
release = '3.0.1'
release = '3.1.0'

master_doc = 'index'

Expand Down
Loading

0 comments on commit e413018

Please sign in to comment.