-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Porting the line ID tool from tardisanalysis #1890
Conversation
Before a pull request is accepted, it must meet the following criteria:
|
I moved this tool and the opacities.py tool to a folder titled 'analysis_tools' - that's why 2 new files are appearing instead of 1 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1890 +/- ##
==========================================
- Coverage 67.80% 62.55% -5.26%
==========================================
Files 177 68 -109
Lines 14534 7127 -7407
==========================================
- Hits 9855 4458 -5397
+ Misses 4679 2669 -2010 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @jamesgillanders - this looks like a nice addition. I've few comments - let me know if you need help with any of it.
Besides, could you please create a notebook (or rst file) to demonstrate the use of this tool so that it shows up on docs. Having unit-tests will also be nice but I think we might wanna save them for another PR.
tardis/analysis_tools/line_ID.py
Outdated
f = open(output_filename, "w") | ||
f.write( | ||
f"# Line Transitions in Wavelength Range " | ||
f"{self.lam_min.value:.1f} - {self.lam_max.value:.1f}" | ||
f" Angstroms\n" | ||
) | ||
dataframe.to_csv(f, sep="\t", index=False) | ||
f.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f = open(output_filename, "w") | |
f.write( | |
f"# Line Transitions in Wavelength Range " | |
f"{self.lam_min.value:.1f} - {self.lam_max.value:.1f}" | |
f" Angstroms\n" | |
) | |
dataframe.to_csv(f, sep="\t", index=False) | |
f.close() | |
with open(output_filename, "w") as f: | |
f.write( | |
f"# Line Transitions in Wavelength Range " | |
f"{self.lam_min.value:.1f} - {self.lam_max.value:.1f}" | |
f" Angstroms\n" | |
) | |
dataframe.to_csv(f, sep="\t", index=False) |
It's cleaner to do file operations this way. It ensures auto-closing.
tardis/analysis_tools/line_ID.py
Outdated
dataframe_collapsed = dataframe.groupby(["Species"]).sum() | ||
dataframe_collapsed = dataframe_collapsed.sort_values( | ||
by=["Total no. of transitions"], ascending=False | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this reuses dataframe
that we have calculated already in previous if
block, let's put it in above block after L245.
tardis/analysis_tools/line_ID.py
Outdated
f = open( | ||
f"{output_filename[:-4]}_collapsed{output_filename[-4:]}", "w" | ||
) | ||
f.write( | ||
f"# Line Transitions in Wavelength Range " | ||
f"{self.lam_min.value:.1f} - {self.lam_max.value:.1f}" | ||
f" Angstroms\n" | ||
) | ||
dataframe_collapsed.to_csv(f, sep="\t", index=True) | ||
f.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will move above as well. While doing so, can you please change it to with
syntax like I suggested in earlier comment?
tardis/analysis_tools/line_ID.py
Outdated
self.lam_max = lam_max | ||
|
||
def plot_summary( | ||
self, nlines=None, lam_min=None, lam_max=None, output_filename=None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should separate out line contributions file writing from plot_summary()
by creating another method like save_summary()
. It's not clear to me why it has to be done in plotting function - let me know if I'm missing something
tardis/analysis_tools/line_ID.py
Outdated
self._lines_ids = None | ||
self._lines_ids_unique = None | ||
|
||
@property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add docstring to this non-private property (an others below it) so that docstring coverage pipeline passes?
tardis/analysis_tools/line_ID.py
Outdated
def plot_summary( | ||
self, nlines=None, lam_min=None, lam_max=None, output_filename=None | ||
): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A docstring should be added here as well, not only because of pipeline but because it's most important function of this class.
tardis/analysis_tools/line_ID.py
Outdated
from tardis.visualization.tools.sdec_plot import SDECData | ||
|
||
|
||
class line_identifier: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class line_identifier: | |
class LineIdentifier(object): |
blatant PEP 8 violation 🤣
tardis/analysis_tools/opacities.py
Outdated
logger = logging.getLogger(__name__) | ||
|
||
|
||
class opacity_calculator(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class opacity_calculator(object): | |
class OpacityCalculator: |
I will revisit this soon and try to get it to a merge-able state |
@jamesgillanders can this still be fixed up to merge? |
*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 In case you need to map an existing alias, follow this example. |
This can just be merged, right? (once requests are addressed) |
*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 In case you need to map an existing alias, follow this example. |
1 similar comment
*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 In case you need to map an existing alias, follow this example. |
Ciao tutti, I have updated the code here to work with the new restructured code base, and to reflect some of the above review comments from ~2 years ago. I don't know why tests are failing, and I don't know if the current code style is TARDIS-y enough. But the code works, and is meant to be a port from the old tardis_analysis repo. I'd be in favour or merging this (assuming you guys can test + run it!) so this feature is available for users. I for one certainly miss it in the new versions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one change to make, the rest seems fine pending Jaladh's comments
Updated the constants package in opacities.py to use the internal TARDIS constants package -- good spot Andrew! |
@jaladh-singhal Can you re-review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending other reviews
The vpacket logging has changed, line 47 should now be: PEP8 too! Otherwise looks good to me |
a888e9c
to
b95388b
Compare
*beep* *bop* 119 F405 [ ] `AdiabaticCoolingRate` may be undefined, or defined from star imports
85 F401 [*] `PySide2.QtCore` imported but unused
49 I001 [*] Import block is un-sorted or un-formatted
48 G004 [ ] Logging statement uses f-string
44 RET505 [ ] Unnecessary `elif` after `return` statement
27 F821 [ ] Undefined name `GET_NEAREST_LINE_REDWARD_FUNCTION`
22 F403 [ ] `from astropy.constants.astropyconst13 import *` used; unable to detect undefined names
18 INP001 [ ] File `.ci-helpers/update_credits.py` is part of an implicit namespace package. Add an `__init__.py`.
18 D202 [*] No blank lines allowed after function docstring (found 1)
13 E712 [*] Avoid equality comparisons to `False`; use `if not ...:` for false checks
12 E722 [ ] Do not use bare `except`
11 B011 [*] Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
11 PT015 [ ] Assertion always fails, replace with `pytest.fail()`
11 RET506 [ ] Unnecessary `elif` after `raise` statement
11 UP008 [*] Use `super()` instead of `super(__class__, self)`
10 F811 [ ] Redefinition of unused `input_d_time_0_eventhandler` from line 1713
9 E402 [ ] Module level import not at top of file
8 B019 [ ] Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
7 ISC003 [ ] Explicitly concatenated string should be implicitly concatenated
7 D209 [*] Multi-line docstring closing quotes should be on a separate line
7 UP031 [*] Use format specifiers instead of percent format
6 W291 [*] Trailing whitespace
5 UP004 [*] Class `ConvergencePlots` inherits from `object`
4 C408 [*] Unnecessary `dict` call (rewrite as a literal)
4 FA100 [ ] Add `from __future__ import annotations` to simplify `typing.Tuple`
4 UP032 [*] Use f-string instead of `format` call
3 EXE001 [ ] Shebang is present but file is not executable
3 ICN001 [*] `matplotlib` should be imported as `mpl`
3 PIE808 [*] Unnecessary `start` argument in `range`
3 RET508 [ ] Unnecessary `elif` after `break` statement
3 PTH117 [ ] `os.path.isabs()` should be replaced by `Path.is_absolute()`
3 PGH004 [ ] Use specific rule codes when using `noqa`
3 PLW0127 [ ] Self-assignment of variable `atom_data`
3 UP015 [*] Unnecessary open mode parameters
2 ANN204 [ ] Missing return type annotation for special method `__getitem__`
2 B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
2 PT013 [ ] Incorrect import of `pytest`; use `import pytest` instead
2 N812 [ ] Lowercase `__path__` imported as non-lowercase `TARDIS_PATH`
2 N999 [ ] Invalid module name: 'GXPacket'
2 W293 [*] Blank line contains whitespace
2 D406 [*] Section name should end with a newline ("Returns")
2 D407 [*] Missing dashed underline after section ("Returns")
2 D411 [*] Missing blank line before section ("Parameters")
1 S113 [ ] Probable use of requests call without timeout
1 S604 [ ] Function call with truthy `shell` parameter identified, security issue
1 S605 [ ] Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`
1 B017 [ ] `pytest.raises(Exception)` should be considered evil
1 B018 [ ] Found useless expression. Either assign it to a variable or remove it.
1 B020 [ ] Loop control variable `isotope_dict` overrides iterable it iterates
1 C416 [*] Unnecessary `list` comprehension (rewrite using `list()`)
1 DTZ011 [ ] `datetime.date.today()` used
1 G001 [ ] Logging statement uses `str.format`
1 PIE790 [*] Unnecessary `pass` statement
1 PT021 [ ] Use `yield` instead of `request.addfinalizer`
1 SIM103 [*] Return the condition directly
1 NPY201 [ ] `np.recfromtxt` will be removed in NumPy 2.0. Use `np.genfromtxt` instead.
1 PERF102 [*] When using only the values of a dict use the `values()` method
1 D204 [*] 1 blank line required after class docstring
1 PLR0911 [ ] Too many return statements (8 > 6)
1 UP009 [*] UTF-8 encoding declaration is unnecessary
1 UP024 [*] Replace aliased errors with `OSError`
1 UP030 [*] Use implicit references for positional format fields
1 RUF015 [*] Prefer `next(iter(unique_v))` over single element slice
1 TRY300 [ ] Consider moving this statement to an `else` block
Complete output(might be large): .ci-helpers/get_current_version.py:1:1: EXE001 Shebang is present but file is not executable
.ci-helpers/get_current_version.py:3:1: I001 [*] Import block is un-sorted or un-formatted
.ci-helpers/get_min_docstr_cov.py:1:1: EXE001 Shebang is present but file is not executable
.ci-helpers/get_min_docstr_cov.py:3:1: I001 [*] Import block is un-sorted or un-formatted
.ci-helpers/get_min_docstr_cov.py:5:1: F403 `from parse import *` used; unable to detect undefined names
.ci-helpers/get_min_docstr_cov.py:8:10: F405 `parse` may be undefined, or defined from star imports
.ci-helpers/get_next_version.py:1:1: EXE001 Shebang is present but file is not executable
.ci-helpers/get_next_version.py:3:1: I001 [*] Import block is un-sorted or un-formatted
.ci-helpers/update_credits.py:1:1: INP001 File `.ci-helpers/update_credits.py` is part of an implicit namespace package. Add an `__init__.py`.
.ci-helpers/update_credits.py:1:1: D209 [*] Multi-line docstring closing quotes should be on a separate line
.ci-helpers/update_credits.py:15:5: D202 [*] No blank lines allowed after function docstring (found 1)
.ci-helpers/update_credits.py:15:5: D209 [*] Multi-line docstring closing quotes should be on a separate line
.ci-helpers/update_credits.py:20:12: DTZ011 `datetime.date.today()` used
.ci-helpers/update_credits.py:24:20: S113 Probable use of requests call without timeout
.ci-helpers/update_credits.py:46:91: W291 Trailing whitespace
benchmarks/benchmark_base.py:1:1: I001 [*] Import block is un-sorted or un-formatted
benchmarks/benchmark_base.py:75:9: RET506 Unnecessary `else` after `raise` statement
benchmarks/opacities_opacity.py:7:40: F401 [*] `tardis.opacities.opacities.compton_opacity_calculation` imported but unused
benchmarks/opacities_opacity_state.py:15:5: D204 [*] 1 blank line required after class docstring
benchmarks/opacities_opacity_state.py:20:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/run_tardis.py:5:1: I001 [*] Import block is un-sorted or un-formatted
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_geometry_calculate_distances.py:13:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/transport_montecarlo_estimators_radfield_estimator_calcs.py:20:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/transport_montecarlo_interaction.py:16:15: W291 [*] Trailing whitespace
benchmarks/transport_montecarlo_interaction.py:18:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/transport_montecarlo_main_loop.py:20:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/transport_montecarlo_packet_trackers.py:6:40: F401 [*] `asv_runner.benchmarks.mark.parameterize` imported but unused
benchmarks/transport_montecarlo_packet_trackers.py:19:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
benchmarks/transport_montecarlo_vpacket.py:54:5: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
docs/conf.py:1:1: UP009 [*] UTF-8 encoding declaration is unnecessary
docs/conf.py:27:1: I001 [*] Import block is un-sorted or un-formatted
docs/conf.py:30:8: F401 [*] `tardis` imported but unused
docs/conf.py:36:43: PGH004 Use specific rule codes when using `noqa`
docs/conf.py:46:6: UP015 [*] Unnecessary open mode parameters
docs/conf.py:67:1: F405 `exclude_patterns` may be undefined, or defined from star imports
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: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/physics/pyplot/lte_ionization_balance.py:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/pyplot/lte_ionization_balance.py:1:8: F401 [*] `os` imported but unused
docs/physics/pyplot/lte_ionization_balance.py:22:31: F821 Undefined name `atom_fname`
docs/physics/pyplot/lte_ionization_balance.py:73:9: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/lte_ionization_balance.py:74:15: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/nebular_ionization_balance.py:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/pyplot/nebular_ionization_balance.py:33:18: F821 Undefined name `plasma`
docs/physics/pyplot/nebular_ionization_balance.py:71:9: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/nebular_ionization_balance.py:72:15: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/nebular_ionization_balance.py:117:9: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/nebular_ionization_balance.py:118:15: UP031 Use format specifiers instead of percent format
docs/physics/pyplot/plot_mu_in_out_packet.py:1:1: F403 `from pylab import *` used; unable to detect undefined names
docs/physics/pyplot/plot_mu_in_out_packet.py:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/pyplot/plot_mu_in_out_packet.py:5:1: PLW0127 Self-assignment of variable `x`
docs/physics/pyplot/plot_mu_in_out_packet.py:5:4: PLW0127 Self-assignment of variable `y`
docs/physics/pyplot/plot_mu_in_out_packet.py:5:15: F405 `mgrid` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:10:1: F405 `xlabel` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:11:1: F405 `ylabel` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:12:1: F405 `imshow` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:12:8: F405 `np` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:13:1: F405 `colorbar` may be undefined, or defined from star imports
docs/physics/pyplot/plot_mu_in_out_packet.py:14:1: F405 `show` may be undefined, or defined from star imports
tardis/__init__.py:6:31: PGH004 Use specific rule codes when using `noqa`
tardis/__init__.py:32:25: F401 `tardis.base.run_tardis` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/__init__.py:33:46: F401 `tardis.io.util.yaml_load_file` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/analysis.py:96:9: E722 Do not use bare `except`
tardis/analysis.py:110:9: E722 Do not use bare `except`
tardis/analysis.py:121:9: E722 Do not use bare `except`
tardis/analysis.py:136:9: E722 Do not use bare `except`
tardis/analysis.py:374:9: RET505 Unnecessary `else` after `return` statement
tardis/analysis.py:396:9: RET505 Unnecessary `else` after `return` statement
tardis/analysis.py:421:9: RET505 Unnecessary `else` after `return` statement
tardis/analysis/opacities.py:1:1: INP001 File `tardis/analysis/opacities.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/base.py:100:13: PLW0127 Self-assignment of variable `atom_data`
tardis/conftest.py:12: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/constants.py:1:1: F403 `from astropy.constants.astropyconst13 import *` used; unable to detect undefined names
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:40:16: UP004 [*] Class `GXPacket` inherits from `object`
tardis/energy_input/GXPacket.py:72:9: D407 [*] Missing dashed underline after section ("Returns")
tardis/energy_input/GXPacket.py:72:9: D406 [*] Section name should end with a newline ("Returns")
tardis/energy_input/GXPacket.py:198:13: F821 Undefined name `get_chain_decay_power_per_ejectamass`
tardis/energy_input/GXPacket.py:199:17: F821 Undefined name `inventory`
tardis/energy_input/energy_source.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/energy_input/energy_source.py:96:11: E712 Avoid equality comparisons to `True`; use `if check:` for truth checks
tardis/energy_input/energy_source.py:112:16: C416 Unnecessary `list` comprehension (rewrite using `list()`)
tardis/energy_input/energy_source.py:198:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/energy_input/gamma_packet_loop.py:273: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:2:17: F401 [*] `numpy` imported but unused
tardis/energy_input/gamma_ray_channel.py:54:5: D411 [*] Missing blank line before section ("Returns")
tardis/energy_input/gamma_ray_channel.py:111:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/energy_input/gamma_ray_estimators.py:47:18: F821 Undefined name `GET_NEAREST_LINE_REDWARD_FUNCTION`
tardis/energy_input/gamma_ray_grid.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/energy_input/gamma_ray_grid.py:14:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/energy_input/gamma_ray_transport.py:456:39: PERF102 When using only the values of a dict use the `values()` method
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:8:5: F401 [*] `tardis.energy_input.energy_source.get_nuclear_lines_database` imported but unused
tardis/energy_input/main_gamma_ray_loop.py:12:5: F401 [*] `tardis.energy_input.gamma_ray_channel.calculate_total_decays` imported but unused
tardis/energy_input/main_gamma_ray_loop.py:13:5: F401 [*] `tardis.energy_input.gamma_ray_channel.create_inventories_dict` imported but unused
tardis/energy_input/main_gamma_ray_loop.py:14:5: F401 [*] `tardis.energy_input.gamma_ray_channel.create_isotope_dicts` imported but unused
tardis/energy_input/main_gamma_ray_loop.py:152:17: G004 Logging statement uses f-string
tardis/energy_input/main_gamma_ray_loop.py:156:17: G004 Logging statement uses f-string
tardis/energy_input/main_gamma_ray_loop.py:158:17: G004 Logging statement uses f-string
tardis/energy_input/main_gamma_ray_loop.py:213:17: G004 Logging statement uses f-string
tardis/energy_input/main_gamma_ray_loop.py:214:17: G004 Logging statement uses f-string
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_energy_source.py:35:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_energy_source.py:35:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_energy_source.py:41:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_energy_source.py:41:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_energy_source.py:47:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_energy_source.py:47:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
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:118:9: B020 Loop control variable `isotope_dict` overrides iterable it iterates
tardis/energy_input/tests/test_gamma_ray_grid.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/energy_input/tests/test_gamma_ray_grid.py:3:17: F401 [*] `numpy` imported but unused
tardis/energy_input/tests/test_gamma_ray_grid.py:6:5: F401 [*] `tardis.energy_input.gamma_ray_grid.calculate_distance_radial` imported but unused
tardis/energy_input/tests/test_gamma_ray_grid.py:7:5: F401 [*] `tardis.energy_input.gamma_ray_grid.distance_trace` imported but unused
tardis/energy_input/tests/test_gamma_ray_grid.py:15:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_gamma_ray_grid.py:15:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_gamma_ray_grid.py:21:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_gamma_ray_grid.py:21:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_gamma_ray_interactions.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/energy_input/tests/test_gamma_ray_interactions.py:6:5: F401 [*] `tardis.energy_input.gamma_ray_interactions.compton_scatter` imported but unused
tardis/energy_input/tests/test_gamma_ray_interactions.py:18:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_gamma_ray_interactions.py:18:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_gamma_ray_interactions.py:24:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_gamma_ray_interactions.py:24:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_gamma_ray_transport.py:4:17: F401 [*] `numpy` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:5:25: F401 [*] `numpy.testing` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:7:28: F401 [*] `radioactivedecay` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:8:30: F401 [*] `radioactivedecay.converters` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:11:5: F401 [*] `tardis.energy_input.gamma_ray_channel.calculate_total_decays` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:12:5: F401 [*] `tardis.energy_input.gamma_ray_channel.create_inventories_dict` imported but unused
tardis/energy_input/tests/test_gamma_ray_transport.py:13:5: F401 [*] `tardis.energy_input.gamma_ray_channel.create_isotope_dicts` imported but unused
tardis/energy_input/tests/test_util.py:38:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_util.py:38:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_util.py:44:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_util.py:44:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_util.py:50:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_util.py:50:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/tests/test_util.py:56:5: PT015 Assertion always fails, replace with `pytest.fail()`
tardis/energy_input/tests/test_util.py:56:12: B011 Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
tardis/energy_input/util.py:387:5: RET505 Unnecessary `elif` after `return` statement
tardis/grid/__init__.py:7:1: F403 `from tardis.grid.base import *` used; unable to detect undefined names
tardis/grid/tests/test_grid.py:1:1: INP001 File `tardis/grid/tests/test_grid.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/gui/__init__.py:4:57: W291 Trailing whitespace
tardis/gui/__init__.py:5:60: W291 Trailing whitespace
tardis/gui/__init__.py:6:56: W291 Trailing whitespace
tardis/gui/datahandler.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/datahandler.py:4:17: F401 [*] `numpy` imported but unused
tardis/gui/datahandler.py:5:8: ICN001 `matplotlib` should be imported as `mpl`
tardis/gui/datahandler.py:6:28: F401 [*] `matplotlib.pylab` imported but unused
tardis/gui/datahandler.py:10:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/datahandler.py:12:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/datahandler.py:19:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/datahandler.py:19:8: F401 [*] `yaml` imported but unused
tardis/gui/datahandler.py:21:20: F401 [*] `tardis.run_tardis` imported but unused
tardis/gui/datahandler.py:22:32: F401 [*] `tardis.gui.widgets.MatplotlibWidget` imported but unused
tardis/gui/datahandler.py:22:50: F401 [*] `tardis.gui.widgets.ModelViewer` imported but unused
tardis/gui/datahandler.py:22:63: F401 [*] `tardis.gui.widgets.ShellInfo` imported but unused
tardis/gui/datahandler.py:23:32: F401 [*] `tardis.gui.widgets.LineInfo` imported but unused
tardis/gui/datahandler.py:23:42: F401 [*] `tardis.gui.widgets.LineInteractionTables` imported but unused
tardis/gui/datahandler.py:37:12: UP004 [*] Class `Node` inherits from `object`
tardis/gui/datahandler.py:113:9: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:145:9: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:199:9: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:203:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/gui/datahandler.py:271:9: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:412:9: RET505 Unnecessary `elif` after `return` statement
tardis/gui/datahandler.py:436:9: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:503:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/datahandler.py:518:9: PLR0911 Too many return statements (8 > 6)
tardis/gui/datahandler.py:523:13: RET505 Unnecessary `elif` after `return` statement
tardis/gui/datahandler.py:526:17: RET505 Unnecessary `else` after `return` statement
tardis/gui/datahandler.py:536:13: RET505 Unnecessary `elif` after `return` statement
tardis/gui/datahandler.py:547:9: RET505 Unnecessary `elif` after `return` statement
tardis/gui/datahandler.py:552:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/gui/datahandler.py:556:9: RET505 Unnecessary `elif` after `return` statement
tardis/gui/interface.py:6:25: F401 [*] `PySide2.QtCore` imported but unused
tardis/gui/interface.py:16:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/interface.py:23:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/widgets.py:6:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/widgets.py:8:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/widgets.py:16:1: I001 [*] Import block is un-sorted or un-formatted
tardis/gui/widgets.py:16:8: ICN001 `matplotlib` should be imported as `mpl`
tardis/gui/widgets.py:17:1: F403 `from matplotlib.figure import *` used; unable to detect undefined names
tardis/gui/widgets.py:24:32: F401 [*] `matplotlib.patches.Circle` imported but unused
tardis/gui/widgets.py:29:30: F401 [*] `tardis.util` imported but unused
tardis/gui/widgets.py:36:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/gui/widgets.py:43:23: F405 `Figure` may be undefined, or defined from star imports
tardis/gui/widgets.py:54:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:55:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:58:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:164:27: C408 Unnecessary `dict` call (rewrite as a literal)
tardis/gui/widgets.py:167:26: C408 Unnecessary `dict` call (rewrite as a literal)
tardis/gui/widgets.py:168:23: C408 Unnecessary `dict` call (rewrite as a literal)
tardis/gui/widgets.py:186:9: RET505 Unnecessary `elif` after `return` statement
tardis/gui/widgets.py:198:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:226:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:229:22: F405 `yaml` may be undefined, or defined from star imports
tardis/gui/widgets.py:229:61: F405 `yaml` may be undefined, or defined from star imports
tardis/gui/widgets.py:353:24: F405 `TreeModel` may be undefined, or defined from star imports
tardis/gui/widgets.py:358:38: F405 `TreeDelegate` may be undefined, or defined from star imports
tardis/gui/widgets.py:429:35: UP024 [*] Replace aliased errors with `OSError`
tardis/gui/widgets.py:444:9: PIE790 [*] Unnecessary `pass` statement
tardis/gui/widgets.py:528:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/gui/widgets.py:646:41: F405 `np` may be undefined, or defined from star imports
tardis/gui/widgets.py:657:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/gui/widgets.py:660:41: F405 `np` may be undefined, or defined from star imports
tardis/gui/widgets.py:688:41: F405 `np` may be undefined, or defined from star imports
tardis/gui/widgets.py:815:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:851:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/gui/widgets.py:927:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/gui/widgets.py:929:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:1124:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/gui/widgets.py:1231:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/io/atom_data/__init__.py:5:51: F401 `tardis.io.atom_data.atom_web_download.download_atom_data` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/io/atom_data/__init__.py:6:38: F401 `tardis.io.atom_data.base.AtomData` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/io/atom_data/atom_web_download.py:51:13: G004 Logging statement uses f-string
tardis/io/atom_data/atom_web_download.py:58:17: G004 Logging statement uses f-string
tardis/io/atom_data/base.py:198:34: G004 Logging statement uses f-string
tardis/io/atom_data/base.py:263:17: G004 Logging statement uses f-string
tardis/io/atom_data/base.py:267:21: G001 Logging statement uses `str.format`
tardis/io/atom_data/base.py:704:17: G004 Logging statement uses f-string
tardis/io/atom_data/util.py:35:13: G004 Logging statement uses f-string
tardis/io/configuration/config_internal.py:9:20: N812 Lowercase `__path__` imported as non-lowercase `TARDIS_PATH`
tardis/io/configuration/config_internal.py:25:13: G004 Logging statement uses f-string
tardis/io/configuration/config_internal.py:38:13: G004 Logging statement uses f-string
tardis/io/configuration/config_reader.py:53:29: G004 Logging statement uses f-string
tardis/io/configuration/config_reader.py:117:9: RET505 Unnecessary `else` after `return` statement
tardis/io/configuration/config_reader.py:141:13: RET505 Unnecessary `else` after `return` statement
tardis/io/configuration/config_reader.py:218:29: G004 Logging statement uses f-string
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_validator.py:1:1: INP001 File `tardis/io/configuration/tests/test_config_validator.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/configuration/tests/test_configuration_namespace.py:1:1: INP001 File `tardis/io/configuration/tests/test_configuration_namespace.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/logger/montecarlo_tracking.py:62:30: G004 Logging statement uses f-string
tardis/io/logger/montecarlo_tracking.py:63:30: G004 Logging statement uses f-string
tardis/io/model/__init__.py:2:44: F401 `tardis.io.model.readers.cmfgen.read_cmfgen_model` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/io/model/__init__.py:3:44: F401 `tardis.io.model.readers.stella.read_stella_model` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/io/model/parse_atom_data.py:40:21: G004 Logging statement uses f-string
tardis/io/model/parse_density_configuration.py:23:6: FA100 Add `from __future__ import annotations` to simplify `typing.Tuple`
tardis/io/model/parse_geometry_configuration.py:50:12: PTH117 `os.path.isabs()` should be replaced by `Path.is_absolute()`
tardis/io/model/parse_mass_fraction_configuration.py:62:12: PTH117 `os.path.isabs()` should be replaced by `Path.is_absolute()`
tardis/io/model/parse_radiation_field_configuration.py:118:13: G004 Logging statement uses f-string
tardis/io/model/readers/generic_readers.py:20:6: FA100 Add `from __future__ import annotations` to simplify `typing.Tuple`
tardis/io/model/readers/generic_readers.py:47:12: NPY201 `np.recfromtxt` will be removed in NumPy 2.0. Use `np.genfromtxt` instead.
tardis/io/model/readers/stella.py:52:17: RET508 Unnecessary `else` after `break` statement
tardis/io/model/readers/tests/test_arepo_parser.py:1:1: INP001 File `tardis/io/model/readers/tests/test_arepo_parser.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_ascii_readers.py:1:1: INP001 File `tardis/io/model/readers/tests/test_ascii_readers.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_cmfgen_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_cmfgen_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_cmfgen_reader.py:4:1: PT013 Incorrect import of `pytest`; use `import pytest` instead
tardis/io/model/readers/tests/test_csvy_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_csvy_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_csvy_reader.py:48:10: B017 `pytest.raises(Exception)` should be considered evil
tardis/io/model/readers/tests/test_stella_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_stella_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_stella_reader.py:5:1: PT013 Incorrect import of `pytest`; use `import pytest` instead
tardis/io/tests/test_HDFWriter.py:1:1: N999 Invalid module name: 'test_HDFWriter'
tardis/io/util.py:18:20: N812 Lowercase `__path__` imported as non-lowercase `TARDIS_PATH`
tardis/io/util.py:163:34: F821 Undefined name `basestring`
tardis/io/util.py:239:9: RET506 Unnecessary `else` after `raise` statement
tardis/io/util.py:332:21: G004 Logging statement uses f-string
tardis/io/util.py:416:13: G004 Logging statement uses f-string
tardis/model/__init__.py:9:31: F401 `tardis.model.base.SimulationState` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/model/base.py:340:12: PTH117 `os.path.isabs()` should be replaced by `Path.is_absolute()`
tardis/model/base.py:375:21: G004 Logging statement uses f-string
tardis/model/geometry/tests/test_radial1d.py:1:1: INP001 File `tardis/model/geometry/tests/test_radial1d.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/model/matter/__init__.py:1:45: F401 `tardis.model.matter.composition.Composition` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/model/matter/composition.py:206:9: RET505 Unnecessary `else` after `return` statement
tardis/model/matter/decay.py:101:21: G004 Logging statement uses f-string
tardis/model/matter/decay.py:104:17: G004 Logging statement uses f-string
tardis/opacities/macro_atom/base.py:120:5: D411 [*] Missing blank line before section ("Parameters")
tardis/opacities/macro_atom/base.py:227:5: E722 Do not use bare `except`
tardis/opacities/macro_atom/base.py:246:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/opacities/macro_atom/base.py:357:9: E722 Do not use bare `except`
tardis/opacities/macro_atom/macroatom_solver.py:8:23: UP004 [*] Class `MacroAtomSolver` inherits from `object`
tardis/opacities/macro_atom/macroatom_solver.py:14:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/macro_atom/macroatom_solver.py:28:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/macro_atom/macroatom_solver.py:90:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/macro_atom/macroatom_state.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/opacities/macro_atom/util.py:4:33: F401 [*] `tardis.constants` imported but unused
tardis/opacities/opacity_solver.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/opacities/opacity_solver.py:9:21: UP004 [*] Class `OpacitySolver` inherits from `object`
tardis/opacities/opacity_solver.py:17:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/opacity_state.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/opacities/opacity_state.py:42:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/opacity_state.py:174:9: ANN204 Missing return type annotation for special method `__getitem__`
tardis/opacities/opacity_state.py:180:9: D407 [*] Missing dashed underline after section ("Returns")
tardis/opacities/opacity_state.py:180:9: D406 [*] Section name should end with a newline ("Returns")
tardis/opacities/opacity_state.py:215:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/tau_sobolev.py:92:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/opacities/tests/conftest.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/opacities/tests/test_opacity_solver.py:1:1: INP001 File `tardis/opacities/tests/test_opacity_solver.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/opacities/tests/test_opacity_solver.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/opacities/tests/test_opacity_solver.py:2:17: F401 [*] `numpy` imported but unused
tardis/opacities/tests/test_opacity_solver.py:7:44: F401 [*] `tardis.opacities.opacity_state.OpacityState` imported but unused
tardis/opacities/tests/test_opacity_solver.py:8:42: F401 [*] `tardis.opacities.tau_sobolev.calculate_sobolev_line_opacity` imported but unused
tardis/opacities/tests/test_opacity_state_numba.py:1:1: INP001 File `tardis/opacities/tests/test_opacity_state_numba.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/opacities/tests/test_opacity_state_numba.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/__init__.py:5:32: F401 `tardis.plasma.base.BasePlasma` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
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:53:9: RET506 Unnecessary `else` after `raise` statement
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: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/detailed_balance/rates/__init__.py:2:5: F401 `tardis.plasma.detailed_balance.rates.collision_strengths.UpsilonCMFGENSolver` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/detailed_balance/rates/__init__.py:3:5: F401 `tardis.plasma.detailed_balance.rates.collision_strengths.UpsilonRegemorterSolver` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/detailed_balance/rates/__init__.py:6:5: F401 `tardis.plasma.detailed_balance.rates.collisional_rates.ThermalCollisionalRateSolver` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/detailed_balance/rates/__init__.py:9:5: F401 `tardis.plasma.detailed_balance.rates.radiative_rates.RadiativeRatesSolver` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/__init__.py:8:1: F403 `from tardis.opacities.macro_atom.transition_probabilities import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:9:1: F403 `from tardis.plasma.properties.atomic import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:10:1: F403 `from tardis.plasma.properties.continuum_processes import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:11:1: F403 `from tardis.plasma.properties.general import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:12:1: F403 `from tardis.plasma.properties.helium_nlte import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:13:1: F403 `from tardis.plasma.properties.ion_population import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:14:1: F403 `from tardis.plasma.properties.level_population import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:15:1: F403 `from tardis.plasma.properties.nlte import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:16:1: F403 `from tardis.plasma.properties.nlte_rate_equation_solver import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:17:1: F403 `from tardis.plasma.properties.partition_function import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:18:1: F403 `from tardis.plasma.properties.plasma_input import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:19:1: F403 `from tardis.plasma.properties.radiative_properties import *` used; unable to detect undefined names
tardis/plasma/properties/__init__.py:20:1: F403 `from tardis.plasma.properties.rate_matrix_index import *` used; unable to detect undefined names
tardis/plasma/properties/atomic.py:554:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/atomic.py:585:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/atomic.py:598:17: G004 Logging statement uses f-string
tardis/plasma/properties/atomic.py:639:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/base.py:117:25: G004 Logging statement uses f-string
tardis/plasma/properties/base.py:178:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/continuum_processes/__init__.py:2:5: F401 `tardis.plasma.properties.continuum_processes.photo_ion_rate_coeff.PhotoIonRateCoeff` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/continuum_processes/__init__.py:4:1: F403 `from tardis.plasma.properties.continuum_processes.rates import *` used; unable to detect undefined names
tardis/plasma/properties/continuum_processes/__init__.py:6:5: F401 `tardis.plasma.properties.continuum_processes.recomb_rate_coeff.SpontRecombRateCoeff` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/continuum_processes/__init__.py:7:5: F401 `tardis.plasma.properties.continuum_processes.recomb_rate_coeff.StimRecombRateCoeff` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/continuum_processes/__init__.py:8:5: F401 `tardis.plasma.properties.continuum_processes.recomb_rate_coeff.StimRecombRateFactor` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/helium_nlte.py:182:21: E722 Do not use bare `except`
tardis/plasma/properties/helium_nlte.py:185:29: G004 Logging statement uses f-string
tardis/plasma/properties/helium_nlte.py:218:23: S605 Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`
tardis/plasma/properties/helium_nlte.py:259:69: F821 Undefined name `s1`
tardis/plasma/properties/ion_population.py:370:25: G004 Logging statement uses f-string
tardis/plasma/properties/ion_population.py:495:25: G004 Logging statement uses f-string
tardis/plasma/properties/nlte_rate_equation_solver.py:316:25: G004 Logging statement uses f-string
tardis/plasma/properties/nlte_rate_equation_solver.py:323:25: G004 Logging statement uses f-string
tardis/plasma/properties/partition_function.py:145:9: RET505 Unnecessary `elif` after `return` statement
tardis/plasma/properties/partition_function.py:181:25: G004 Logging statement uses f-string
tardis/plasma/properties/partition_function.py:192:21: G004 Logging statement uses f-string
tardis/plasma/properties/partition_function.py:199:21: G004 Logging statement uses f-string
tardis/plasma/properties/partition_function.py:252:21: RET506 Unnecessary `else` after `raise` statement
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 `NumberDensity` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:21:9: F405 `TimeExplosion` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:22:9: F405 `AtomicData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:23:9: F405 `JBlues` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:24:9: F405 `LinkTRadTElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:25:9: F405 `HeliumTreatment` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:26:9: F405 `ContinuumInteractionSpecies` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:27:9: F405 `NLTEIonizationSpecies` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:28:9: F405 `NLTEExcitationSpecies` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:33:9: F405 `TRadiative` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:34:9: F405 `DilutionFactor` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:35:9: F405 `BetaRadiation` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:36:9: F405 `Levels` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:37:9: F405 `Lines` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:38:9: F405 `PartitionFunction` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:39:9: F405 `GElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:40:9: F405 `IonizationData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:41:9: F405 `LinesLowerLevelIndex` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:42:9: F405 `LinesUpperLevelIndex` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:44:9: F405 `StimulatedEmissionFactor` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:45:9: F405 `SelectedAtoms` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:46:9: F405 `ElectronTemperature` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:49:55: F405 `PhiSahaLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:50:55: F405 `LevelBoltzmannFactorLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:52:6: F405 `BetaSobolev` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:52:44: F405 `MacroAtomData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:55:6: F405 `PhiSahaNebular` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:55:22: F405 `ZetaData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:55:32: F405 `BetaElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:55:46: F405 `RadiationFieldCorrection` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:58:6: F405 `LevelBoltzmannFactorDiluteLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:60:49: F405 `LevelBoltzmannFactorNoNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:63:9: F405 `LevelBoltzmannFactorNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:64:9: F405 `NLTEData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:65:9: F405 `PreviousElectronDensities` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:66:9: F405 `PreviousBetaSobolev` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:67:9: F405 `BetaSobolev` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:71:6: F405 `NLTEIndexHelper` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:71:23: F405 `NLTEPopulationSolverRoot` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:74:6: F405 `NLTEIndexHelper` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:74:23: F405 `NLTEPopulationSolverLU` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:78:9: F405 `HeliumNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:79:9: F405 `RadiationFieldCorrection` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:80:9: F405 `ZetaData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:81:9: F405 `BetaElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:82:9: F405 `LevelNumberDensityHeNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:83:9: F405 `IonNumberDensityHeNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:87:6: F405 `LevelNumberDensity` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:87:26: F405 `IonNumberDensity` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:90:6: F405 `HeliumNumericalNLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:94:9: F405 `PhotoIonRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:95:9: F405 `StimRecombRateFactor` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:96:9: F405 `BfHeatingRateCoeffEstimator` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:97:9: F405 `StimRecombCoolingRateCoeffEstimator` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:98:9: F405 `YgData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:103:9: F405 `StimRecombRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:104:9: F405 `PhotoIonizationData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:105:9: F405 `SpontRecombRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:106:9: F405 `ThermalLevelBoltzmannFactorLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:107:9: F405 `ThermalLTEPartitionFunction` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:108:9: F405 `BetaElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:109:9: F405 `ThermalGElectron` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:110:9: F405 `ThermalPhiSahaLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:111:9: F405 `SahaFactor` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:112:9: F405 `CorrPhotoIonRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:113:9: F405 `SpontRecombCoolingRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:114:9: F405 `RawRecombTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:115:9: F405 `RawPhotoIonTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:116:9: F405 `RawRadBoundBoundTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:117:9: F405 `MarkovChainTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:118:9: F405 `NonContinuumTransProbsMask` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:119:9: F405 `YgInterpolator` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:120:9: F405 `CollExcRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:121:9: F405 `CollDeexcRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:122:9: F405 `RawCollisionTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:123:9: F405 `MarkovChainIndex` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:124:9: F405 `MarkovChainTransProbsCollector` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:126:9: F405 `MonteCarloTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:127:9: F405 `FreeFreeCoolingRate` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:128:9: F405 `FreeBoundCoolingRate` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:130:9: F405 `LevelNumberDensityLTE` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:131:9: F405 `PhotoIonBoltzmannFactor` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:132:9: F405 `FreeBoundEmissionCDF` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:133:9: F405 `LevelIdxs2LineIdx` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:134:9: F405 `LevelIdxs2TransitionIdx` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:135:9: F405 `CollIonRateCoeffSeaton` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:136:9: F405 `CollRecombRateCoeff` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:138:9: F405 `ContinuumInteractionHandler` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:139:9: F405 `BetaSobolev` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:142:58: F405 `AdiabaticCoolingRate` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:145:9: F405 `RawTwoPhotonTransProbs` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:146:9: F405 `TwoPhotonData` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:147:9: F405 `TwoPhotonEmissionCDF` may be undefined, or defined from star imports
tardis/plasma/properties/property_collections.py:148:9: F405 `TwoPhotonFrequencySampler` may be undefined, or defined from star imports
tardis/plasma/radiation_field/__init__.py:2:5: F401 `tardis.plasma.radiation_field.planck_rad_field.DilutePlanckianRadiationField` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/radiation_field/__init__.py:3:5: F401 `tardis.plasma.radiation_field.planck_rad_field.PlanckianRadiationField` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/radiation_field/planck_rad_field.py:58:44: FA100 Add `from __future__ import annotations` to simplify `typing.Union`
tardis/plasma/radiation_field/planck_rad_field.py:117:44: FA100 Add `from __future__ import annotations` to simplify `typing.Union`
tardis/plasma/standard_plasmas.py:316:9: RET506 Unnecessary `else` after `raise` statement
tardis/radiation_field/base.py:1:1: INP001 File `tardis/radiation_field/base.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/scripts/cmfgen2tardis.py:13:27: F821 Undefined name `atomic_dataset`
tardis/scripts/cmfgen2tardis.py:68:34: F821 Undefined name `atomic_dataset`
tardis/scripts/debug/run_numba_single.py:1:1: INP001 File `tardis/scripts/debug/run_numba_single.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/simulation/__init__.py:5:36: F401 `tardis.simulation.base.Simulation` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/simulation/base.py:197:13: RET506 Unnecessary `else` after `raise` statement
tardis/simulation/base.py:261:17: G004 Logging statement uses f-string
tardis/simulation/base.py:268:9: RET505 Unnecessary `else` after `return` statement
tardis/simulation/base.py:449:13: G004 Logging statement uses f-string
tardis/simulation/base.py:547:13: G004 Logging statement uses f-string
tardis/simulation/base.py:654:25: G004 Logging statement uses f-string
tardis/simulation/base.py:657:13: G004 Logging statement uses f-string
tardis/simulation/base.py:662:13: G004 Logging statement uses f-string
tardis/simulation/base.py:713:13: TRY300 Consider moving this statement to an `else` block
tardis/simulation/base.py:715:26: G004 Logging statement uses f-string
tardis/spectrum/formal_integral.py:23:5: F811 Redefinition of unused `opacity_state_initialize` from line 13
tardis/spectrum/formal_integral.py:340:13: RET506 Unnecessary `else` after `raise` statement
tardis/spectrum/formal_integral.py:681:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral.py:717:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral_cuda.py:375:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral_cuda.py:420:5: RET505 Unnecessary `else` after `return` statement
tardis/transport/frame_transformations.py:18:5: RET505 Unnecessary `else` after `return` statement
tardis/transport/frame_transformations.py:48:5: RET505 Unnecessary `else` after `return` statement
tardis/transport/montecarlo/__init__.py:14:1: E402 Module level import not at top of file
tardis/transport/montecarlo/__init__.py:24:1: E402 Module level import not at top of file
tardis/transport/montecarlo/__init__.py:25:5: F401 `tardis.transport.montecarlo.packet_collections.PacketCollection` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/transport/montecarlo/__init__.py:27:1: E402 Module level import not at top of file
tardis/transport/montecarlo/__init__.py:27:50: F401 `tardis.transport.montecarlo.r_packet.RPacket` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/transport/montecarlo/estimators/__init__.py:2:5: F401 `tardis.transport.montecarlo.estimators.base.EstimatedRadiationFieldProperties` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
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/numba_interface.py:114:9: ANN204 Missing return type annotation for special method `__getitem__`
tardis/transport/montecarlo/packet_source.py:246:9: RET505 Unnecessary `else` after `return` statement
tardis/transport/montecarlo/r_packet_transport.py:115:13: RET508 Unnecessary `elif` after `break` statement
tardis/transport/montecarlo/tests/conftest.py:14:5: F811 Redefinition of unused `opacity_state_initialize` from line 7
tardis/transport/montecarlo/tests/test_montecarlo.py:27:1: E402 Module level import not at top of file
tardis/transport/montecarlo/tests/test_montecarlo.py:32:1: E402 Module level import not at top of file
tardis/transport/montecarlo/tests/test_montecarlo.py:48:5: PT021 Use `yield` instead of `request.addfinalizer`
tardis/transport/montecarlo/tests/test_montecarlo.py:204:5: F811 Redefinition of unused `test_get_random_mu_different_output` from line 195
tardis/transport/montecarlo/tests/test_montecarlo.py:484:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:570:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:571:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:579:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:596:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:601:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:624:9: F821 Undefined name `transport`
tardis/transport/montecarlo/tests/test_montecarlo.py:625:9: F821 Undefined name `transport`
tardis/transport/montecarlo/tests/test_montecarlo.py:626:9: F821 Undefined name `transport`
tardis/transport/montecarlo/tests/test_montecarlo.py:627:9: F821 Undefined name `transport`
tardis/transport/montecarlo/tests/test_montecarlo.py:629:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:642:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:666:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_montecarlo.py:679:5: F821 Undefined name `mc`
tardis/transport/montecarlo/tests/test_packet.py:21:1: E402 Module level import not at top of file
tardis/transport/montecarlo/tests/test_vpacket.py:12:1: E402 Module level import not at top of file
tardis/transport/montecarlo/weighted_packet_source.py:79:13: B018 Found useless expression. Either assign it to a variable or remove it.
tardis/transport/tests/test_doppler_factor.py:1:1: INP001 File `tardis/transport/tests/test_doppler_factor.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/util/base.py:341:5: RET505 Unnecessary `else` after `return` statement
tardis/util/base.py:515:5: E722 Do not use bare `except`
tardis/util/base.py:623:5: RET505 Unnecessary `elif` after `return` statement
tardis/visualization/__init__.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/__init__.py:3:57: F401 `tardis.visualization.tools.convergence_plot.ConvergencePlots` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:6:5: F401 `tardis.visualization.widgets.shell_info.shell_info_from_simulation` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:7:5: F401 `tardis.visualization.widgets.shell_info.shell_info_from_hdf` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:9:52: F401 `tardis.visualization.widgets.line_info.LineInfoWidget` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:10:51: F401 `tardis.visualization.widgets.grotrian.GrotrianWidget` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:11:59: F401 `tardis.visualization.widgets.custom_abundance.CustomAbundanceWidget` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:12:50: F401 `tardis.visualization.tools.sdec_plot.SDECPlotter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:13:53: F401 `tardis.visualization.tools.rpacket_plot.RPacketPlotter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/__init__.py:14:49: F401 `tardis.visualization.tools.liv_plot.LIVPlotter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/plot_util.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/plot_util.py:42:5: RET505 Unnecessary `else` after `return` statement
tardis/visualization/tools/convergence_plot.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/convergence_plot.py:4:25: F401 [*] `matplotlib.cm` imported but unused
tardis/visualization/tools/convergence_plot.py:5:29: F401 [*] `matplotlib.colors` imported but unused
tardis/visualization/tools/convergence_plot.py:39:24: UP004 [*] Class `ConvergencePlots` inherits from `object`
tardis/visualization/tools/convergence_plot.py:321:13: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/liv_plot.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/liv_plot.py:3:25: F401 [*] `matplotlib.cm` imported but unused
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:341:13: RET506 Unnecessary `elif` after `raise` statement
tardis/visualization/tools/rpacket_plot.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/rpacket_plot.py:3:18: F401 [*] `pandas` imported but unused
tardis/visualization/tools/rpacket_plot.py:6:26: F401 [*] `plotly.express` imported but unused
tardis/visualization/tools/rpacket_plot.py:101:13: RET505 Unnecessary `else` after `return` statement
tardis/visualization/tools/rpacket_plot.py:110:114: W291 Trailing whitespace
tardis/visualization/tools/rpacket_plot.py:115:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/visualization/tools/rpacket_plot.py:231:35: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/rpacket_plot.py:481:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/visualization/tools/rpacket_plot.py:615:35: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/rpacket_plot.py:646:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/visualization/tools/sdec_plot.py:202:9: RET505 Unnecessary `elif` after `return` statement
tardis/visualization/tools/sdec_plot.py:343:13: RET505 Unnecessary `elif` after `return` statement
tardis/visualization/tools/sdec_plot.py:460:9: RET505 Unnecessary `else` after `return` statement
tardis/visualization/tools/sdec_plot.py:496:9: RET505 Unnecessary `elif` after `return` statement
tardis/visualization/tools/sdec_plot.py:531:13: RET506 Unnecessary `else` after `raise` statement
tardis/visualization/tools/sdec_plot.py:699:13: RET506 Unnecessary `else` after `raise` statement
tardis/visualization/tools/tests/test_convergence_plot.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_convergence_plot.py:6:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/tools/tests/test_convergence_plot.py:87:24: PIE808 [*] Unnecessary `start` argument in `range`
tardis/visualization/tools/tests/test_convergence_plot.py:111:22: PIE808 [*] Unnecessary `start` argument in `range`
tardis/visualization/tools/tests/test_convergence_plot.py:198:9: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
tardis/visualization/tools/tests/test_convergence_plot.py:215:9: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
tardis/visualization/tools/tests/test_convergence_plot.py:220:40: F811 Redefinition of unused `monkeysession` from line 6
tardis/visualization/tools/tests/test_liv_plot.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_liv_plot.py:352:29: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/tests/test_rpacket_plot.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_sdec_plot.py:2:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_sdec_plot.py:327:29: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/tests/test_sdec_plot.py:383:9: F811 Redefinition of unused `test_generate_plot_mpl` from line 293
tardis/visualization/widgets/custom_abundance.py:2:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/custom_abundance.py:32:60: F811 [*] Redefinition of unused `quantity_linspace` from line 16
tardis/visualization/widgets/custom_abundance.py:604:47: UP032 [*] Use f-string instead of `format` call
tardis/visualization/widgets/custom_abundance.py:737:9: SIM103 Return the condition directly
tardis/visualization/widgets/custom_abundance.py:741:9: RET505 Unnecessary `else` after `return` statement
tardis/visualization/widgets/custom_abundance.py:917:12: E712 Avoid equality comparisons to `True`; use `if obj.new:` for truth checks
tardis/visualization/widgets/custom_abundance.py:1130:9: RET505 Unnecessary `else` after `return` statement
tardis/visualization/widgets/custom_abundance.py:1421:9: RET506 Unnecessary `else` after `raise` statement
tardis/visualization/widgets/custom_abundance.py:1473:27: UP031 Use format specifiers instead of percent format
tardis/visualization/widgets/custom_abundance.py:1688:36: UP032 [*] Use f-string instead of `format` call
tardis/visualization/widgets/custom_abundance.py:1724:9: F811 Redefinition of unused `input_d_time_0_eventhandler` from line 1713
tardis/visualization/widgets/custom_abundance.py:1754:13: F821 Undefined name `display`
tardis/visualization/widgets/custom_abundance.py:1756:13: F821 Undefined name `display`
tardis/visualization/widgets/custom_abundance.py:1758:13: F821 Undefined name `display`
tardis/visualization/widgets/grotrian.py:6:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/grotrian.py:13:8: ICN001 `matplotlib` should be imported as `mpl`
tardis/visualization/widgets/grotrian.py:608:35: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/widgets/grotrian.py:753:35: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/widgets/grotrian.py:923:20: C408 Unnecessary `dict` call (rewrite as a literal)
tardis/visualization/widgets/grotrian.py:1157:9: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
tardis/visualization/widgets/grotrian.py:1158:9: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
tardis/visualization/widgets/grotrian.py:1176:9: RET505 Unnecessary `elif` after `return` statement
tardis/visualization/widgets/line_info.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/line_info.py:3:8: F401 [*] `re` imported but unused
tardis/visualization/widgets/line_info.py:305:21: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
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_custom_abundance.py:2:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/tests/test_custom_abundance.py:4:8: F401 [*] `tardis` imported but unused
tardis/visualization/widgets/tests/test_custom_abundance.py:8:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/widgets/tests/test_custom_abundance.py:34:19: F811 Redefinition of unused `monkeysession` from line 8
tardis/visualization/widgets/tests/test_custom_abundance.py:156:20: E712 Avoid equality comparisons to `True`; use `if caw.btn_next.disabled:` for truth checks
tardis/visualization/widgets/tests/test_custom_abundance.py:157:20: E712 Avoid equality comparisons to `True`; use `if caw.btn_prev.disabled:` for truth checks
tardis/visualization/widgets/tests/test_custom_abundance.py:225:34: UP032 [*] Use f-string instead of `format` call
tardis/visualization/widgets/tests/test_custom_abundance.py:225:50: RUF015 Prefer `next(iter(unique_v))` over single element slice
tardis/visualization/widgets/tests/test_line_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/tests/test_line_info.py:7:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/widgets/tests/test_line_info.py:43:20: E712 Avoid equality comparisons to `False`; use `if not species_interactions_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:66:12: E712 Avoid equality comparisons to `False`; use `if not species_interactions_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:89:20: E712 Avoid equality comparisons to `False`; use `if not last_line_counts_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:145:66: F811 Redefinition of unused `monkeysession` from line 7
tardis/visualization/widgets/tests/test_line_info.py:289:16: E712 Avoid equality comparisons to `False`; use `if not bool(selected_species):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:335:12: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
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:144:50: F811 Redefinition of unused `monkeysession` from line 5
tardis/workflows/simple_tardis_workflow.py:218:17: G004 Logging statement uses f-string
tardis/workflows/simple_tardis_workflow.py:430:17: G004 Logging statement uses f-string
tardis/workflows/standard_tardis_workflow.py:172:13: G004 Logging statement uses f-string
tardis/workflows/standard_tardis_workflow.py:212:17: G004 Logging statement uses f-string
tardis/workflows/workflow_logging.py:69:13: G004 Logging statement uses f-string
tardis/workflows/workflow_logging.py:107:21: G004 Logging statement uses f-string
Found 633 errors.
[*] 156 fixable with the `--fix` option (61 hidden fixes can be enabled with the `--unsafe-fixes` option).
|
Follow-up from PR tardis-sn#1890, which I erroneously closed!
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [b95388b6] <master> | After [b95388b6] <master> | Ratio | Benchmark (Parameter) |
|----------|------------------------------|-----------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 511±100ns | 511±100ns | 1 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 551±200ns | 551±200ns | 1 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 631±100ns | 631±100ns | 1 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 4.33±0.4ms | 4.33±0.4ms | 1 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 2.67±0ms | 2.67±0ms | 1 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 39.6±0s | 39.6±0s | 1 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 1.06±0m | 1.06±0m | 1 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 2.07±0m | 2.07±0m | 1 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 204±0.05ns | 204±0.05ns | 1 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 1.19±0μs | 1.19±0μs | 1 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 1.35±0.3μs | 1.35±0.3μs | 1 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 1.84±1μs | 1.84±1μs | 1 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 44.7±20μs | 44.7±20μs | 1 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 53.3±20μs | 53.3±20μs | 1 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 722±1ns | 722±1ns | 1 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 1.69±0.01ms | 1.69±0.01ms | 1 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 20.3±4μs | 20.3±4μs | 1 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 31.5±0.04μs | 31.5±0.04μs | 1 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 62.8±0.2ms | 62.8±0.2ms | 1 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 2.53±0.5ms | 2.53±0.5ms | 1 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 3.62±0.4μs | 3.62±0.4μs | 1 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 6.47±3μs | 6.47±3μs | 1 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 7.79±2μs | 7.79±2μs | 1 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 3.31±0.6μs | 3.31±0.6μs | 1 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
If you want to see the graph of the results, you can check it here |
This PR moves the tardis_line_id tool across from tardisanalysis to the main TARDIS repository. The TARDIS line ID tool was originally written by @unoebauer.
Description
Code has been updated to work with the newest version of TARDIS, but behaves as before.
The tool can be used to extract a list of the N most prominent transitions (default has N = 20) within a user-specified wavelength range (default is the entire wavelength range of the simulation). This can be particularly helpful for diagnosing the species with the largest contribution within a wavelength range, which perhaps has a blend of different absorption features.
Motivation and context
This PR simply relocates the old tool, and makes it compatible with the new version of TARDIS.
How has this been tested?
Examples
Here is the output plot from the old tool:
test_line_ID_K2.pdf
And here is the new version:
test_output.pdf
Type of change
Checklist