Skip to content
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

PSR-4 Namespacing and Additional Classes and Changes #11

Closed
wants to merge 18 commits into from
Closed

PSR-4 Namespacing and Additional Classes and Changes #11

wants to merge 18 commits into from

Conversation

lpeabody
Copy link

Changes

Composer

  • Updated composer.json to add Jeff as a maintainer.
  • Add PHPUnit as a composer developer dependency.
  • Updated autoloading scheme to PSR-4.

PSR-4

  • The namespace of the src/ directory has been changed to Skills.
  • PHPUnit tests have been moved to the top level tests/ directory and namespaced as Skills\Tests.
  • All require statements have been removed and replaced with use statements.

Tests Status

  • All tests are either failing, throwing an error, or passing. They are not crashing. Tested on PHP 5.5.26.

Failures

There were 3 failures:

  1. Skills\Tests\Elo\FideEloCalculatorTest::testFideProvisionalEloCalculator
    Failed asserting that 1221.225511069717 matches expected 1196.25.

/Users/les.peabody/Projects/PHPSkills/tests/Elo/EloAssert.php:38
/Users/les.peabody/Projects/PHPSkills/tests/Elo/FideEloCalculatorTest.php:18
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47

  1. Skills\Tests\Elo\FideEloCalculatorTest::testFideNonProvisionalEloCalculator
    Failed asserting that 1207.5 matches expected 1192.5.

/Users/les.peabody/Projects/PHPSkills/tests/Elo/EloAssert.php:38
/Users/les.peabody/Projects/PHPSkills/tests/Elo/FideEloCalculatorTest.php:28
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47

  1. Skills\Tests\TrueSkill\TwoTeamTrueSkillCalculatorTest::testTwoTeamTrueSkillCalculator
    Failed asserting that 29.793996854587391 matches expected 32.012.

/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:991
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:435
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:41
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TwoTeamTrueSkillCalculatorTest.php:16
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47

Errors

There was 1 error:

  1. Skills\Tests\TrueSkill\FactorGraphTrueSkillCalculatorTest::testFactorGraphTrueSkillCalculator
    Skills\InvalidOperationException:

/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/Layers/IteratedTeamDifferencesInnerLayer.php:51
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/TrueSkillFactorGraph.php:102
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/TrueSkillFactorGraph.php:72
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/FactorGraphTrueSkillCalculator.php:40
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:87
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:20
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/FactorGraphTeamTrueSkillCalculatorTest.php:13
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47

@lpeabody lpeabody changed the title PSR-4 Namespacing and Additional Classes PSR-4 Namespacing and Additional Classes and Changes Oct 14, 2015
…rectly, didn't do any of the crazy insane math stuff (99.9% of the effort here)
@lpeabody
Copy link
Author

@moserware The code that throws InvalidOperationException, I'm hoping you can explain why it might be thrown? I'm not really a math guy so I'm incredibly grateful for the work you've done here. Just hoping you can explain that bit to me.

Also, any ideas what might be causing the fails in the tests to happen? The expected results vs the actual results seem to be quite close and just a little off. Thoughts on what can be done to correct?

@moserware
Copy link
Owner

@lpeabody Thanks for the interest and PR. I took a peek into this issue and discovered that this has been broken since c05b21a . I discuss the details in #7 . If that gets fixed and merged, then subsequent refinements (like PSR-4 stuff) can be made on top of that.

@Zn4rK
Copy link
Collaborator

Zn4rK commented May 31, 2016

Some of the changes I made on #12 were inspired by your PR. This PR is not applicable anymore - but thank you!

@Zn4rK Zn4rK closed this May 31, 2016
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.

7 participants