Skip to content

Releases: julien-boudry/Condorcet

Version 4.7.0

14 Jun 20:51
v4.7.0
d183091
Compare
Choose a tag to compare

Description

The minimum PHP version is now 8.3

Added

  • CondorcetElectionFormat object can be created directly from a string input instead of only SplFileInfo object.

Dev

  • Complete the migration to Pest PHP

Version 4.6.0

28 Jan 17:58
v4.6.0
574e257
Compare
Choose a tag to compare

Description

Half-migration of tests to PestPHP.

Added

  • Experimental WoollyM PHP DataFrame driver.

Version 4.5.0

11 Jul 21:13
19b10dc
Compare
Choose a tag to compare

Description

A major release, including two new voting methods, additions to the internal API, and additions to the public API. It also comes with its fair share of refinements and fixes in various areas, notably the Console.

Added

Voting Methods

Public API

  • Results object new property Result->pairwise contain an immutable and explicit pairwise array, from the object creation.
  • Election->countVotes(), Election->countValidVoteWithConstraints(), Election->countValidVoteWithConstraints and Election->sumValidVotesWeightWithConstraints now optionally support votes filtering by tags.
  • New CondorcetElectionFormat::parameters property, an array containing raw and untouched parameters from input, including non-standard parameters.

Internal Modules API

  • New algo tool VotesDeductedApprovals
  • New FilteredPairwise object and API
  • Add a flag for preliminary support for non-deterministic methods
  • New API Vote->getContextualRankingWithCandidatesKeys(Election $election) to prevent code deduplication inside the votes method code.

Changed

Public API

  • Migrate CondorcetPHP\Condorcet\Tools\Converters\CondorcetElectionFormat class to CondorcetPHP\Condorcet\Tools\Converters\CEF\CondorcetElectionFormat
  • Fix a bug with about MaxParseIteration that triggered the exception 1 vote in advance.
  • Create new dedicated ParseVotesMaxNumberReachedException for max parsing fail.
  • Election::maxParseIteration and Election::setMaxVoteNumber are now public properties and they can be accessed or modified directly. Corresponding setter and getter methods still exists but may be deprecated with v5.0.

Console

  • Ignore duplicate candidates instead of an error at the end
  • Fix bug #147: crash on importing from ConforcetElectionFormat without pdo_sqlite extension.
  • Display separator is always semicolon, instead of commas in some cases (to avoid confusion with the input format)
  • Add a warning if only one candidate is registered

Internal changes

  • Refactoring Linkable logic and organization
  • Move Pairwise namespace

Engine

  • Fix a rare bug affecting the validity of results in some case of Election->removeAllVotes() used in conjunction with Election->allowsVoteWeight in a particular sequence. And prevent similar cases in the future. #153
  • Various optimizations & refactors

Dev

  • Skip concerned tests if pdo_sqlite is not available.
  • Add CI tests without pdo_sqlite
  • Remove the RunInSeparateProcess strategy, use BackupStaticProperties instead or refactor to don't use any of them if possible.
  • Compatibility with PestPHP

Version 4.4.1

22 Jun 22:42
v4.4.1
83cd3a9
Compare
Choose a tag to compare

Changed

  • Fix #147. Command line crash when importing CondorcetElectionFormat file if PDO Sqlite is not available.

Full Changelog: v4.4.0...v4.4.1

Version 4.4.0

22 May 22:33
v4.4.0
05c9911
Compare
Choose a tag to compare

Description

Add a new console command to convert an election file format to another format.

Added

  • New convert command.
  • New converter (export only) for the Civs format.

Internal changes

  • Converter now uses distinct interfaces for import and export capabilities.

Version 4.3.1

18 Apr 11:45
v4.3.1
63d2be9
Compare
Choose a tag to compare

Changed

  • Force Terminal Ansi24 (truecolor) for Docker build instead of Ansi4.

Version 4.3.0

12 Mar 18:06
v4.3.0
cf77dba
Compare
Choose a tag to compare

Description

Require PHP 8.2. Include a new random vote generator API. Provide some devcontainers for dev and command line usage.

Added

Public API

  • New VotesRandomGenerator class providing random votes following either a reproducible or cryptographically secure scheme with many options.
  • New Election->removeAllVotes() method.
  • New Election->countRanks() method.
  • Votes objects now support the ArrayAccess interface (readonly).)

Distribution

  • New Devcontainer for prod. Very easy to execute as a command line application directly in Github Codespace.

Docs

  • New Docs directory structure.
  • New www.condorcet.io docbook replacing Github Wiki.
  • Improve Api Reference docs generator.
  • Ongoing efforts to improve documentation.

Internal changes

Engine

  • Upgrade to PHP 8.2 and use new features.
  • Add some true return type.
  • Various refactoring & cleanup.

Dev

  • New Dev Container for Dev
  • Migrate to PHPUnit 10

Version 4.2.2

07 Feb 17:07
v4.2.2
9ab2ddf
Compare
Choose a tag to compare

Dev

  • Upgrade to PHPUnit ^10

Version 4.2.1

19 Nov 08:16
Compare
Choose a tag to compare

Changed

  • [Console] Fix issue #110 - Crash on environnement without PDO/Sqlite or with the --deactivate-file-cache option.
  • [Console] Fix a memory_limit crash despite dataHandler driver if one entry with a multiplier contains more votes than memory_limit allows.

Version 4.2.0

23 Aug 18:31
Compare
Choose a tag to compare

Description

Redesign & refactor the console. And internal improvements.

Added

  • Support for PHP 8.2
  • [Console] Redesign console, add many styles, colors, and logo.
  • [Console] Improve interactive mode.

Changed

  • [Methods] Fix a rare crash on HighestAverage methods.
  • New namespace CondorcetPHP\Condorcet\Utilsand move CondorcetUtil and VoteUtil classes to it.

Internal

  • Refactor Vote entry parser to new class CondorcetPHP\Condorcet\Utils\VoteEntryParser: Better architecture and reduced code duplication.

Dev

  • [Benchmarks] Use a random deterministic seed for generating votes. (Benchmarks now require PHP 8.2 at least)
  • [Tests] Use a random deterministic if available (PHP >= 8.2) for generating votes.
  • [Coding Style] Improve rules.