Skip to content

GitHub actions#354

Merged
ahmedfgad merged 43 commits into
masterfrom
github-actions
May 21, 2026
Merged

GitHub actions#354
ahmedfgad merged 43 commits into
masterfrom
github-actions

Conversation

@ahmedfgad
Copy link
Copy Markdown
Owner

No description provided.

ahmedfgad added 30 commits April 8, 2026 16:30
…up nav

Build pipeline:
- Read the docs directly from Markdown via myst-parser; drop the Typora
  .md -> .rst conversion. Move the page sources into docs/source and delete
  the generated .rst files.
- Switch the HTML theme to Furo; add docs/requirements.txt and enable it in
  .readthedocs.yaml. Keep myst_heading_anchors off so heading anchors match
  the live site.

Navigation:
- Convert index.rst to index.md and group the toctree into five captioned
  sections. Re-level every page to a single top-level heading so the sidebar
  is a compact, grouped page list (maxdepth 1) instead of one flat list.

Diagrams (committed SVG with PNG fallback for PDF/ePub):
- keep_elitism/keep_parents offspring decision tree, population assembly,
  GA life cycle, crossover types, and mutation.

Content:
- Plain-English pass on README, index, pygad, pygad_more (elitism), utils,
  and visualize.
- Fix broken cross-links (utils vs pygad_more anchors, legacy Footer.html),
  equation typos, and the wrong utils page title.
Copyedit the gene_space, gene constraint, sample_size, stop criteria,
"continue without losing progress", and "change population size" sections:
fix subject-verb agreement, a code typo in a gene_space example
([... 95. 6.3 ...] -> [... 95, 6.3 ...]), "retracted" -> "restricted",
num_gene -> num_genes, criterion -> criteria, and a malformed (indented)
code fence. Wording of load-bearing headings is unchanged.
Copyedit the duplicate-prevention, gene_type, parallel processing,
print-lifecycle-summary, logging, non-deterministic, reuse-fitness, and
batch-fitness sections. Notable fixes: wrong parameter names
(keep_solutions/keep_best_solutions -> save_solutions/save_best_solutions),
a version anchor mismatch (third-gene fix is 3.1.0, not 3.0.1),
patch -> batch, ga_instanse -> ga_instance, "the the" / "A a" duplications,
and several subject-verb agreement errors. Load-bearing headings unchanged.
…arent selection)

Fix a default-value error (initialize_population high default -4 -> +4),
"<= that the" -> "<= the", "the the" duplication, "andom_mutation_min_val"
-> "random_mutation_min_val", a calulates typo, "method behavior" ->
"method's behavior", and wordy phrasing. Load-bearing headings unchanged.
Copyedit the examples (single/multi-objective, reproducing images,
clustering, CoinTex): "sections discusses" -> "discuss", "range ... affect"
-> "affects", "available the" -> "available at the", "20,000s" -> "20,000",
and clearer multi-objective color wording.
Fix the H2->H4 heading jumps under the cnn Model class (methods now H3),
relabel the "Network Architecture" output blocks as text (clearing the
Pygments lexing warnings), fix "the the" duplications, "activations
functions" -> "activation functions", "It default" -> "It defaults",
a duplicated "model: model:", and a 4-vs-6 num_solutions inconsistency.
…eps)

