Skip to content

Commit 5ce4ab9

Browse files
authored
Merge pull request #347 from ahmedfgad/github-actions
Add read permissions to workflows
2 parents 06b49c2 + e048ad5 commit 5ce4ab9

File tree

8 files changed

+41
-0
lines changed

8 files changed

+41
-0
lines changed

.github/workflows/main_py310.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.10
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/main_py311.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.11
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/main_py312.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.12
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/main_py313.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.13
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/main_py38.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.8
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/main_py39.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PyGAD PyTest / Python 3.9
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:

.github/workflows/scorecard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# policy, and support documentation.
44

55
name: Scorecard supply-chain security
6+
67
on:
78
# This allows you to run the workflow manually from the Actions tab
89
workflow_dispatch:

docs/md/releases.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,28 @@ Release Date 08 July 2025
608608
17. Fixed a bug while applying the non-dominated sorting in the `get_non_dominated_set()` method inside the `pygad/utils/nsga2.py` script. It was swapping the non-dominated and dominated sets. In other words, it used the non-dominated set as if it is the dominated set and vice versa. All the calls to this method were edited accordingly. https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/320.
609609
18. Fix a bug retrieving in the `best_solution()` method when retrieving the best solution for multi-objective problems. https://github.com/ahmedfgad/GeneticAlgorithmPython/pull/331
610610

611+
## PyGAD 3.6.0
612+
613+
1. Support passing a class to the fitness, crossover, and mutation. https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/342
614+
2. A new class called `Validation` is created in the new `pygad/utils/validation.py` script. It has a method called `validate_parameters()` to validate all the parameters passed while instantiating the `pygad.GA` class.
615+
3. Refactoring the `pygad.py` script by moving a lot of functions and methods to other classes in other scripts.
616+
1. The `summary()` method was moved to `Helper` class in the `pygad/helper/misc.py` script.
617+
2. The validation code in the `__init__()` method of the `pygad.GA` class is moved to the new `validate_parameters()` method in the new `Validation` class in the new `pygad/utils/validation.py` script. Moreover, the `validate_multi_stop_criteria()` method is also moved to the same class.
618+
3. The GA main workflow is moved into the new `GAEngine` class in the new `pygad/utils/engine.py` script. Specifically, these methods are moved from the `pygad.GA` class to the new `GAEngine` class:
619+
1. run()
620+
2. run_loop_head()
621+
3. run_select_parents()
622+
4. run_crossover()
623+
5. run_mutation()
624+
6. run_update_population()
625+
7. initialize_population()
626+
8. cal_pop_fitness()
627+
9. best_solution()
628+
10. round_genes()
629+
4. The `pygad.GA` class now extends the two new classes `utils.validation.Validation` and `utils.engine.GAEngine`.
630+
5. The version of the `pygad.utils` submodule is upgraded from `1.3.0` to `1.4.0`.
631+
6. The version of the `pygad.helper` submodule is upgraded from `1.2.0` to `1.3.0`.
632+
611633
# PyGAD Projects at GitHub
612634

613635
The PyGAD library is available at PyPI at this page https://pypi.org/project/pygad. PyGAD is built out of a number of open-source GitHub projects. A brief note about these projects is given in the next subsections.

0 commit comments

Comments
 (0)