tardis-sn / tardis

TARDIS - Temperature And Radiative Diffusion In Supernovae
https://tardis-sn.github.io/tardis
202 stars 405 forks source link

Gamma ray spectra dep #2793

Open Knights-Templars opened 2 months ago

Knights-Templars commented 2 months ago

This PR refactors the packets sampling, has gamma ray and positron energy deposition, and positronium contribution to the gamma-ray spectra.

Examples, notebooks, and links to useful references.

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

tardis-bot commented 2 months ago

*beep* *bop*

Hi, human.

I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently.

Please add your name and email to .mailmap in your current branch and push the changes to this pull request.

In case you need to map an existing alias, follow this example.

tardis-bot commented 2 months ago

*beep* *bop* Hi human, I ran ruff on the latest commit (9f83760a879a508234fb77533de51723a3a63e36). Here are the outputs produced. Results can also be downloaded as artifacts here. Summarised output:

```diff 107 F405 [ ] `Abundance` may be undefined, or defined from star imports 79 W191 [ ] Indentation contains tabs 73 W291 [*] Trailing whitespace 29 I001 [*] Import block is un-sorted or un-formatted 22 F401 [*] `astropy.units` imported but unused 17 G004 [ ] Logging statement uses f-string 16 E999 [ ] SyntaxError: Expected ',', found ':' 16 W293 [*] Blank line contains whitespace 15 E902 [ ] No such file or directory (os error 2) 12 UP008 [*] Use `super()` instead of `super(__class__, self)` 10 D202 [*] No blank lines allowed after function docstring (found 1) 6 RET505 [ ] Unnecessary `elif` after `return` statement 5 E722 [ ] Do not use bare `except` 5 D411 [*] Missing blank line before section ("Parameters") 5 F821 [ ] Undefined name `DilutePlanckianRadFieldInput` 5 UP032 [*] Use f-string instead of `format` call 4 RET506 [ ] Unnecessary `elif` after `raise` statement 4 E101 [ ] Indentation contains mixed spaces and tabs 4 E712 [*] Avoid equality comparisons to `True`; use `if latex_label:` for truth checks 3 F403 [ ] `from tardis.plasma.properties import *` used; unable to detect undefined names 3 F631 [ ] Assert test is a non-empty tuple, which is always `True` 3 UP004 [*] Class `GXPacket` inherits from `object` 3 UP015 [*] Unnecessary open mode parameters 2 B018 [ ] Found useless expression. Either assign it to a variable or remove it. 2 B019 [ ] Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks 2 C403 [*] Unnecessary `list` comprehension (rewrite as a `set` comprehension) 2 C408 [*] Unnecessary `dict` call (rewrite as a literal) 2 INP001 [ ] File `tardis/io/configuration/tests/test_config_reader.py` is part of an implicit namespace package. Add an `__init__.py`. 2 E402 [ ] Module level import not at top of file 2 D201 [*] No blank lines allowed before function docstring (found 1) 2 D406 [*] Section name should end with a newline ("Returns") 2 D407 [*] Missing dashed underline after section ("Returns") 2 D412 [*] No blank lines allowed between a section header and its content ("Parameters") 2 F811 [ ] Redefinition of unused `monkeysession` from line 5 2 PGH004 [ ] Use specific rule codes when using `noqa` 2 UP030 [*] Use implicit references for positional format fields 1 ANN204 [ ] Missing return type annotation for special method `__getitem__` 1 ANN205 [ ] Missing return type annotation for staticmethod `get_relative_path` 1 S604 [ ] Function call with truthy `shell` parameter identified, security issue 1 B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. 1 B020 [ ] Loop control variable `isotope_dict` overrides iterable it iterates 1 COM818 [ ] Trailing comma on bare tuple prohibited 1 G001 [ ] Logging statement uses `str.format` 1 G010 [*] Logging statement uses `warn` instead of `warning` 1 PIE808 [*] Unnecessary `start` argument in `range` 1 PT020 [ ] `@pytest.yield_fixture` is deprecated, use `@pytest.fixture` 1 RET508 [ ] Unnecessary `else` after `break` statement 1 PTH117 [ ] `os.path.isabs()` should be replaced by `Path.is_absolute()` 1 N999 [ ] Invalid module name: 'GXPacket' 1 W292 [*] No newline at end of file 1 W605 [*] Invalid escape sequence: `\ ` 1 D209 [*] Multi-line docstring closing quotes should be on a separate line 1 F541 [*] f-string without any placeholders 1 PLW0127 [ ] Self-assignment of variable `observed_spectrum` 1 UP009 [*] UTF-8 encoding declaration is unnecessary 1 TRY300 [ ] Consider moving this statement to an `else` block ```

Complete output(might be large):

```diff .github/workflows/codestyle.yml:7:4: E999 SyntaxError: Expected an expression .github/workflows/codestyle.yml:35:8: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:44:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:46:15: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:50:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:59:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:62:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:73:26: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:77:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:85:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:96:22: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:97:89: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:99:84: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:115:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:119:1: W293 [*] Blank line contains whitespace .github/workflows/tardis-research-papers.yml:1:1: E902 No such file or directory (os error 2) .mailmap:1:38: E999 SyntaxError: Expected an expression .zenodo.json:1:1: B018 Found useless expression. Either assign it to a variable or remove it. .zenodo.json:351:2: W292 [*] No newline at end of file CHANGELOG.md:4:15: E999 SyntaxError: Expected ',', found ':' CITATION.cff:3:1: E999 SyntaxError: Invalid annotated assignment target README.rst:1:1: E999 SyntaxError: Expected a statement asv.conf.json:1:1: B018 Found useless expression. Either assign it to a variable or remove it. benchmarks/benchmark_base.py:30:9: ANN205 Missing return type annotation for staticmethod `get_relative_path` benchmarks/benchmark_base.py:77:9: RET506 Unnecessary `else` after `raise` statement benchmarks/opacities_opacity.py:7:40: F401 [*] `tardis.opacities.opacities.compton_opacity_calculation` imported but unused benchmarks/spectrum_formal_integral.py:22:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks benchmarks/transport_montecarlo_packet_trackers.py:20:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks docs/Makefile:5:16: E999 SyntaxError: Expected an expression docs/Makefile:22:1: W191 Indentation contains tabs docs/Makefile:23:1: W191 Indentation contains tabs docs/Makefile:24:1: W191 Indentation contains tabs docs/Makefile:25:1: W191 Indentation contains tabs docs/Makefile:26:1: W191 Indentation contains tabs docs/Makefile:27:1: W191 Indentation contains tabs docs/Makefile:28:1: W191 Indentation contains tabs docs/Makefile:29:1: W191 Indentation contains tabs docs/Makefile:30:1: W191 Indentation contains tabs docs/Makefile:31:1: W191 Indentation contains tabs docs/Makefile:32:1: W191 Indentation contains tabs docs/Makefile:33:1: W191 Indentation contains tabs docs/Makefile:34:1: W191 Indentation contains tabs docs/Makefile:35:1: W191 Indentation contains tabs docs/Makefile:36:1: W191 Indentation contains tabs docs/Makefile:37:1: W191 Indentation contains tabs docs/Makefile:40:1: W191 Indentation contains tabs docs/Makefile:41:1: W191 Indentation contains tabs docs/Makefile:42:1: W191 Indentation contains tabs docs/Makefile:45:1: W191 Indentation contains tabs docs/Makefile:46:1: W191 Indentation contains tabs docs/Makefile:47:1: W191 Indentation contains tabs docs/Makefile:50:1: W191 Indentation contains tabs docs/Makefile:51:1: W191 Indentation contains tabs docs/Makefile:52:1: W191 Indentation contains tabs docs/Makefile:55:1: W191 Indentation contains tabs docs/Makefile:56:1: W191 Indentation contains tabs docs/Makefile:57:1: W191 Indentation contains tabs docs/Makefile:60:1: W191 Indentation contains tabs docs/Makefile:61:1: W191 Indentation contains tabs docs/Makefile:62:1: W191 Indentation contains tabs docs/Makefile:65:1: W191 Indentation contains tabs docs/Makefile:66:1: W191 Indentation contains tabs docs/Makefile:67:1: W191 Indentation contains tabs docs/Makefile:70:1: W191 Indentation contains tabs docs/Makefile:71:1: W191 Indentation contains tabs docs/Makefile:72:1: W191 Indentation contains tabs docs/Makefile:73:1: W191 Indentation contains tabs docs/Makefile:73:1: E101 Indentation contains mixed spaces and tabs docs/Makefile:76:1: W191 Indentation contains tabs docs/Makefile:77:1: W191 Indentation contains tabs docs/Makefile:78:1: W191 Indentation contains tabs docs/Makefile:79:1: W191 Indentation contains tabs docs/Makefile:79:1: E101 Indentation contains mixed spaces and tabs docs/Makefile:80:1: W191 Indentation contains tabs docs/Makefile:81:1: W191 Indentation contains tabs docs/Makefile:82:1: W191 Indentation contains tabs docs/Makefile:85:1: W191 Indentation contains tabs docs/Makefile:86:1: W191 Indentation contains tabs docs/Makefile:87:1: W191 Indentation contains tabs docs/Makefile:88:1: W191 Indentation contains tabs docs/Makefile:89:1: W191 Indentation contains tabs docs/Makefile:90:1: W191 Indentation contains tabs docs/Makefile:91:1: W191 Indentation contains tabs docs/Makefile:94:1: W191 Indentation contains tabs docs/Makefile:95:1: W191 Indentation contains tabs docs/Makefile:96:1: W191 Indentation contains tabs docs/Makefile:99:1: W191 Indentation contains tabs docs/Makefile:100:1: W191 Indentation contains tabs docs/Makefile:101:1: W191 Indentation contains tabs docs/Makefile:102:1: W191 Indentation contains tabs docs/Makefile:103:1: W191 Indentation contains tabs docs/Makefile:103:1: E101 Indentation contains mixed spaces and tabs docs/Makefile:106:1: W191 Indentation contains tabs docs/Makefile:107:1: W191 Indentation contains tabs docs/Makefile:108:1: W191 Indentation contains tabs docs/Makefile:109:1: W191 Indentation contains tabs docs/Makefile:112:1: W191 Indentation contains tabs docs/Makefile:113:1: W191 Indentation contains tabs docs/Makefile:114:1: W191 Indentation contains tabs docs/Makefile:117:1: W191 Indentation contains tabs docs/Makefile:118:1: W191 Indentation contains tabs docs/Makefile:119:1: W191 Indentation contains tabs docs/Makefile:122:1: W191 Indentation contains tabs docs/Makefile:123:1: W191 Indentation contains tabs docs/Makefile:124:1: W191 Indentation contains tabs docs/Makefile:127:1: W191 Indentation contains tabs docs/Makefile:128:1: W191 Indentation contains tabs docs/Makefile:129:1: W191 Indentation contains tabs docs/Makefile:130:1: W191 Indentation contains tabs docs/Makefile:130:1: E101 Indentation contains mixed spaces and tabs docs/Makefile:133:1: W191 Indentation contains tabs docs/Makefile:134:1: W191 Indentation contains tabs docs/conf.py:1:1: UP009 [*] UTF-8 encoding declaration is unnecessary docs/conf.py:28:1: I001 [*] Import block is un-sorted or un-formatted docs/conf.py:31:8: F401 [*] `tardis` imported but unused docs/conf.py:37:43: PGH004 Use specific rule codes when using `noqa` docs/conf.py:47:6: UP015 [*] Unnecessary open mode parameters docs/conf.py:68:1: F405 `exclude_patterns` may be undefined, or defined from star imports docs/conf.py:69:1: F405 `exclude_patterns` may be undefined, or defined from star imports docs/conf.py:70:1: F405 `exclude_patterns` may be undefined, or defined from star imports docs/conf.py:71:1: F405 `exclude_patterns` may be undefined, or defined from star imports docs/conf.py:72:1: F405 `exclude_patterns` may be undefined, or defined from star imports docs/conf.py:139:1: W293 Blank line contains whitespace docs/conf.py:174:1: W293 Blank line contains whitespace docs/conf.py:191:13: UP030 Use implicit references for positional format fields docs/conf.py:191:13: UP032 [*] Use f-string instead of `format` call docs/conf.py:218:1: E402 Module level import not at top of file docs/conf.py:291:4: E712 Avoid equality comparisons to `True`; use `if toml_config_tool_dict["tardis"]['edit_on_github']:` for truth checks docs/conf.py:352:1: E402 Module level import not at top of file docs/conf.py:367:10: UP015 [*] Unnecessary open mode parameters, use ""w"" docs/conf.py:382:10: UP015 [*] Unnecessary open mode parameters, use ""w"" docs/contributing/development/code_quality.rst:1:1: E999 SyntaxError: Expected an expression docs/contributing/development/continuous_integration.rst:1:1: E999 SyntaxError: Expected a statement docs/contributing/development/continuous_integration.rst:43:71: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:47:76: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:49:68: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:67:11: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:150:68: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:187:78: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:267:24: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:308:69: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:318:61: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:333:85: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:336:53: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:353:90: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:360:78: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:361:94: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:362:83: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:363:96: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:365:97: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:366:62: W291 [*] Trailing whitespace docs/contributing/development/continuous_integration.rst:373:90: W291 [*] Trailing whitespace docs/contributing/development/documentation_guidelines.rst:1:1: E999 SyntaxError: Expected a statement docs/contributing/development/documentation_guidelines.rst:44:1: W293 [*] Blank line contains whitespace docs/contributing/development/documentation_guidelines.rst:58:10: W291 [*] Trailing whitespace docs/contributing/development/git_workflow.rst:1:1: E999 SyntaxError: Expected a statement docs/contributing/development/running_tests.rst:1:1: E999 SyntaxError: Expected a statement docs/contributing/development/running_tests.rst:8:90: COM818 Trailing comma on bare tuple prohibited docs/contributing/development/running_tests.rst:41:42: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:64:112: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:65:124: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:69:92: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:70:107: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:76:102: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:78:116: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:80:124: W291 [*] Trailing whitespace docs/contributing/development/running_tests.rst:92:62: W291 [*] Trailing whitespace docs/contributing/development/update_refdata.rst:1:1: E999 SyntaxError: Expected a statement docs/contributing/development/update_refdata.rst:12:105: W291 [*] Trailing whitespace docs/installation.rst:1:1: E999 SyntaxError: Expected a statement docs/installation.rst:9:1: W293 [*] Blank line contains whitespace docs/installation.rst:10:84: W291 [*] Trailing whitespace docs/installation.rst:11:109: W291 [*] Trailing whitespace docs/installation.rst:14:116: W291 [*] Trailing whitespace docs/installation.rst:15:133: W291 [*] Trailing whitespace docs/installation.rst:27:67: W291 [*] Trailing whitespace docs/installation.rst:59:1: W293 [*] Blank line contains whitespace docs/installation.rst:66:19: W291 [*] Trailing whitespace docs/installation.rst:69:1: W293 [*] Blank line contains whitespace docs/installation.rst:86:102: W291 [*] Trailing whitespace docs/io/configuration/components/supernova.rst:1:1: E999 SyntaxError: Expected a statement docs/io/configuration/components/supernova.rst:13:266: W291 [*] Trailing whitespace docs/io/configuration/components/supernova.rst:16:1: W293 [*] Blank line contains whitespace docs/io/output/how_to_rpacket_tracking.ipynb:cell 12:1:62: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:1:1: E999 SyntaxError: Expected an expression docs/io/visualization/using_widgets.rst:7:83: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:15:69: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:23:76: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:24:41: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:26:77: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:29:79: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:39:75: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:40:79: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:41:78: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:42:75: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:43:75: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:51:77: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:52:79: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:53:73: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:54:71: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:62:74: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:63:76: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:71:80: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:72:79: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:80:78: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:81:77: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:82:77: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:109:48: W291 [*] Trailing whitespace docs/io/visualization/using_widgets.rst:161:77: W291 [*] Trailing whitespace docs/physics/montecarlo/initialization.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted docs/physics/montecarlo/initialization.ipynb:cell 2:4:5: F401 [*] `tardis.transport.montecarlo.packet_collections.PacketCollection` imported but unused docs/physics/plasma/construction_simple_plasma.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted docs/physics/plasma/construction_simple_plasma.ipynb:cell 5:1:8: F821 Undefined name `DilutePlanckianRadFieldInput` docs/physics/setup/model.ipynb:cell 2:2:1: I001 [*] Import block is un-sorted or un-formatted docs/physics/setup/model.ipynb:cell 25:19:12: F541 [*] f-string without any placeholders docs/physics/update_and_conv/update_and_conv.ipynb:cell 7:1:1: I001 [*] Import block is un-sorted or un-formatted docs/physics/update_and_conv/update_and_conv.ipynb:cell 18:1:69: W291 [*] Trailing whitespace docs/physics/update_and_conv/update_and_conv.ipynb:cell 26:1:50: W291 [*] Trailing whitespace docs/resources/credits.rst:1:1: E999 SyntaxError: Expected a statement docs/resources/research_done_using_TARDIS/ads.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted docs/resources/research_done_using_TARDIS/ads.ipynb:cell 4:5:15: UP032 [*] Use f-string instead of `format` call docs/resources/research_done_using_TARDIS/ads.ipynb:cell 4:12:31: UP032 [*] Use f-string instead of `format` call docs/resources/research_done_using_TARDIS/ads.ipynb:cell 6:2:5: D209 [*] Multi-line docstring closing quotes should be on a separate line docs/resources/research_done_using_TARDIS/ads.ipynb:cell 6:3:110: W291 Trailing whitespace docs/resources/research_done_using_TARDIS/ads.ipynb:cell 7:7:77: W605 [*] Invalid escape sequence: `\ ` docs/resources/research_done_using_TARDIS/ads.ipynb:cell 8:4:28: UP032 [*] Use f-string instead of `format` call docs/resources/research_done_using_TARDIS/ads.ipynb:cell 8:5:34: UP032 [*] Use f-string instead of `format` call docs/resources/research_done_using_TARDIS/ads.ipynb:cell 8:6:1: W293 Blank line contains whitespace docs/resources/research_done_using_TARDIS/ads.ipynb:cell 10:1:101: W291 [*] Trailing whitespace setup.py:7:1: I001 [*] Import block is un-sorted or un-formatted tardis/conftest.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/conftest.py:11:1: F403 `from tardis.tests.fixtures.atom_data import *` used; unable to detect undefined names tardis/conftest.py:30:49: PGH004 Use specific rule codes when using `noqa` tardis/conftest.py:32:9: F821 Undefined name `pytest_report_header` tardis/conftest.py:145:5: RET505 Unnecessary `else` after `return` statement tardis/conftest.py:169:1: PT020 `@pytest.yield_fixture` is deprecated, use `@pytest.fixture` tardis/conftest.py:240:19: F405 `deepcopy` may be undefined, or defined from star imports tardis/conftest.py:249:19: F405 `deepcopy` may be undefined, or defined from star imports tardis/conftest.py:278:19: F405 `deepcopy` may be undefined, or defined from star imports tardis/energy_input/GXPacket.py:1:1: N999 Invalid module name: 'GXPacket' tardis/energy_input/GXPacket.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/GXPacket.py:41:16: UP004 [*] Class `GXPacket` inherits from `object` tardis/energy_input/GXPacket.py:75:9: D407 [*] Missing dashed underline after section ("Returns") tardis/energy_input/GXPacket.py:75:9: D406 [*] Section name should end with a newline ("Returns") tardis/energy_input/GXPacket.py:203:13: F821 Undefined name `get_chain_decay_power_per_ejectamass` tardis/energy_input/GXPacket.py:204:17: F821 Undefined name `inventory` tardis/energy_input/gamma_packet_loop.py:245:17: RET508 Unnecessary `else` after `break` statement tardis/energy_input/gamma_ray_channel.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/gamma_ray_channel.py:55:5: D411 [*] Missing blank line before section ("Returns") tardis/energy_input/gamma_ray_channel.py:112:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/gamma_ray_channel.py:174:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/gamma_ray_channel.py:211:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/gamma_ray_packet_source.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/gamma_ray_packet_source.py:2:18: F401 [*] `pandas` imported but unused tardis/energy_input/gamma_ray_packet_source.py:293:53: F821 Undefined name `positronium_continuum` tardis/energy_input/gamma_ray_packet_source.py:505:9: D201 [*] No blank lines allowed before function docstring (found 1) tardis/energy_input/gamma_ray_packet_source.py:505:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/gamma_ray_packet_source.py:508:9: D412 [*] No blank lines allowed between a section header and its content ("Parameters") tardis/energy_input/gamma_ray_packet_source.py:578:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/gamma_ray_packet_source.py:589:9: D411 [*] Missing blank line before section ("Returns") tardis/energy_input/main_gamma_ray_loop.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/main_gamma_ray_loop.py:23:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/main_gamma_ray_loop.py:103:5: D412 [*] No blank lines allowed between a section header and its content ("Returns") tardis/energy_input/main_gamma_ray_loop.py:169:17: G004 Logging statement uses f-string tardis/energy_input/main_gamma_ray_loop.py:170:17: G004 Logging statement uses f-string tardis/energy_input/main_gamma_ray_loop.py:225:17: G004 Logging statement uses f-string tardis/energy_input/main_gamma_ray_loop.py:226:17: G004 Logging statement uses f-string tardis/energy_input/main_gamma_ray_loop.py:292:5: D201 [*] No blank lines allowed before function docstring (found 1) tardis/energy_input/main_gamma_ray_loop.py:292:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/samplers.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/tests/conftest.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/tests/conftest.py:24:9: S604 Function call with truthy `shell` parameter identified, security issue tardis/energy_input/tests/test_gamma_ray_channel.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/energy_input/tests/test_gamma_ray_channel.py:8:30: F401 [*] `radioactivedecay.converters` imported but unused tardis/energy_input/tests/test_gamma_ray_channel.py:13:5: F401 [*] `tardis.energy_input.energy_source.get_nuclear_lines_database` imported but unused tardis/energy_input/tests/test_gamma_ray_channel.py:123:9: B020 Loop control variable `isotope_dict` overrides iterable it iterates tardis/energy_input/util.py:405:5: RET505 Unnecessary `elif` after `return` statement tardis/energy_input/util.py:416:5: D202 [*] No blank lines allowed after function docstring (found 1) tardis/energy_input/util.py:418:5: D411 [*] Missing blank line before section ("Parameters") tardis/gui/tests/test_gui.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/gui/tests/test_gui.py:5:25: F401 [*] `astropy.units` imported but unused tardis/gui/tests/test_gui.py:8:1: I001 [*] Import block is un-sorted or un-formatted tardis/io/atom_data/base.py:171:22: C408 Unnecessary `dict` call (rewrite as a literal) tardis/io/atom_data/base.py:172:24: C408 Unnecessary `list` call (rewrite as a literal) tardis/io/atom_data/base.py:181:34: G004 Logging statement uses f-string tardis/io/atom_data/base.py:259:17: G004 Logging statement uses f-string tardis/io/atom_data/base.py:263:21: UP030 Use implicit references for positional format fields tardis/io/atom_data/base.py:263:21: G001 Logging statement uses `str.format` tardis/io/atom_data/collision_data.py:1:1: E902 No such file or directory (os error 2) tardis/io/atom_data/macro_atom_data.py:1:1: E902 No such file or directory (os error 2) tardis/io/configuration/tests/test_config_reader.py:1:1: INP001 File `tardis/io/configuration/tests/test_config_reader.py` is part of an implicit namespace package. Add an `__init__.py`. tardis/io/configuration/tests/test_config_reader.py:2:1: I001 [*] Import block is un-sorted or un-formatted tardis/io/configuration/tests/test_config_reader.py:2:8: F401 [*] `os` imported but unused tardis/io/configuration/tests/test_config_reader.py:3:18: F401 [*] `attr.validate` imported but unused tardis/model/base.py:339:12: PTH117 `os.path.isabs()` should be replaced by `Path.is_absolute()` tardis/model/base.py:352:27: C403 Unnecessary `list` comprehension (rewrite as a `set` comprehension) tardis/model/base.py:365:27: C403 Unnecessary `list` comprehension (rewrite as a `set` comprehension) tardis/model/base.py:376:21: G004 Logging statement uses f-string tardis/opacities/continuum/continuum_state.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/macro_atom/base.py:22:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/opacities/macro_atom/base.py:133:9: E722 Do not use bare `except` tardis/opacities/macro_atom/macroatom_solver.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/macro_atom/macroatom_state.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/opacity_solver.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/opacity_state.py:109:9: ANN204 Missing return type annotation for special method `__getitem__` tardis/opacities/opacity_state.py:115:9: D407 [*] Missing dashed underline after section ("Returns") tardis/opacities/opacity_state.py:115:9: D406 [*] Section name should end with a newline ("Returns") tardis/opacities/tests/conftest.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/tests/test_opacity_solver.py:1:1: E902 No such file or directory (os error 2) tardis/opacities/tests/test_opacity_state_numba.py:1:1: E902 No such file or directory (os error 2) tardis/plasma/assembly/base.py:1:1: E902 No such file or directory (os error 2) tardis/plasma/assembly/legacy_assembly.py:1:1: E902 No such file or directory (os error 2) tardis/plasma/base.py:11:1: F403 `from tardis.plasma.properties.base import *` used; unable to detect undefined names tardis/plasma/base.py:45:9: RET505 Unnecessary `else` after `return` statement tardis/plasma/base.py:46:18: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/base.py:53:9: RET506 Unnecessary `else` after `raise` statement tardis/plasma/base.py:54:18: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/base.py:111:17: E722 Do not use bare `except` tardis/plasma/base.py:144:44: F405 `PreviousIterationProperty` may be undefined, or defined from star imports tardis/plasma/base.py:153:46: F405 `Input` may be undefined, or defined from star imports tardis/plasma/base.py:273:13: G004 Logging statement uses f-string tardis/plasma/base.py:296:20: F401 [*] `pygraphviz` imported but unused tardis/plasma/base.py:297:9: E722 Do not use bare `except` tardis/plasma/base.py:306:16: E712 Avoid equality comparisons to `True`; use `if latex_label:` for truth checks tardis/plasma/base.py:327:16: E712 Avoid equality comparisons to `True`; use `if latex_label:` for truth checks tardis/plasma/base.py:333:16: E712 Avoid equality comparisons to `True`; use `if latex_label:` for truth checks tardis/plasma/base.py:383:9: E722 Do not use bare `except` tardis/plasma/base.py:429:35: F405 `HiddenPlasmaProperty` may be undefined, or defined from star imports tardis/plasma/base.py:447:29: E722 Do not use bare `except` tardis/plasma/properties/general.py:4:30: F401 [*] `astropy.units` imported but unused tardis/plasma/properties/general.py:33:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/general.py:74:21: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/general.py:118:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/ion_population.py:206:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/ion_population.py:289:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/ion_population.py:368:25: G004 Logging statement uses f-string tardis/plasma/properties/ion_population.py:422:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/ion_population.py:489:25: G004 Logging statement uses f-string tardis/plasma/properties/nlte.py:2:8: F401 [*] `os` imported but unused tardis/plasma/properties/nlte.py:4:17: F401 [*] `numpy` imported but unused tardis/plasma/properties/nlte.py:10:53: F401 [*] `tardis.plasma.properties.ion_population.PhiSahaNebular` imported but unused tardis/plasma/properties/property_collections.py:10:1: F403 `from tardis.plasma.properties import *` used; unable to detect undefined names tardis/plasma/properties/property_collections.py:19:9: F405 `DilutePlanckianRadField` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:20:9: F405 `Abundance` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:21:9: F405 `NumberDensity` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:22:9: F405 `TimeExplosion` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:23:9: F405 `AtomicData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:24:9: F405 `JBlues` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:25:9: F405 `LinkTRadTElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:26:9: F405 `HeliumTreatment` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:27:9: F405 `ContinuumInteractionSpecies` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:28:9: F405 `NLTEIonizationSpecies` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:29:9: F405 `NLTEExcitationSpecies` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:34:9: F405 `TRadiative` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:35:9: F405 `DilutionFactor` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:36:9: F405 `BetaRadiation` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:37:9: F405 `Levels` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:38:9: F405 `Lines` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:39:9: F405 `PartitionFunction` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:40:9: F405 `GElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:41:9: F405 `IonizationData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:42:9: F405 `LinesLowerLevelIndex` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:43:9: F405 `LinesUpperLevelIndex` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:45:9: F405 `StimulatedEmissionFactor` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:46:9: F405 `SelectedAtoms` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:47:9: F405 `ElectronTemperature` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:50:55: F405 `PhiSahaLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:51:55: F405 `LevelBoltzmannFactorLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:53:6: F405 `BetaSobolev` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:53:44: F405 `MacroAtomData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:56:6: F405 `PhiSahaNebular` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:56:22: F405 `ZetaData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:56:32: F405 `BetaElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:56:46: F405 `RadiationFieldCorrection` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:59:6: F405 `LevelBoltzmannFactorDiluteLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:61:49: F405 `LevelBoltzmannFactorNoNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:64:9: F405 `LevelBoltzmannFactorNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:65:9: F405 `NLTEData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:66:9: F405 `PreviousElectronDensities` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:67:9: F405 `PreviousBetaSobolev` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:68:9: F405 `BetaSobolev` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:72:6: F405 `NLTEIndexHelper` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:72:23: F405 `NLTEPopulationSolverRoot` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:75:6: F405 `NLTEIndexHelper` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:75:23: F405 `NLTEPopulationSolverLU` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:79:9: F405 `HeliumNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:80:9: F405 `RadiationFieldCorrection` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:81:9: F405 `ZetaData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:82:9: F405 `BetaElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:83:9: F405 `LevelNumberDensityHeNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:84:9: F405 `IonNumberDensityHeNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:88:6: F405 `LevelNumberDensity` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:88:26: F405 `IonNumberDensity` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:91:6: F405 `HeliumNumericalNLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:95:9: F405 `PhotoIonRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:96:9: F405 `StimRecombRateFactor` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:97:9: F405 `BfHeatingRateCoeffEstimator` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:98:9: F405 `StimRecombCoolingRateCoeffEstimator` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:99:9: F405 `YgData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:104:9: F405 `StimRecombRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:105:9: F405 `PhotoIonizationData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:106:9: F405 `SpontRecombRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:107:9: F405 `ThermalLevelBoltzmannFactorLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:108:9: F405 `ThermalLTEPartitionFunction` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:109:9: F405 `BetaElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:110:9: F405 `ThermalGElectron` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:111:9: F405 `ThermalPhiSahaLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:112:9: F405 `SahaFactor` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:113:9: F405 `CorrPhotoIonRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:114:9: F405 `SpontRecombCoolingRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:115:9: F405 `RawRecombTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:116:9: F405 `RawPhotoIonTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:117:9: F405 `RawRadBoundBoundTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:118:9: F405 `MarkovChainTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:119:9: F405 `NonContinuumTransProbsMask` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:120:9: F405 `YgInterpolator` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:121:9: F405 `CollExcRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:122:9: F405 `CollDeexcRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:123:9: F405 `RawCollisionTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:124:9: F405 `MarkovChainIndex` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:125:9: F405 `MarkovChainTransProbsCollector` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:127:9: F405 `MonteCarloTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:128:9: F405 `FreeFreeCoolingRate` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:129:9: F405 `FreeBoundCoolingRate` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:131:9: F405 `LevelNumberDensityLTE` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:132:9: F405 `PhotoIonBoltzmannFactor` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:133:9: F405 `FreeBoundEmissionCDF` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:134:9: F405 `LevelIdxs2LineIdx` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:135:9: F405 `LevelIdxs2TransitionIdx` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:136:9: F405 `CollIonRateCoeffSeaton` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:137:9: F405 `CollRecombRateCoeff` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:139:9: F405 `ContinuumInteractionHandler` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:140:9: F405 `BetaSobolev` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:143:58: F405 `AdiabaticCoolingRate` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:146:9: F405 `RawTwoPhotonTransProbs` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:147:9: F405 `TwoPhotonData` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:148:9: F405 `TwoPhotonEmissionCDF` may be undefined, or defined from star imports tardis/plasma/properties/property_collections.py:149:9: F405 `TwoPhotonFrequencySampler` may be undefined, or defined from star imports tardis/plasma/properties/radiative_properties.py:40:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/properties/radiative_properties.py:176:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/plasma/tests/test_nlte_solver.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/plasma/tests/test_nlte_solver.py:5:25: F811 [*] Redefinition of unused `npt` from line 2 tardis/simulation/base.py:145:14: UP008 Use `super()` instead of `super(__class__, self)` tardis/simulation/base.py:187:13: RET506 Unnecessary `else` after `raise` statement tardis/simulation/base.py:251:17: G004 Logging statement uses f-string tardis/simulation/base.py:258:9: RET505 Unnecessary `else` after `return` statement tardis/simulation/base.py:439:13: G004 Logging statement uses f-string tardis/simulation/base.py:521:13: G004 Logging statement uses f-string tardis/simulation/base.py:622:25: G004 Logging statement uses f-string tardis/simulation/base.py:625:13: G004 Logging statement uses f-string tardis/simulation/base.py:630:13: G004 Logging statement uses f-string tardis/simulation/base.py:681:13: TRY300 Consider moving this statement to an `else` block tardis/simulation/base.py:683:26: G004 Logging statement uses f-string tardis/simulation/tests/test_simulation.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/simulation/tests/test_simulation.py:1:8: F401 [*] `os` imported but unused tardis/simulation/tests/test_simulation.py:6:8: F401 [*] `logging` imported but unused tardis/simulation/tests/test_simulation.py:10:20: F401 [*] `tardis.run_tardis` imported but unused tardis/simulation/tests/test_simulation.py:50:5: RET505 Unnecessary `else` after `return` statement tardis/spectrum/luminosity.py:1:1: E902 No such file or directory (os error 2) tardis/spectrum/tests/test_luminosity.py:1:1: E902 No such file or directory (os error 2) tardis/tests/test_tardis_full_formal_integral.py:61:9: RET505 Unnecessary `else` after `return` statement tardis/transport/montecarlo/base.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/estimators/tests/test_continuum_property_solver.py:1:1: INP001 File `tardis/transport/montecarlo/estimators/tests/test_continuum_property_solver.py` is part of an implicit namespace package. Add an `__init__.py`. tardis/transport/montecarlo/estimators/tests/test_continuum_property_solver.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/estimators/tests/test_continuum_property_solver.py:3:25: F401 [*] `numpy.testing` imported but unused tardis/transport/montecarlo/packet_trackers.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/packet_trackers.py:24:22: UP004 [*] Class `RPacketTracker` inherits from `object` tardis/transport/montecarlo/packet_trackers.py:27:5: D411 [*] Missing blank line before section ("Parameters") tardis/transport/montecarlo/packet_trackers.py:149:48: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. tardis/transport/montecarlo/packet_trackers.py:169:37: UP004 [*] Class `RPacketLastInteractionTracker` inherits from `object` tardis/transport/montecarlo/packet_trackers.py:172:5: D411 [*] Missing blank line before section ("Parameters") tardis/transport/montecarlo/single_packet_loop.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/tests/test_rpacket_last_interaction_tracker.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/tests/test_rpacket_tracker.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/visualization/tools/liv_plot.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/visualization/tools/liv_plot.py:25:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/visualization/tools/liv_plot.py:48:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/visualization/tools/liv_plot.py:312:13: RET506 Unnecessary `elif` after `raise` statement tardis/visualization/tools/liv_plot.py:313:24: G010 [*] Logging statement uses `warn` instead of `warning` tardis/visualization/tools/tests/test_liv_plot.py:1:1: E902 No such file or directory (os error 2) tardis/visualization/tools/tests/test_sdec_plot.py:343:17: F631 Assert test is a non-empty tuple, which is always `True` tardis/visualization/tools/tests/test_sdec_plot.py:475:13: F631 Assert test is a non-empty tuple, which is always `True` tardis/visualization/tools/tests/test_sdec_plot.py:557:13: PLW0127 Self-assignment of variable `observed_spectrum` tardis/visualization/tools/tests/test_sdec_plot.py:618:13: F631 Assert test is a non-empty tuple, which is always `True` tardis/visualization/widgets/shell_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/visualization/widgets/shell_info.py:1:25: F401 [*] `tardis.base.run_tardis` imported but unused tardis/visualization/widgets/shell_info.py:2:51: F401 [*] `tardis.io.atom_data.atom_web_download.download_atom_data` imported but unused tardis/visualization/widgets/shell_info.py:12:17: F401 [*] `numpy` imported but unused tardis/visualization/widgets/shell_info.py:299:25: PIE808 [*] Unnecessary `start` argument in `range` tardis/visualization/widgets/tests/test_shell_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/visualization/widgets/tests/test_shell_info.py:5:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused tardis/visualization/widgets/tests/test_shell_info.py:142:50: F811 Redefinition of unused `monkeysession` from line 5 Found 492 errors. [*] 179 fixable with the `--fix` option (26 hidden fixes can be enabled with the `--unsafe-fixes` option). ```
tardis-bot commented 2 months ago

*beep* *bop*

Hi, human.

I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently.

Please add your name and email to .mailmap in your current branch and push the changes to this pull request.

In case you need to map an existing alias, follow this example.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 42.41071% with 129 lines in your changes missing coverage. Please review.

Project coverage is 71.35%. Comparing base (e1aa887) to head (9f83760). Report is 30 commits behind head on master.

Files Patch % Lines
tardis/energy_input/main_gamma_ray_loop.py 15.38% 55 Missing :warning:
tardis/energy_input/gamma_ray_packet_source.py 9.09% 30 Missing :warning:
tardis/energy_input/util.py 13.63% 19 Missing :warning:
tardis/energy_input/samplers.py 44.44% 10 Missing :warning:
tardis/energy_input/gamma_ray_channel.py 69.23% 8 Missing :warning:
tardis/energy_input/gamma_packet_loop.py 0.00% 5 Missing :warning:
tardis/energy_input/GXPacket.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2793 +/- ## ========================================== + Coverage 69.98% 71.35% +1.37% ========================================== Files 196 209 +13 Lines 15008 15745 +737 ========================================== + Hits 10503 11235 +732 - Misses 4505 4510 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tardis-bot commented 2 months ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (92df2cf4777498eb3ac90156843e806df6cb7118) and the latest commit (9f83760a879a508234fb77533de51723a3a63e36). Here are the logs produced by ASV. Results can also be downloaded as artifacts here.

Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff Benchmarks that have improved: | Change | Before [b79b61ed] | After [9f83760a] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------| | | failed | 541±100ns | n/a | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | failed | 571±200ns | n/a | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | failed | 602±100ns | n/a | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | failed | 3.68±0.02ms | n/a | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | failed | 2.72±0ms | n/a | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | failed | 38.9±0.05s | n/a | run_tardis.BenchmarkRunTardis.time_run_tardis | | | failed | 1.02±0m | n/a | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | failed | 2.08±0m | n/a | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | failed | 207±0.2ns | n/a | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | failed | 1.18±0μs | n/a | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | failed | 1.44±0.4μs | n/a | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | failed | 3.42±2μs | n/a | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | failed | 43.6±40μs | n/a | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | failed | 45.7±30μs | n/a | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | failed | 785±3ns | n/a | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | failed | 1.68±0ms | n/a | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | failed | 27.4±9μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list(10, 10) | | | failed | 20.8±2μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list(10, 50) | | | failed | 26.3±5μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list(100, 10) | | | failed | 28.7±6μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list(100, 50) | | | failed | 7.52±0.01μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list(10, 10) | | | failed | 7.74±0μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list(10, 50) | | | failed | 55.7±0.1μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list(100, 10) | | | failed | 50.7±0.02μs | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list(100, 50) | | | failed | 63.9±0.5ms | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe(10, 10) | | | failed | 63.3±0.1ms | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe(10, 50) | | | failed | 62.5±0.04ms | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe(100, 10) | | | failed | 64.5±0.2ms | n/a | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe(100, 50) | | | failed | 2.63±0.3ms | n/a | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | failed | 2.94±0.5μs | n/a | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | failed | 6.16±1μs | n/a | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | failed | 7.05±2μs | n/a | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | failed | 3.29±0.6μs | n/a | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | ```

If you want to see the graph of the results, you can check it here