Fix the recurring "PyGAD's library documentation" intro phrase, an
"activations functions" typo, a "kerarsga"/"has helper a class" typo, an
"at least one an" slip, and the broken steps-summary numbering (1,2,4,5,6,8)
in kerasga.md and torchga.md.
Fix a real bug (input layer described as "last" instead of "first" layer),
a corrupted output block (stray print( leaked into shown output), an
unmatched parenthesis, a pygad.torch -> pygad.torchga heading typo, a
matric -> matrix typo, "less number" -> "fewer", normalized broken step
lists, and the recurring "some plots are showed" comment across ML pages.
Fix a factual error (AveragePooling2D described as applying max pooling),
the last "PyGAD's library documentation" intro (helper.md), "the the" and
"go the the" -> "go to the", a "layers layers" duplication, an incomplete
sentence in pygad_more, and reword the awkward "next is to" across nn,
cnn, and gacnn.
ahmedfgad added 13 commits May 21, 2026 15:25
Fix "based on where" -> "based on whether", "Even no training algorithm",
"functions that does not", awkward to_vector/to_array descriptions, and
"summary of the steps are". Completes the line-by-line pass of the nn page.
Reword "After the PyGAD completes its execution, then there is a figure..."
to "After PyGAD completes its execution, a figure shows...".
Move the non-version content (PyGAD projects, Stack Overflow questions,
submitting issues, feature requests, projects/papers built with PyGAD,
tutorials, translations, links, and contact) out of releases.md into a new
help.md titled "Help & Resources". releases.md now contains only the version
history (1.0.17 to 3.6.0). Repoint the ask-for-feature and contact-us links
and add a "Help & Resources" group to the toctree.
Break the 1964-line "More About PyGAD" page into a short landing page (intro
plus a card grid and a nested toctree) and six focused pages: Multi-Objective
Optimization, Controlling Gene Values, Controlling Generations, Fitness
Calculation and Performance, Logging and the Lifecycle Summary, and
User-Defined Functions and Callbacks. Repoint every internal
pygad_more.html#... link to the page that now hosts each section. Heading text
is unchanged, so the section anchors are preserved.
For nn, gann, kerasga, and torchga, keep the module reference (intro, classes,
functions, and steps) on the main page and move each worked example to its own
page, linked from an Examples card grid and a nested toctree. cnn and gacnn
(single example each) are unchanged. No internal links break: example sections
are not referenced, and cnn.html#reading-the-data stays on the cnn page.
Extend the "User-Defined Functions and Callbacks" page with an "Assign a Class"
section. A class whose instances implement __call__ can be passed for
fitness_func, the crossover/mutation/parent-selection operators, and the on_*
callbacks. The __call__ method takes the same parameters as the function form
(self does not count), and a class instance can keep state across generations
because the same instance is reused. Includes the example from
examples/example_lifecycle_classes.py.
Rename the page heading to "Use Functions, Methods, and Classes to Build
Fitness and Callbacks" so the title reflects the new class option. Repoint the
two release-note links to the updated anchor and update the matching card on
the More About PyGAD landing page.
Add _static/scroll-sidebar.js (registered via html_js_files) so the left
sidebar scrolls to center the current page on load, instead of always showing
the top. It adjusts only the sidebar's own scroll position.
Restructure the three remaining long pages, following the established
landing-plus-children pattern:
- pygad.md keeps the pygad.GA class API reference and module functions; the
  "Steps to Use PyGAD" walkthrough, "Life Cycle of PyGAD", and the three
  worked examples move to their own pages, reached from card grids and a
  nested toctree. Clustering and CoinTex stay as short pointers.
- utils.md keeps the operator submodule reference; "Adaptive Mutation" and
  "User-Defined Crossover, Mutation, and Parent Selection Operators" move to
  their own pages.
- help.md becomes a short landing page linking to four themed pages: Getting
  Help, Tutorials and Resources, Projects and Research, and PyGAD in Other
  Languages.
All internal links to moved sections are repointed to their new pages; moved
heading text is unchanged so section anchors are preserved.
The constructor accepts ~41 parameters, each previously a long bullet, making
a wall of text. Group them into themed subsections (Population and
Generations, Fitness, Genes, Parent Selection, Keeping Solutions, Crossover,
Mutation, Lifecycle Callbacks, Saving and Logging, Performance) and render
each parameter as a collapsible dropdown whose title shows the name, default,
and a one-line summary, expanding to the full description. Every description is
preserved verbatim and the init anchor is unchanged. Add a small CSS touch so
the parameter name stands out in each dropdown title.
Each parameter's expanded description was a single run-on paragraph. Reformat
the dense ones into a short opening sentence, bulleted options and conditions,
inline code examples, and a clear version-history list (for example gene_space,
gene_type, keep_elitism/keep_parents, crossover_type, mutation_type, the
callbacks, and parallel_processing). All wording, examples, and links are
preserved; the init anchor is unchanged.
…kage

Clean up the English of the `#` comments and docstrings in all pygad/ modules:
fix typos (for, sure, across, precedes, dimensions, architecture, consider,
validated, latest, from, coming, value), subject-verb agreement (appear),
wrong words (confirms that), and awkward phrasing, using simple English. Also
fix a few copy-paste docstring issues (a wrong parameter name, a wrong return
type, and a stale default value) and a comment that contradicted its code
branch. No code, exception messages, or behavior were changed.
…ypos

Apply the simple-English pass to the items skipped earlier:
- Fix the English of exception and warning message strings: "the the" -> "the",
  "constrains" -> "constraints", "is subset of" -> "is a subset of", "a better
  solution that the best" -> "than the best", "A list of NumPy array" -> "A list
  or NumPy array", and "For format of a single criterion" -> "The format ...".
- Rename two misspelled local variables: boxeplots -> boxplots and
  max_lengthes -> max_lengths.

No behavior changes. No test asserts on these messages, and all 711 runnable
tests pass.
@ahmedfgad ahmedfgad merged commit 931777d into master May 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant