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

Clean the buffering strategies code and provide example models #335

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

lesquoyb
Copy link
Contributor

No description provided.

…ngController instead

- also normalizes method names and remove a few warnings
- removes unused save method in csvsaver
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.01 (7.97 -> 7.98)

  • Improving Code Health: 1 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

@@ -104,41 +104,6 @@ public class GAMA {
// hqnghi: add several controllers to have multi-thread experiments
private static final List<IExperimentController> controllers = new CopyOnWriteArrayList<>();

private static final BufferingController bufferingController = new BufferingController();

Choose a reason for hiding this comment

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

ℹ Getting worse: Primitive Obsession
The ratio of primitive types in function arguments increases from 30.51% to 39.13%, threshold = 30.0%

@@ -124,7 +123,7 @@ public void save(final IScope scope, final IExpression item, final File file, fi
sb.append(Strings.LN);
}
if (itemType.id() == IType.MATRIX) {
GamaMatrix<?> matrix = (GamaMatrix) value;
GamaMatrix<?> matrix = (GamaMatrix<?>) value;

Choose a reason for hiding this comment

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

ℹ Getting worse: Complex Method
save increases in cyclomatic complexity from 20 to 21, threshold = 9

Comment on lines -156 to -159
private void save(final IScope scope, final File file, final boolean header, final IExpression item, final BufferingStrategies bufferingStrategy)
throws GamaRuntimeException {

}

Choose a reason for hiding this comment

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

✅ No longer an issue: Excess Number of Function Arguments
save is no longer above the threshold for number of arguments

@lesquoyb lesquoyb merged commit c5cc721 into 2024-06 Sep 23, 2024
6 checks passed
@lesquoyb lesquoyb deleted the clean-buffering branch September 23, 2024 08:30
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.

1 participant