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

Overrides check #257

Merged
merged 36 commits into from
Jan 15, 2024
Merged

Overrides check #257

merged 36 commits into from
Jan 15, 2024

Conversation

Christian-B
Copy link
Member

@Christian-B Christian-B commented Dec 19, 2023

This pr is in a few parts.

  1. overrides method now checks that the parameters are all typed.
  • Both the overidden and overriding methods are required to be fully typed.
    • Except if the overides has a adds_typing=True then only the overriding is checked
  • It does not check the types mypy does that
  • off by default but turned on by
    • call to overrides.check_types which is done in as many tests as possible
      • works well when test are run one at a time not when in parallel
    • Environment Variable TYPE_OVERRIDES
      • set by Github actions and Jenkins
  1. Improved typing in the ranged stuff

  2. Added types to many methods

Must be done after:
SpiNNakerManchester/SpiNNMan#386
SpiNNakerManchester/PACMAN#537
SpiNNakerManchester/SpiNNFrontEndCommon#1150
SpiNNakerManchester/TestBase#53
SpiNNakerManchester/sPyNNaker#1425
SpiNNakerManchester/SupportScripts#67
SpiNNakerManchester/SpiNNakerGraphFrontEnd#268
SpiNNakerManchester/SpiNNGym#86
SpiNNakerManchester/MarkovChainMonteCarlo#60
SpiNNakerManchester/SpiNNaker_PDP2#84
SpiNNakerManchester/SupportScripts#67
SpiNNakerManchester/sPyNNakerNewModelTemplate#110

Tested by:
SpiNNakerManchester/IntegrationTests#255

@Christian-B
Copy link
Member Author

SpiNNakerManchester/SpiNNMachine#233 was used to test the error came in the correct place.

http://apollo.cs.man.ac.uk:8080/blue/organizations/jenkins/Integration%20Tests/detail/overrides_check/1/pipeline/
Shows what happened the CI env was used
failed on Spynnaker.setup which was too early

http://apollo.cs.man.ac.uk:8080/blue/organizations/jenkins/Integration%20Tests/detail/overrides_check/4/pipeline/
Shows it failing in the correct place

@coveralls
Copy link

coveralls commented Dec 20, 2023

Coverage Status

coverage: 88.179% (-0.2%) from 88.391%
when pulling fb779e0 on overrides_check
into 1aae7f5 on master.

Copy link
Member

@rowleya rowleya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - consider this approval of the rest if the test passes!

@Christian-B Christian-B merged commit e13f213 into master Jan 15, 2024
9 checks passed
@Christian-B Christian-B deleted the overrides_check branch January 15, 2024 16:53
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.

None yet

3 participants