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

Fix issue MacOS: csv_as_enclosure_json.py is not calculating weight #10 #12

Merged
merged 2 commits into from
Dec 31, 2021
Merged

Fix issue MacOS: csv_as_enclosure_json.py is not calculating weight #10 #12

merged 2 commits into from
Dec 31, 2021

Conversation

wonderbird
Copy link
Contributor

@wonderbird wonderbird commented Dec 29, 2021

Summary

Fix issue MacOS: csv_as_enclosure_json.py is not calculating weight #10 and
document Python compatibility in README.md

See issue [#10](#10)

On macOS, cloc saves file paths with leading "./" while
code-maat leaves this prefix out.

As a consequence all weights are set to 0.0 because
the normalized_weight_for(module_name) never finds
a match.

The bugfix removes a leading "./" prefix, if it exists,
when initializing a StructuralElement.

Note: This fix combines the associated bugfix on branch python3
into a single commit.
@wonderbird wonderbird changed the title Fix issue #10 Fix issue MacOS: csv_as_enclosure_json.py is not calculating weight #10 Dec 29, 2021
@wonderbird
Copy link
Contributor Author

Hi @adamtornhill,

after having merged this PR and PR #11 I suggest to merge master into python3.

This will

  • bring the README.md to the python3 branch
  • let you resolve the merge conflict in transform/csv_as_enclosure_json.py which will happen because of the different code styles. To resolve the conflict, just keep the file version of the python3 branch.

Best,
wonderbird

@adamtornhill adamtornhill merged commit 87b6fa2 into adamtornhill:master Dec 31, 2021
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.

2 participants