Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 3.44 KB

File metadata and controls

58 lines (39 loc) · 3.44 KB

Progress Log — 2026-03-14

Code quality review and bug fixes

Performed a full code review of the neat-python codebase, scanning all core modules for defects, typos, stale comments, and quality issues. Identified 11 issues total; fixed 5 in this session.

Fixed: Missing f-string prefixes in attribute validation (attributes.py)

Three raise RuntimeError(...) calls in FloatAttribute.validate, IntegerAttribute.validate, and BoolAttribute.validate were plain strings instead of f-strings, so error messages would print the literal text {self.name} instead of the attribute name.

  • neat/attributes.py:89 — FloatAttribute
  • neat/attributes.py:133 — IntegerAttribute
  • neat/attributes.py:177 — BoolAttribute

Fixed: Hardcoded fallback version and bare except in exporters (export/exporters.py)

_get_neat_version() had a hardcoded fallback of "1.1.0" but the project version is 2.0.0. Also used a bare except: clause which catches SystemExit, KeyboardInterrupt, etc. Changed fallback to "2.0.0" and narrowed to except Exception:.

Fixed: Deprecated datetime.utcnow() in exporters (export/exporters.py)

All four exporter functions (export_feedforward, export_recurrent, export_ctrnn, export_iznn) used datetime.utcnow().isoformat() + "Z" which is deprecated since Python 3.12. Replaced with datetime.now(timezone.utc).isoformat() which produces a timezone-aware ISO 8601 string with +00:00 suffix.

Fixed: Obsolete pylint directives (reporting.py, iznn/init.py)

Removed # pylint: disable=no-self-use comments from two locations. The no-self-use check was removed from pylint in version 2.14.

  • neat/reporting.py:131 — StdOutReporter.post_evaluate
  • neat/iznn/__init__.py:150 — IZNN.get_time_step_msec

Other issues identified but not yet fixed

  1. Destructive pickling side effectsDefaultGenomeConfig.__getstate__ and DefaultSpeciesSet.__getstate__ call next() on itertools.count objects, advancing the counter on the original object.
  2. FeedForwardNetwork.create mutates genome — Writing to cg.weight when random_values or unique_value is set corrupts the genome. Also if unique_value: is falsy for 0.0.
  3. best_genome tracking ignores fitness_criterion — Always uses > even when fitness_criterion = min.
  4. fitness_criterion attribute may not be set — When no_fitness_termination=True and criterion is not max/min/mean.
  5. Dead None check in stagnation.py:56prev_fitness can never be None.
  6. Weaker connection filter in RecurrentNetwork/CTRNN — Should match the stricter filter used by IZNN.

Files modified

  • neat/attributes.py
  • neat/export/exporters.py
  • neat/reporting.py
  • neat/iznn/__init__.py

Add Zenodo DOI to citation information

Zenodo issued DOI 10.5281/zenodo.19024753 for the project. Updated all citation-related files to include it:

  • CITATION.cff — Added repository-code, license, version (2.0.1), and doi fields.
  • README.md — Added Zenodo DOI badge, DOI URL in APA entry, version/doi/url in BibTeX entry.
  • docs/faq.rst — Replaced old @misc citation with @software entry including DOI, version, and URL. Updated in-text example from "CodeReclaimers" to "McIntyre et al., 2026".
  • docs/academic_research.rst — Replaced bare GitHub link with full APA citation including DOI.

Files modified

  • CITATION.cff
  • README.md
  • docs/faq.rst
  • docs/academic_research.rst