Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

More linting #37

Merged
merged 13 commits into from
Feb 22, 2018
Merged

More linting #37

merged 13 commits into from
Feb 22, 2018

Conversation

dkfellows
Copy link
Member

The DSG's exceptions really don't need to be hugely long; Python really does ultimately know their full names, so putting “DataSpecification” in each of them is almost always just verbose without being informative. (The only ones with the prefix in the name necessarily would otherwise be called Exception or SyntaxError, which are just a bit too generic.)

I've double-checked on github and it looks like nobody really checks for
what the detail of exceptions out of the DSG are. Changing the names of
the exceptions (to remove “DataSpecification” as a common name prefix,
which was just annoying verbosity) is therefore reasonably safe.
@dkfellows
Copy link
Member Author

Note that this PR breaks sPyNNaker until the linting-related PR for that is done. (The breakage is due to a change to the name of an exception.)

@coveralls
Copy link

coveralls commented Feb 13, 2018

Pull Request Test Coverage Report for Build 393

  • 350 of 422 (82.94%) changed or added relevant lines in 9 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+5.8%) to 94.11%

Changes Missing Coverage Covered Lines Changed/Added Lines %
data_specification/utility_calls.py 16 18 88.89%
data_specification/memory_region_collection.py 13 15 86.67%
data_specification/exceptions.py 39 52 75.0%
data_specification/data_specification_executor_functions.py 29 44 65.91%
data_specification/data_specification_generator.py 245 285 85.96%
Files with Coverage Reduction New Missed Lines %
data_specification/data_specification_executor_functions.py 2 86.33%
data_specification/data_specification_generator.py 4 94.97%
Totals Coverage Status
Change from base Build 373: 5.8%
Covered Lines: 1406
Relevant Lines: 1494

💛 - Coveralls

Fixes bug in execute_set_wr_ptr, which was taking where to move to from
the wrong part of the command word in some cases.
write_array can now write all integer and floating point types (would
love to have fixed-point types too…)
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

@@ -273,7 +272,7 @@ def execute_set_wr_ptr(self, cmd):
if self.use_src1_reg == 1:

# the data is a register
future_address = self.registers[self.dest_reg]
future_address = self.registers[self.src1_reg]
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@rowleya rowleya merged commit e87db85 into master Feb 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants