Skip to content

GitHub actions #211

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

Merged
merged 30 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9c70c94
Change copyright
ahmedfgad Jun 19, 2023
a05e52e
Rename docs
ahmedfgad Jun 19, 2023
a21c6ab
More examples
ahmedfgad Jun 20, 2023
adba4b2
Test Python 3.12
ahmedfgad Jun 20, 2023
99a005f
Test Python 3.12
ahmedfgad Jun 20, 2023
587b43c
Test Python 3.12
ahmedfgad Jun 20, 2023
5fd1a58
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
e75aae7
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
785f706
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
c77ce2b
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
15e57aa
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
b4aed45
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
44671f6
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
95696c2
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
921a290
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
3761236
Use hatchling instead of setuptools
ahmedfgad Jun 20, 2023
56b1295
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
f410a14
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
925b2bb
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
983edf8
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
13a2cd0
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
151445f
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
6a123d9
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
0ae9133
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
c1cc1bc
Test Python 3.12 Beta
ahmedfgad Jun 20, 2023
abcc6f7
Migrate to Hatch
ahmedfgad Jun 20, 2023
767068f
Migrate to Hatch
ahmedfgad Jun 20, 2023
e151d4b
Migrate to Hatch
ahmedfgad Jun 20, 2023
00069e9
Restore changes
ahmedfgad Jun 20, 2023
e7f942c
Disable Python 3.12 tests
ahmedfgad Jun 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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: ahmed.f.gad@gmail.com
* [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