Skip to content

Conversion scripts#149

Closed
yardasol wants to merge 27 commits intoarfc:masterfrom
yardasol:conversion-scripts
Closed

Conversion scripts#149
yardasol wants to merge 27 commits intoarfc:masterfrom
yardasol:conversion-scripts

Conversation

@yardasol
Copy link
Copy Markdown
Contributor

@yardasol yardasol commented Mar 30, 2022

Summary of changes

This PR adds scripts that convert Serpent material and geometry files to OpenMC material and Geometry files.

Specifically, this PR adds:

  • Two scripts (including instructions on how to use them in README files):
    1. scripts/preprocessors/generate_mat_composition/convert_material_serpent_to_openmc.py, that converts a serpent-formatted material file to an openmc-formatted material file.
    2. scripts/preprocessprs/generate_geometry/converte_geometry_serpent_to_openmc.py, that converts a serpent-formatted geometry file to an openmc-formatted geometry file.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Required for Merging

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • My change is a source code change
    • I have added/modified tests to cover my changes
    • I have explained why my change does not require new/modified tests
  • My change is a user-facing change
    • I have recorded my changes in the changelog for the upcoming release
  • My change is exclusively related to the repository (e.g. GitHub actions workflows, PR/issue templates, etc.)
    • I have verified or justified that my change will work as intended.
  • All new and existing tests passed.
    • CI tests pass
    • Local tests pass (including Serpent2 integration tests)

Associated Issues and PRs

  • Issue: #

Associated Developers

  • Dev: @

Checklist for Reviewers

Reviewers should use this link to get to the
Review Checklist before they begin their review.

@pep8speaks
Copy link
Copy Markdown
Contributor

pep8speaks commented Mar 30, 2022

Hello @yardasol! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 12:1: E302 expected 2 blank lines, found 1

Line 5:1: E302 expected 2 blank lines, found 1
Line 16:1: E302 expected 2 blank lines, found 1
Line 59:80: E501 line too long (85 > 79 characters)
Line 85:80: E501 line too long (82 > 79 characters)
Line 106:5: E303 too many blank lines (2)
Line 111:5: E303 too many blank lines (2)
Line 116:5: E303 too many blank lines (2)
Line 121:5: E303 too many blank lines (2)
Line 126:80: E501 line too long (83 > 79 characters)
Line 129:5: E303 too many blank lines (2)
Line 139:80: E501 line too long (83 > 79 characters)
Line 142:5: E303 too many blank lines (2)
Line 149:5: E303 too many blank lines (2)
Line 151:64: E231 missing whitespace after ','
Line 151:68: E231 missing whitespace after ','
Line 155:5: E303 too many blank lines (2)
Line 162:5: E303 too many blank lines (2)
Line 164:80: E501 line too long (109 > 79 characters)
Line 168:5: E303 too many blank lines (2)
Line 196:16: E111 indentation is not a multiple of four
Line 196:16: E117 over-indented
Line 201:5: E303 too many blank lines (2)
Line 217:10: E231 missing whitespace after ','
Line 217:12: E231 missing whitespace after ','
Line 232:18: E231 missing whitespace after ','
Line 232:20: E231 missing whitespace after ','
Line 235:5: E303 too many blank lines (2)
Line 247:80: E501 line too long (89 > 79 characters)
Line 253:5: E303 too many blank lines (2)
Line 326:17: E741 ambiguous variable name 'l'
Line 347:5: E303 too many blank lines (2)
Line 369:27: E128 continuation line under-indented for visual indent
Line 423:13: E741 ambiguous variable name 'l'
Line 490:15: E225 missing whitespace around operator
Line 511:27: E231 missing whitespace after ','
Line 511:29: E231 missing whitespace after ','
Line 518:27: E231 missing whitespace after ','
Line 518:29: E231 missing whitespace after ','
Line 525:27: E231 missing whitespace after ','
Line 525:29: E231 missing whitespace after ','
Line 532:9: E303 too many blank lines (2)
Line 562:5: E303 too many blank lines (2)
Line 574:5: E303 too many blank lines (2)
Line 587:1: E303 too many blank lines (3)
Line 617:30: E231 missing whitespace after ','
Line 624:11: E231 missing whitespace after ','
Line 626:25: E231 missing whitespace after ','
Line 626:27: E231 missing whitespace after ','
Line 643:5: E303 too many blank lines (2)
Line 644:58: E222 multiple spaces after operator
Line 647:5: E303 too many blank lines (2)
Line 681:11: E231 missing whitespace after ','
Line 681:14: E231 missing whitespace after ','
Line 685:53: E231 missing whitespace after ','
Line 685:59: E231 missing whitespace after ','
Line 685:67: E231 missing whitespace after ','
Line 685:73: E231 missing whitespace after ','
Line 685:80: E501 line too long (92 > 79 characters)
Line 689:5: E303 too many blank lines (2)
Line 693:5: E303 too many blank lines (2)

Line 1:23: W605 invalid escape sequence '.'
Line 2:30: W605 invalid escape sequence '\s'
Line 2:38: W605 invalid escape sequence '\s'
Line 3:29: W605 invalid escape sequence '\s'
Line 4:21: W605 invalid escape sequence '\s'
Line 4:27: W605 invalid escape sequence '\s'
Line 5:24: W605 invalid escape sequence '\s'
Line 5:39: W605 invalid escape sequence '\s'
Line 5:52: W605 invalid escape sequence '\s'
Line 6:18: W605 invalid escape sequence '\s'
Line 7:26: W605 invalid escape sequence '\s'
Line 8:26: W605 invalid escape sequence '\s'
Line 8:45: W605 invalid escape sequence '\s'
Line 8:52: W605 invalid escape sequence '\s'
Line 9:26: W605 invalid escape sequence '\s'
Line 9:45: W605 invalid escape sequence '\s'
Line 10:24: W605 invalid escape sequence '\s'
Line 10:27: W605 invalid escape sequence '-'
Line 10:30: W605 invalid escape sequence ':'
Line 10:33: W605 invalid escape sequence '#'
Line 11:23: W605 invalid escape sequence '\s'
Line 11:30: W605 invalid escape sequence '\s'
Line 12:23: W605 invalid escape sequence '\s'
Line 12:30: W605 invalid escape sequence '\s'
Line 12:45: W605 invalid escape sequence '\s'
Line 12:55: W605 invalid escape sequence '\s'
Line 12:59: W605 invalid escape sequence '\s'
Line 14:26: W605 invalid escape sequence '\s'
Line 14:37: W605 invalid escape sequence '\s'
Line 14:53: W605 invalid escape sequence '\s'
Line 15:23: W605 invalid escape sequence '\s'
Line 18:22: W605 invalid escape sequence '\s'
Line 18:37: W605 invalid escape sequence '\s'
Line 18:51: W605 invalid escape sequence '\s'
Line 19:13: W605 invalid escape sequence '\s'
Line 19:30: W605 invalid escape sequence '\s'
Line 19:56: W605 invalid escape sequence '\s'
Line 22:29: W605 invalid escape sequence '\s'
Line 22:51: W605 invalid escape sequence '\s'
Line 22:76: W605 invalid escape sequence '\s'
Line 22:80: E501 line too long (81 > 79 characters)
Line 62:1: W391 blank line at end of file

Line 68:1: E302 expected 2 blank lines, found 1
Line 233:28: E225 missing whitespace around operator
Line 252:28: E225 missing whitespace around operator
Line 256:45: E116 unexpected indentation (comment)
Line 257:45: E116 unexpected indentation (comment)
Line 358:21: E261 at least two spaces before inline comment
Line 358:22: E262 inline comment should start with '# '
Line 359:9: E731 do not assign a lambda expression, use a def
Line 359:32: E203 whitespace before ':'
Line 360:9: E731 do not assign a lambda expression, use a def
Line 360:32: E203 whitespace before ':'
Line 360:42: E231 missing whitespace after ','
Line 362:9: E731 do not assign a lambda expression, use a def
Line 362:32: E203 whitespace before ':'
Line 363:9: E731 do not assign a lambda expression, use a def
Line 363:32: E203 whitespace before ':'
Line 366:13: E731 do not assign a lambda expression, use a def
Line 366:36: E203 whitespace before ':'
Line 367:13: E731 do not assign a lambda expression, use a def
Line 367:36: E203 whitespace before ':'
Line 369:13: E731 do not assign a lambda expression, use a def
Line 369:36: E203 whitespace before ':'
Line 370:13: E731 do not assign a lambda expression, use a def
Line 370:36: E203 whitespace before ':'
Line 371:23: E261 at least two spaces before inline comment
Line 371:24: E262 inline comment should start with '# '
Line 372:9: E731 do not assign a lambda expression, use a def
Line 372:32: E203 whitespace before ':'
Line 372:42: E231 missing whitespace after ','
Line 372:44: E231 missing whitespace after ','
Line 372:46: E231 missing whitespace after ','
Line 373:9: E731 do not assign a lambda expression, use a def
Line 373:32: E203 whitespace before ':'
Line 373:42: E231 missing whitespace after ','
Line 373:44: E231 missing whitespace after ','
Line 373:46: E231 missing whitespace after ','
Line 449:80: E501 line too long (83 > 79 characters)
Line 517:14: W605 invalid escape sequence '\s'
Line 517:31: W605 invalid escape sequence '\s'
Line 517:33: W605 invalid escape sequence '+'
Line 659:5: E265 block comment should start with '# '
Line 661:5: E265 block comment should start with '# '
Line 663:5: E265 block comment should start with '# '
Line 674:5: E265 block comment should start with '# '
Line 676:5: E265 block comment should start with '# '
Line 678:5: E265 block comment should start with '# '
Line 690:5: E303 too many blank lines (2)
Line 705:8: E111 indentation is not a multiple of four
Line 705:62: E231 missing whitespace after ','
Line 706:8: E111 indentation is not a multiple of four
Line 706:46: E231 missing whitespace after ','
Line 707:8: E111 indentation is not a multiple of four
Line 708:8: E111 indentation is not a multiple of four
Line 709:8: E111 indentation is not a multiple of four
Line 711:8: E111 indentation is not a multiple of four
Line 713:5: E266 too many leading '#' for block comment
Line 716:5: E265 block comment should start with '# '
Line 722:5: E265 block comment should start with '# '

Line 163:9: E265 block comment should start with '# '
Line 189:9: E265 block comment should start with '# '
Line 190:9: E265 block comment should start with '# '
Line 191:9: E265 block comment should start with '# '
Line 192:9: E265 block comment should start with '# '
Line 225:1: E265 block comment should start with '# '

Line 63:9: E303 too many blank lines (2)
Line 77:77: E261 at least two spaces before inline comment
Line 77:80: E501 line too long (115 > 79 characters)
Line 86:9: E265 block comment should start with '# '
Line 101:80: E501 line too long (85 > 79 characters)
Line 116:80: E501 line too long (96 > 79 characters)

Comment last updated at 2022-09-13 19:53:33 UTC

@yardasol
Copy link
Copy Markdown
Contributor Author

Closing because I don't think this is relevant to the scope of the work anymore.

@yardasol yardasol closed this May 22, 2024
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