idaholab / MontePy

MontePy is the most user friendly Python library (API) to read, edit, and write MCNP input files.
https://www.montepy.org/
MIT License
33 stars 8 forks source link

Resolve "Improve object printing" - [merged] #253

Closed MicahGale closed 10 months ago

MicahGale commented 2 years ago

Merges 41-improve-object-printing -> develop

Objects to be Updated

  1. [x] cells
  2. [x] cell_data_control
  3. [x] cell
  4. [x] materials
  5. [x] material
  6. [x] ~mcnp_card~
  7. [x] mcnp_problem
  8. [x] surfaces
  9. [x] particle
  10. [x] importance
  11. [x] isotope
  12. [x] material_component
  13. [x] mode
  14. [x] thermal_scattering
  15. [x] transform
  16. [x] volume
  17. [x] block_type
  18. [x] Card
  19. [x] Jump
  20. [x] Comment
  21. [x] Read Card
  22. [x] surface
  23. [x] Element

Closes #41

MicahGale commented 2 years ago

unassigned @MicahGale

MicahGale commented 2 years ago

marked the checklist item volume as completed

MicahGale commented 2 years ago

marked the checklist item importance as completed

MicahGale commented 2 years ago

marked the checklist item cells as completed

MicahGale commented 2 years ago

marked the checklist item materials as completed

MicahGale commented 2 years ago

marked the checklist item surfaces as completed

MicahGale commented 2 years ago

added 2 commits

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item cell_data_control as completed

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item particle as completed

MicahGale commented 2 years ago

marked the checklist item mode as completed

MicahGale commented 2 years ago

marked the checklist item Jump as completed

MicahGale commented 2 years ago

marked the checklist item Card as completed

MicahGale commented 2 years ago

marked the checklist item Comment as completed

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

added 4 commits

Compare with previous version

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item Read Card as completed

MicahGale commented 2 years ago

marked the checklist item block_type as completed

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item cell as completed

MicahGale commented 2 years ago

added 3 commits

Compare with previous version

MicahGale commented 2 years ago

added 3 commits

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item material as completed

MicahGale commented 2 years ago

marked the checklist item mcnp_card as completed

MicahGale commented 2 years ago

marked the checklist item Element as completed

MicahGale commented 2 years ago

marked the checklist item isotope as completed

MicahGale commented 2 years ago

added 2 commits

Compare with previous version

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item material_component as completed

MicahGale commented 2 years ago

marked the checklist item thermal_scattering as completed

MicahGale commented 2 years ago

marked the checklist item surface as completed

MicahGale commented 2 years ago

added 3 commits

Compare with previous version

MicahGale commented 2 years ago

marked the checklist item transform as completed

MicahGale commented 2 years ago

marked the checklist item mcnp_problem as completed

MicahGale commented 2 years ago

added 2 commits

Compare with previous version

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

added 1 commit

Compare with previous version

MicahGale commented 2 years ago

added 7 commits

Compare with previous version

MicahGale commented 2 years ago

marked this merge request as ready

MicahGale commented 2 years ago

requested review from @tjlaboss

MicahGale commented 2 years ago

I think the new Element class will need the most amount of review.

MicahGale commented 2 years ago

In GitLab by @tjlaboss on Oct 25, 2022, 14:12

Commented on mcnpy/data_cards/element.py line 293

Does capitalization matter? If so, correct "Rhenium".

MicahGale commented 2 years ago

In GitLab by @tjlaboss on Oct 25, 2022, 14:12

Commented on mcnpy/data_cards/isotope.py line 86

Representing with the .library syntax might be confusing.

Also suggest aligning with:

f"{self._ZAID:>6}"
# or
f"{self.element.symbol:>3}-{self.A:<3}"
MicahGale commented 2 years ago

In GitLab by @tjlaboss on Oct 25, 2022, 14:12

Commented on tests/test_material.py line 75

See above. Basically I think this should either stick with ZAID.suffix, or else distinguish the library some other way.

Maybe printed as

  H-1  (80c) 0.5
  O-16 (80c) 0.5
MicahGale commented 2 years ago

In GitLab by @tjlaboss on Oct 25, 2022, 14:12

There is one typo to fix before merging.

I have opinions on the Isotope printing that are optional.

MicahGale commented 2 years ago

good catch. I am trying for everything to lower case.

MicahGale commented 2 years ago

Oh I do like your format for printing it. I think I'll implement that. The library information is till present and usable but not obnoxious.

MicahGale commented 2 years ago

changed this line in version 16 of the diff

MicahGale commented 2 years ago

changed this line in version 16 of the diff