Skip to content

Commit e413018

Browse files
authored
Merge pull request #211 from ahmedfgad/github-actions
GitHub actions
2 parents d745c6d + e7f942c commit e413018

File tree

1,995 files changed

+1663
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,995 files changed

+1663
-302
lines changed

.github/workflows/main_py310.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python 3.10 Testing PyGAD using PyTest
1+
name: PyGAD PyTest / Python 3.10
22

33
on:
44
push:

.github/workflows/main_py311.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python 3.11 Testing PyGAD using PyTest
1+
name: PyGAD PyTest / Python 3.11
22

33
on:
44
push:

.github/workflows/main_py312.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PyGAD PyTest / Python 3.12
2+
3+
# Cannot install packages in Python 3.12.
4+
# The reason is that we use pip for installing packages.
5+
# pip uses setuptools for the installation.
6+
# setuptools depends on distutils.
7+
# But Python 3.12 does not support distutils.
8+
# Let's wait until setuptools changes its dependencies.
9+
10+
# on:
11+
# push:
12+
# branches:
13+
# - github-actions
14+
# - master
15+
on: workflow_dispatch
16+
17+
jobs:
18+
job_id_1:
19+
runs-on: ubuntu-latest
20+
name: PyTest Workflow Job
21+
22+
steps:
23+
- name: Checkout Pre-Built Action
24+
uses: actions/checkout@v3
25+
26+
- name: Setup Python 3.12
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.12.0-beta.2'
30+
31+
- name: Build PyGAD from the Repository
32+
run: |
33+
python3 -m pip install --upgrade build
34+
python3 -m build
35+
36+
- name: Install PyGAD after Building the .whl File
37+
run: |
38+
find ./dist/*.whl | xargs pip install
39+
40+
- name: Install PyTest
41+
run: pip install pytest
42+
43+
- name: Run the Tests by Calling PyTest
44+
run: |
45+
pytest

.github/workflows/main_py37.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python 3.7 Testing PyGAD using PyTest
1+
name: PyGAD PyTest / Python 3.7
22

33
on:
44
push:

.github/workflows/main_py38.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python 3.8 Testing PyGAD using PyTest
1+
name: PyGAD PyTest / Python 3.8
22

33
on:
44
push:

.github/workflows/main_py39.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python 3.9 Testing PyGAD using PyTest
1+
name: PyGAD PyTest / Python 3.9
22

33
on:
44
push:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ The library is under active development and more features are added regularly. I
2121

2222
# Installation
2323

24-
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.
24+
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.
2525

2626
Install PyGAD with the following command:
2727

2828
```python
2929
pip install pygad
3030
```
3131

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

3434
# PyGAD Source Code
3535

@@ -146,7 +146,7 @@ on_stop()
146146

147147
# Example
148148

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

151151
```python
152152
import pygad

Tutorial Project/README.md

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
# GeneticAlgorithmPython
22

3-
Genetic algorithm implementation in Python
4-
5-
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:
3+
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:
64

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

11-
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.
12-
13-
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.
14-
15-
## For Contacting the Author
9+
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.
1610

17-
18-
* [LinkedIn](https://www.linkedin.com/in/ahmedfgad)
19-
* [Amazon Author Page](https://amazon.com/author/ahmedgad)
20-
* [Paperspace](https://blog.paperspace.com/author/ahmed)
21-
* [Hearbeat](https://heartbeat.fritz.ai/@ahmedfgad)
22-
* [KDnuggets](https://kdnuggets.com/author/ahmed-gad)
23-
* [TowardsDataScience](https://towardsdatascience.com/@ahmedfgad)
24-
* [GitHub](https://github.com/ahmedfgad)
11+
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.

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'PyGAD'
21-
copyright = '2020, Ahmed Fawzy Gad'
21+
copyright = '2023, Ahmed Fawzy Gad'
2222
author = 'Ahmed Fawzy Gad'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '3.0.1'
25+
release = '3.1.0'
2626

2727
master_doc = 'index'
2828

0 commit comments

Comments
 (0)