Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved _parse_species_list function to tardis.io.util.py #2837

Closed
wants to merge 9 commits into from

Conversation

rudrakshnalbalwar
Copy link

@rudrakshnalbalwar rudrakshnalbalwar commented Oct 2, 2024

📝 Description

Type: 🎢 infrastructure

Relocated species list parsing logic from liv_plot.py to util.py to improve file organization and maintainability. No changes to functionality were made; the parsing logic remains the same but is now centralized in a more appropriate file.

📌 Resources

image

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

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

@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 2, 2024

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

65	W291   	[*] Trailing whitespace
50	W293   	[*] Blank line contains whitespace
50	F401   	[*] `astropy.units` imported but unused
48	E999   	[ ] SyntaxError: Expected ',', found ':'
36	I001   	[*] Import block is un-sorted or un-formatted
20	G004   	[ ] Logging statement uses f-string
20	E902   	[ ] No such file or directory (os error 2)
19	RET505 	[ ] Unnecessary `elif` after `return` statement
18	UP008  	[*] Use `super()` instead of `super(__class__, self)`
13	D202   	[*] No blank lines allowed after function docstring (found 1)
8	E402   	[ ] Module level import not at top of cell
8	F405   	[ ] `HiddenPlasmaProperty` may be undefined, or defined from star imports
7	RET506 	[ ] Unnecessary `elif` after `raise` statement
7	UP015  	[*] Unnecessary open mode parameters
6	UP032  	[*] Use f-string instead of `format` call
5	E722   	[ ] Do not use bare `except`
5	F811   	[ ] Redefinition of unused `OpacityState` from line 14
5	UP004  	[*] Class `CudaFormalIntegrator` inherits from `object`
4	E701   	[ ] Multiple statements on one line (colon)
4	E712   	[*] Avoid equality comparisons to `True`; use `if latex_label:` for truth checks
4	F821   	[ ] Undefined name `atomic_dataset`
3	FLY002 	[*] Consider `f"{filename}.csv"` instead of string join
3	W292   	[*] No newline at end of file
2	COM818 	[ ] Trailing comma on bare tuple prohibited
2	C416   	[*] Unnecessary `list` comprehension (rewrite using `list()`)
2	ISC003 	[ ] Explicitly concatenated string should be implicitly concatenated
2	PIE808 	[*] Unnecessary `start` argument in `range`
2	W605   	[*] Invalid escape sequence: `\A`
2	D209   	[*] Multi-line docstring closing quotes should be on a separate line
2	F403   	[ ] `from tardis.plasma.properties.base import *` used; unable to detect undefined names
2	PGH004 	[ ] Use specific rule codes when using `noqa`
2	UP024  	[*] Replace aliased errors with `OSError`
1	S605   	[ ] Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`
1	FA102  	[*] Missing `from __future__ import annotations`, but uses PEP 604 union
1	ICN001 	[*] `matplotlib` should be imported as `mpl`
1	G001   	[ ] Logging statement uses `str.format`
1	PIE790 	[*] Unnecessary `pass` statement
1	TD006  	[*] Invalid TODO capitalization: `todo` should be `TODO`
1	N812   	[ ] Lowercase `__path__` imported as non-lowercase `TARDIS_PATH`
1	E713   	[*] Test for membership should be `not in`
1	PLW0127	[ ] Self-assignment of variable `atom_data`
1	UP009  	[*] UTF-8 encoding declaration is unnecessary
1	UP030  	[*] Use implicit references for positional format fields
1	UP034  	[*] Avoid extraneous parentheses
1	TRY300 	[ ] Consider moving this statement to an `else` block

Complete output(might be large):

.github/workflows/benchmarks.yml:3:4: E999 SyntaxError: Expected an expression
.github/workflows/benchmarks.yml:20:5: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:81:49: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:111:81: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:112:54: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:199:1: W293 [*] Blank line contains whitespace
.github/workflows/benchmarks.yml:218:22: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:219:170: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:221:84: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:238:1: W293 [*] Blank line contains whitespace
.github/workflows/build-docs.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/codespell.yml:3:4: E999 SyntaxError: Expected an expression
.github/workflows/codespell.yml:18:11: E701 Multiple statements on one line (colon)
.github/workflows/codespell.yml:39:26: W292 [*] No newline at end of file
.github/workflows/codestyle.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/codestyle.yml:25:11: E701 Multiple statements on one line (colon)
.github/workflows/codestyle.yml:30:11: E701 Multiple statements on one line (colon)
.github/workflows/codestyle.yml:46:8: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:63:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:65:15: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:69:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:78:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:82:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:90:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:102:26: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:106:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:114:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:125:22: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:126:89: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:128:84: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:144:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:148:1: W293 [*] Blank line contains whitespace
.github/workflows/post-release.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/post-release.yml:124:37: W291 [*] Trailing whitespace
.github/workflows/pre-release.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/release.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/release.yml:16:7: E701 Multiple statements on one line (colon)
.github/workflows/release.yml:57:1: W293 [*] Blank line contains whitespace
.github/workflows/release.yml:59:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:3:4: E999 SyntaxError: Expected an expression
.github/workflows/stardis-tests.yml:22:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:39:11: W291 [*] Trailing whitespace
.github/workflows/stardis-tests.yml:51:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:58:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:64:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:69:1: W293 [*] Blank line contains whitespace
.github/workflows/stardis-tests.yml:75:32: W291 [*] Trailing whitespace
.github/workflows/stardis-tests.yml:76:20: W292 [*] No newline at end of file
.github/workflows/tests.yml:7:4: E999 SyntaxError: Expected an expression
.mailmap:1:38: E999 SyntaxError: Expected an expression
CHANGELOG.md:4:15: E999 SyntaxError: Expected ',', found ':'
CITATION.cff:3:1: E999 SyntaxError: Invalid annotated assignment target
CODE_OF_CONDUCT.md:4:5: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
CODE_OF_CONDUCT.md:6:28: COM818 Trailing comma on bare tuple prohibited
CODE_OF_CONDUCT.md:13:257: W291 [*] Trailing whitespace
GOVERNANCE.md:3:8: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
README.rst:1:1: E999 SyntaxError: Expected a statement
README_TEMPLATE.rst:1:1: E999 SyntaxError: Expected a statement
conda-linux-64.lock:5:1: E999 SyntaxError: Expected class, function definition or async function definition after decorator
conda-lock.yml:14:10: E999 SyntaxError: Expected an expression
conda-osx-64.lock:5:1: E999 SyntaxError: Expected class, function definition or async function definition after decorator
conda-osx-arm64.lock:5:1: E999 SyntaxError: Expected class, function definition or async function definition after decorator
docs/_static/ruff_badge.json:1:1: E902 No such file or directory (os error 2)
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:138:1: W293 Blank line contains whitespace
docs/conf.py:173:1: W293 Blank line contains whitespace
docs/conf.py:190:13: UP030 Use implicit references for positional format fields
docs/conf.py:190:13: UP032 [*] Use f-string instead of `format` call
docs/conf.py:217:1: E402 Module level import not at top of file
docs/conf.py:290:4: E712 Avoid equality comparisons to `True`; use `if toml_config_tool_dict["tardis"]['edit_on_github']:` for truth checks
docs/conf.py:351:1: E402 Module level import not at top of file
docs/conf.py:366:10: UP015 [*] Unnecessary open mode parameters, use ""w""
docs/conf.py:381:10: UP015 [*] Unnecessary open mode parameters, use ""w""
docs/contributing/development/azure_links.inc:2:1: E999 SyntaxError: Expected a statement
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:70: 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/developer_faq.rst:1:1: E999 SyntaxError: Expected an expression
docs/contributing/development/developer_faq.rst:13:40: W291 [*] Trailing whitespace
docs/contributing/development/index.rst:1:1: E999 SyntaxError: Expected a statement
docs/contributing/development/known_projects.inc:1:1: E999 SyntaxError: Expected a statement
docs/contributing/development/links.inc:1:1: E999 SyntaxError: Expected a statement
docs/contributing/development/links.inc:6:30: W292 [*] No newline at end of file
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:80: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/contributing/development/update_regression_data.rst:1:1: E902 No such file or directory (os error 2)
docs/contributing/tools/hdf_writer.ipynb:cell 3:9:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/hdf_writer.ipynb:cell 8:3:11: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:1:8: F401 [*] `tardis` imported but unused
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:5:38: F401 [*] `tardis.io.atom_data.base.AtomData` imported but unused
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:7:20: F811 [*] Redefinition of unused `run_tardis` from cell 2, line 2
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:11:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:11:1: I001 [*] Import block is un-sorted or un-formatted
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:12:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:13:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:13:30: F401 [*] `astropy.units` imported but unused
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:14:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:15:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 2:16:1: E402 Module level import not at top of cell
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:2:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:8:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:12:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:17:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:22:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:24:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:26:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:32:21: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:35:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:37:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:44:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:54:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:57:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:63:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:68:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 4:75:5: RET505 Unnecessary `elif` after `return` statement
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:1:32: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:2:35: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:3:37: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:4:41: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:5:31: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:6:31: W291 [*] Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:8:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:11:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:13:112: W291 Trailing whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:15:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:49:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:54:33: UP032 [*] Use f-string instead of `format` call
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:56:33: UP032 [*] Use f-string instead of `format` call
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 7:57:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 8:9:6: UP015 [*] Unnecessary open mode parameters
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 8:12:6: UP015 [*] Unnecessary open mode parameters
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 8:16:19: C416 Unnecessary `list` comprehension (rewrite using `list()`)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 8:17:23: C416 Unnecessary `list` comprehension (rewrite using `list()`)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 9:2:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 9:4:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 9:11:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:2:5: D202 [*] No blank lines allowed after function docstring (found 1)
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:4:1: W293 Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:18:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:30:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:44:1: W293 [*] Blank line contains whitespace
docs/contributing/tools/profiling/tardis_profiling_threads.ipynb:cell 10:45:43: UP032 [*] Use f-string instead of `format` call
docs/index.rst:1:1: E999 SyntaxError: Expected a statement
docs/index.rst:21:51: W291 [*] Trailing whitespace
docs/index.rst:43:76: W291 [*] Trailing whitespace
docs/index.rst:44:64: W291 [*] Trailing whitespace
docs/index.rst:45:71: W291 [*] Trailing whitespace
docs/index.rst:46:69: W291 [*] Trailing whitespace
docs/index.rst:47:68: W291 [*] Trailing whitespace
docs/index.rst:66:1: W293 [*] Blank line contains whitespace
docs/index.rst:79:1: W293 [*] Blank line contains whitespace
docs/index.rst:102:1: W293 [*] Blank line contains whitespace
docs/io/configuration/components/models/converters/arepo_to_tardis.ipynb:cell 6:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/configuration/components/models/converters/arepo_to_tardis.ipynb:cell 6:1:17: F401 [*] `numpy` imported but unused
docs/io/configuration/components/models/converters/arepo_to_tardis.ipynb:cell 6:4:8: F401 [*] `json` imported but unused
docs/io/configuration/components/models/csvy_full_rad.csvy:1:4: E999 SyntaxError: Expected an expression
docs/multiindex_isotope_decay_data.ipynb:cell 1:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/multiindex_isotope_decay_data.ipynb:cell 1:2:21: F401 [*] `pathlib.Path` imported but unused
docs/multiindex_isotope_decay_data.ipynb:cell 7:5:70: W291 [*] Trailing whitespace
docs/physics/plasma/detailed_balance/collisional_rate_coefficients.hdf:1:1: E902 No such file or directory (os error 2)
docs/physics/plasma/detailed_balance/comparison.ipynb:1:1: E902 No such file or directory (os error 2)
docs/physics/plasma/detailed_balance/rates.ipynb:1:1: E902 No such file or directory (os error 2)
docs/physics/plasma/detailed_balance/test_continuum_template_wkerzen_rate_coeffs.yml:1:1: E902 No such file or directory (os error 2)
docs/physics/tardisgamma/index.rst:1:1: E902 No such file or directory (os error 2)
docs/physics/tardisgamma/packetinitialization.rst:1:1: E902 No such file or directory (os error 2)
docs/quickstart.ipynb:cell 12:1:39: W291 [*] Trailing whitespace
docs/quickstart.ipynb:cell 12:5:35: W291 [*] Trailing whitespace
docs/quickstart.ipynb:cell 16:10:26: W605 [*] Invalid escape sequence: `\A`
docs/quickstart.ipynb:cell 16:11:40: W605 [*] Invalid escape sequence: `\A`
docs/resources/code_comparison/toy_models/blondin_compare.csvy:1:4: E999 SyntaxError: Expected an expression
docs/resources/code_comparison/toy_models/blondin_compare_01.csvy:1:4: E999 SyntaxError: Expected an expression
docs/resources/code_comparison/toy_models/blondin_compare_06.csvy:1:4: E999 SyntaxError: Expected an expression
docs/resources/credits.rst:1:1: E999 SyntaxError: Expected a statement
docs/workflows/simple_workflow.ipynb:1:1: E902 No such file or directory (os error 2)
docs/workflows/standard_workflow.ipynb:1:1: E902 No such file or directory (os error 2)
tardis/__init__.py:6:31: PGH004 Use specific rule codes when using `noqa`
tardis/__init__.py:25:1: I001 [*] Import block is un-sorted or un-formatted
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/_astropy_init.py:12:1: I001 [*] Import block is un-sorted or un-formatted
tardis/base.py:5:1: I001 [*] Import block is un-sorted or un-formatted
tardis/base.py:73:1: I001 [*] Import block is un-sorted or un-formatted
tardis/base.py:101:13: PLW0127 Self-assignment of variable `atom_data`
tardis/energy_input/util.py:383:5: RET505 Unnecessary `elif` after `return` statement
tardis/io/model/parse_radiation_field_configuration.py:118:13: G004 Logging statement uses f-string
tardis/io/util.py:18:20: N812 Lowercase `__path__` imported as non-lowercase `TARDIS_PATH`
tardis/io/util.py:190:60: W291 [*] Trailing whitespace
tardis/io/util.py:191:1: W293 [*] Blank line contains whitespace
tardis/io/util.py:290:9: RET506 Unnecessary `else` after `raise` statement
tardis/io/util.py:383:21: G004 Logging statement uses f-string
tardis/io/util.py:467:13: G004 Logging statement uses f-string
tardis/model/matter/composition.py:206:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/__init__.py:2:63: W291 Trailing whitespace
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/assembly/base.py:132:22: FA102 Missing `from __future__ import annotations`, but uses PEP 604 union
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/detailed_balance/rates/__init__.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/detailed_balance/rates/collision_strengths.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/detailed_balance/rates/collisional_rates.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/detailed_balance/rates/radiative_rates.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/detailed_balance/tests/__init__.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/detailed_balance/tests/test_collisional_transitions.py:1:1: E902 No such file or directory (os error 2)
tardis/plasma/properties/atomic.py:6:28: F401 [*] `radioactivedecay` imported but unused
tardis/plasma/properties/atomic.py:11:33: F401 [*] `tardis.constants` imported but unused
tardis/plasma/properties/atomic.py:379:17: UP032 [*] Use f-string instead of `format` call
tardis/plasma/properties/atomic.py:558:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/atomic.py:589:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/atomic.py:602:17: G004 Logging statement uses f-string
tardis/plasma/properties/atomic.py:643:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/base.py:78:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/base.py:117:25: G004 Logging statement uses f-string
tardis/plasma/properties/base.py:135:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/base.py:163:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/base.py:178:9: RET505 Unnecessary `else` after `return` statement
tardis/plasma/properties/continuum_processes/__init__.py:1:1: I001 [*] Import block is un-sorted or un-formatted
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.StimRecombRateFactor` 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.SpontRecombRateCoeff` 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.StimRecombRateCoeff` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/plasma/properties/continuum_processes/fast_array_util.py:3:1: I001 [*] Import block is un-sorted or un-formatted
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/helium_nlte.py:53:13: UP034 [*] Avoid extraneous parentheses
tardis/plasma/properties/helium_nlte.py:130:14: UP008 Use `super()` instead of `super(__class__, self)`
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:235:18: UP015 [*] Unnecessary open mode parameters
tardis/plasma/properties/helium_nlte.py:238:36: PIE808 [*] Unnecessary `start` argument in `range`
tardis/plasma/properties/helium_nlte.py:261:69: F821 Undefined name `s1`
tardis/plasma/properties/ion_population.py:206:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/ion_population.py:291:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/ion_population.py:370:25: G004 Logging statement uses f-string
tardis/plasma/properties/ion_population.py:424:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/ion_population.py:495:25: G004 Logging statement uses f-string
tardis/plasma/properties/level_population.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/properties/level_population.py:28:14: UP008 Use `super()` instead of `super(__class__, self)`
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/nlte_excitation_data.py:8:26: UP004 [*] Class `NLTEExcitationData` inherits from `object`
tardis/plasma/properties/nlte_rate_equation_solver.py:302:25: UP032 [*] Use f-string instead of `format` call
tardis/plasma/properties/nlte_rate_equation_solver.py:302:25: G001 Logging statement uses `str.format`
tardis/plasma/properties/nlte_rate_equation_solver.py:311:25: G004 Logging statement uses f-string
tardis/plasma/properties/partition_function.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/properties/partition_function.py:145:9: RET505 Unnecessary `elif` after `return` statement
tardis/plasma/properties/partition_function.py:161:14: UP008 Use `super()` instead of `super(__class__, self)`
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/partition_function.py:395:21: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/plasma_input.py:2:5: F401 [*] `tardis.plasma.properties.base.ArrayInput` imported but unused
tardis/plasma/properties/radiative_properties.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/properties/radiative_properties.py:42:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/radiative_properties.py:178:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/plasma/properties/rate_matrix_index.py:1:1: I001 [*] Import block is un-sorted or un-formatted
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/tests/test_complete_plasmas.py:149:27: FLY002 Consider `f"{hash_string}_{prop}"` instead of string join
tardis/plasma/tests/test_complete_plasmas.py:154:39: FLY002 Consider `f"{hash_string}_{nlte_prop}"` instead of string join
tardis/plasma/tests/test_hdf_plasma.py:1:17: F401 [*] `numpy` imported but unused
tardis/plasma/tests/test_nlte_excitation.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/tests/test_nlte_excitation.py:5:27: F401 [*] `numpy.testing.assert_allclose` imported but unused
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/plasma/tests/test_plasma_continuum.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/scripts/cmfgen2tardis.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/scripts/cmfgen2tardis.py:2:8: F401 [*] `sys` imported but unused
tardis/scripts/cmfgen2tardis.py:7:33: F401 [*] `tardis.io.atom_data.AtomData` imported but unused
tardis/scripts/cmfgen2tardis.py:15:27: F821 Undefined name `atomic_dataset`
tardis/scripts/cmfgen2tardis.py:43:10: UP015 [*] Unnecessary open mode parameters
tardis/scripts/cmfgen2tardis.py:70:34: F821 Undefined name `atomic_dataset`
tardis/scripts/cmfgen2tardis.py:105:18: FLY002 Consider `f"{filename}.csv"` instead of string join
tardis/simulation/base.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/simulation/base.py:155:14: UP008 Use `super()` instead of `super(__class__, self)`
tardis/simulation/base.py:199:13: RET506 Unnecessary `else` after `raise` statement
tardis/simulation/base.py:263:17: G004 Logging statement uses f-string
tardis/simulation/base.py:270:9: RET505 Unnecessary `else` after `return` statement
tardis/simulation/base.py:451:13: G004 Logging statement uses f-string
tardis/simulation/base.py:549:13: G004 Logging statement uses f-string
tardis/simulation/base.py:656:25: G004 Logging statement uses f-string
tardis/simulation/base.py:659:13: G004 Logging statement uses f-string
tardis/simulation/base.py:664:13: G004 Logging statement uses f-string
tardis/simulation/base.py:715:13: TRY300 Consider moving this statement to an `else` block
tardis/simulation/base.py:717:26: G004 Logging statement uses f-string
tardis/spectrum/formal_integral.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/spectrum/formal_integral.py:9:25: F401 [*] `numba.char` imported but unused
tardis/spectrum/formal_integral.py:9:31: F401 [*] `numba.float64` imported but unused
tardis/spectrum/formal_integral.py:9:40: F401 [*] `numba.int64` imported but unused
tardis/spectrum/formal_integral.py:9:47: F401 [*] `numba.typeof` imported but unused
tardis/spectrum/formal_integral.py:9:55: F401 [*] `numba.byte` imported but unused
tardis/spectrum/formal_integral.py:10:32: F401 [*] `numba.experimental.jitclass` imported but unused
tardis/spectrum/formal_integral.py:21:5: F811 Redefinition of unused `opacity_state_initialize` from line 15
tardis/spectrum/formal_integral.py:22:5: F811 Redefinition of unused `OpacityState` from line 14
tardis/spectrum/formal_integral.py:22:5: F401 [*] `tardis.transport.montecarlo.numba_interface.OpacityState` imported but unused
tardis/spectrum/formal_integral.py:55:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/spectrum/formal_integral.py:65:7: TD006 [*] Invalid TODO capitalization: `todo` should be `TODO`
tardis/spectrum/formal_integral.py:218:29: UP004 [*] Class `NumbaFormalIntegrator` inherits from `object`
tardis/spectrum/formal_integral.py:261:24: UP004 [*] Class `FormalIntegrator` inherits from `object`
tardis/spectrum/formal_integral.py:299:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/spectrum/formal_integral.py:344:13: RET506 Unnecessary `else` after `raise` statement
tardis/spectrum/formal_integral.py:356:16: E713 [*] Test for membership should be `not in`
tardis/spectrum/formal_integral.py:615:9: D209 [*] Multi-line docstring closing quotes should be on a separate line
tardis/spectrum/formal_integral.py:684:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral.py:720:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral_cuda.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/spectrum/formal_integral_cuda.py:1:8: F401 [*] `sys` imported but unused
tardis/spectrum/formal_integral_cuda.py:3:30: F401 [*] `astropy.units` imported but unused
tardis/spectrum/formal_integral_cuda.py:4:19: F401 [*] `numba.float64` imported but unused
tardis/spectrum/formal_integral_cuda.py:4:28: F401 [*] `numba.int64` imported but unused
tardis/spectrum/formal_integral_cuda.py:17:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/spectrum/formal_integral_cuda.py:58:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/spectrum/formal_integral_cuda.py:237:28: UP004 [*] Class `CudaFormalIntegrator` inherits from `object`
tardis/spectrum/formal_integral_cuda.py:378:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral_cuda.py:423:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral_cuda.py:433:5: PIE790 [*] Unnecessary `pass` statement
tardis/spectrum/formal_integral_cuda.py:513:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/spectrum/formal_integral_cuda.py:555:5: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/spectrum/tests/test_cuda_formal_integral.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/spectrum/tests/test_cuda_formal_integral.py:15:46: F401 [*] `tardis.transport.montecarlo.base.MonteCarloTransportSolver` imported but unused
tardis/spectrum/tests/test_numba_formal_integral.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/spectrum/tests/test_numba_formal_integral.py:5:18: F401 [*] `copy.deepcopy` imported but unused
tardis/spectrum/tests/test_spectrum.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/fixtures/atom_data.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/fixtures/atom_data.py:2:21: F401 [*] `pathlib.Path` imported but unused
tardis/tests/integration_tests/at/abundances.dat:2:1: E999 SyntaxError: Unexpected indentation
tardis/tests/integration_tests/at/config.yml:2:7: E999 SyntaxError: Expected an expression
tardis/tests/integration_tests/at/densities.dat:1:10: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
tardis/tests/integration_tests/conftest.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/integration_tests/conftest.py:42:13: F821 Undefined name `tardis_githash`
tardis/tests/integration_tests/conftest.py:87:5: RET505 Unnecessary `else` after `return` statement
tardis/tests/integration_tests/conftest.py:90:16: UP024 [*] Replace aliased errors with `OSError`
tardis/tests/integration_tests/conftest.py:91:19: UP024 [*] Replace aliased errors with `OSError`
tardis/tests/integration_tests/paper1_downbranch/config.yml:7:4: E999 SyntaxError: Expected an expression
tardis/tests/integration_tests/paper1_macroatom/abundances.dat:1:1: E999 SyntaxError: Unexpected indentation
tardis/tests/integration_tests/paper1_macroatom/config.yml:7:4: E999 SyntaxError: Expected an expression
tardis/tests/integration_tests/paper1_macroatom/densities.dat:1:1: E999 SyntaxError: Unexpected indentation
tardis/tests/integration_tests/paper1_scatter/config.yml:7:4: E999 SyntaxError: Expected an expression
tardis/tests/integration_tests/test_integration.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/integration_tests/test_integration.py:5:8: ICN001 `matplotlib` should be imported as `mpl`
tardis/tests/integration_tests/test_integration.py:8:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/integration_tests/test_integration.py:74:23: UP004 [*] Class `TestIntegration` inherits from `object`
tardis/tests/integration_tests/w7/abundances.dat:2:1: E999 SyntaxError: Unexpected indentation
tardis/tests/integration_tests/w7/config.yml:2:7: E999 SyntaxError: Expected an expression
tardis/tests/integration_tests/w7/densities.dat:1:11: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
tardis/tests/test_util.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/tests/test_util.py:3:25: F401 [*] `numpy.testing` imported but unused
tardis/tests/test_util.py:15:5: F401 [*] `tardis.util.base.create_synpp_yaml` imported but unused
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:26:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/visualization/tools/liv_plot.py:49:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/visualization/tools/liv_plot.py:305:13: RET506 Unnecessary `elif` after `raise` statement
tardis/visualization/tools/sdec_plot.py:8:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/sdec_plot.py:21:5: F401 [*] `tardis.util.base.element_symbol2atomic_number` imported but unused
tardis/visualization/tools/sdec_plot.py:23:5: F401 [*] `tardis.util.base.roman_to_int` imported but unused
tardis/visualization/tools/sdec_plot.py:24:5: F401 [*] `tardis.util.base.species_string_to_tuple` imported but unused
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:611:13: RET506 Unnecessary `else` after `raise` statement
tardis/visualization/tools/sdec_plot.py:1131:11: W291 [*] Trailing whitespace
tardis/visualization/tools/sdec_plot.py:1536:10: W291 [*] Trailing whitespace
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:128:1: W293 [*] Blank line contains whitespace
tardis/visualization/tools/tests/test_liv_plot.py:132:1: W293 [*] Blank line contains whitespace
tardis/visualization/tools/tests/test_liv_plot.py:143:1: W293 [*] Blank line contains whitespace
tardis/visualization/tools/tests/test_liv_plot.py:363: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:182:1: W293 [*] Blank line contains whitespace
tardis/visualization/tools/tests/test_sdec_plot.py:333:29: ISC003 Explicitly concatenated string should be implicitly concatenated
tardis/visualization/tools/tests/test_sdec_plot.py:388:9: F811 Redefinition of unused `test_generate_plot_mpl` from line 299
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/workflows/__init__.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/simple_tardis_workflow.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/standard_tardis_workflow.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/workflow_logging.py:1:1: E902 No such file or directory (os error 2)
tardis_env3.yml:3:10: E999 SyntaxError: Expected an expression
Found 439 errors.
[*] 228 fixable with the `--fix` option (44 hidden fixes can be enabled with the `--unsafe-fixes` option).

tardis/io/util.py Outdated Show resolved Hide resolved
tardis/io/util.py Outdated Show resolved Hide resolved
@rudrakshnalbalwar rudrakshnalbalwar marked this pull request as draft October 2, 2024 08:45
@rudrakshnalbalwar rudrakshnalbalwar marked this pull request as ready for review October 2, 2024 08:50
@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 2, 2024

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

Significantly changed benchmarks:

All benchmarks:

Benchmarks that have stayed the same:

| Change   | Before [6ee870e0] <master>   | After [8b00774e]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 531±200ns                    | 651±100ns           | ~1.23   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 1.89±1μs                     | 2.32±1μs            | ~1.23   | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 501±100ns                    | 591±200ns           | ~1.18   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 2.95±0.6μs                   | 3.29±0.6μs          | ~1.12   | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 45.0±20μs                    | 49.9±30μs           | ~1.11   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 1.45±0.4μs                   | 1.23±0.4μs          | ~0.85   | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 3.79±0ms                     | 4.09±0.01ms         | 1.08    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 6.58±0.5μs                   | 7.07±3μs            | 1.07    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket                                           |
|          | 1.17±0μs                     | 1.22±0.08μs         | 1.04    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 30.3±0μs                     | 30.7±0.04μs         | 1.02    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 40.3±0.02s                   | 40.5±0.06s          | 1.01    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 1.06±0m                      | 1.07±0m             | 1.01    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 2.06±0m                      | 2.07±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 2.69±0.5ms                   | 2.68±0.5ms          | 1.00    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 41.7±20μs                    | 41.4±20μs           | 0.99    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 511±100ns                    | 500±100ns           | 0.98    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |
|          | 206±0.1ns                    | 203±0.4ns           | 0.98    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 1.68±0.02ms                  | 1.65±0ms            | 0.98    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 65.0±0.5ms                   | 62.8±0.2ms          | 0.97    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 22.4±6μs                     | 21.5±5μs            | 0.96    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
|          | 7.32±2μs                     | 7.02±2μs            | 0.96    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |
|          | 3.43±0.4μs                   | 3.25±0.7μs          | 0.95    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 2.81±0.02ms                  | 2.63±0.02ms         | 0.94    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 746±6ns                      | 704±0.3ns           | 0.94    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |

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

@rudrakshnalbalwar rudrakshnalbalwar changed the title moved _parse_species_list function to tardis.io.util.py moved _parse_species_list function to tardis.io.util.py for #2764 Oct 2, 2024
@rudrakshnalbalwar rudrakshnalbalwar changed the title moved _parse_species_list function to tardis.io.util.py for #2764 moved _parse_species_list function to tardis.io.util.py Oct 2, 2024
@jvshields
Copy link
Contributor

Thanks for the contribution! This is a good change, but I think you need to double check where this function is used in the codebase, and change any imports or function calls to point to the right location. I believe that this function is used in the LIV and SDEC plot classes. https://github.com/search?q=repo%3Atardis-sn%2Ftardis%20_parse_species_list&type=code

@rudrakshnalbalwar
Copy link
Author

@jvshields I made the changes as you mentioned , I’ve removed the underscore from the parse_species_list function name as requested. However, I did not change the name of the test function test_parse_species_list, since it already follows the convention for testing this function. And I noticed that there were no explicit imports for the _parse_species_list function previously. Since the function is used within the same class/module, an import doesn't seem necessary in this case. Therefore, I haven't added an import for parse_species_list either.

@rudrakshnalbalwar
Copy link
Author

Also one more thing do I have to make changes here too ?
tardis/.pytest_cache/v/cache/nodeids
@jvshields , @atharva-2001 , @andrewfullard

@@ -508,7 +508,7 @@ def from_hdf(cls, hdf_fpath, packets_mode=None):
}
)

def _parse_species_list(self, species_list):
def parse_species_list(self, species_list):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this being imported?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this serve a different functionality?

@@ -172,7 +172,7 @@ def test_parse_species_list(self, request, plotter, attribute):
species : list
"""
# THIS NEEDS TO BE RUN FIRST. NOT INDEPENDENT TESTS
plotter._parse_species_list(self.species_list[0])
plotter.parse_species_list(self.species_list[0])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be tested elsewhere

@Knights-Templars Knights-Templars marked this pull request as draft October 14, 2024 14:55
@jvshields
Copy link
Contributor

Please double check that the tests are passing.

I believe that the full refactor here should look like this.

First, move the parse_species_list() function to the util file. (You have done this and it looks good)

Next, remove the function definition from the sdec plot and liv plot classes. Import the more generic function from the util file.

Finally, wherever the function is used in those classes, make sure that it's working properly with the new imported function.
The tests here will tell you if everything is hooked up correctly.

Thanks.

@rudrakshnalbalwar rudrakshnalbalwar marked this pull request as ready for review November 2, 2024 12:57
@rudrakshnalbalwar
Copy link
Author

rudrakshnalbalwar commented Nov 3, 2024

Please double check that the tests are passing.

I believe that the full refactor here should look like this.

First, move the parse_species_list() function to the util file. (You have done this and it looks good)

Next, remove the function definition from the sdec plot and liv plot classes. Import the more generic function from the util file.

Finally, wherever the function is used in those classes, make sure that it's working properly with the new imported function. The tests here will tell you if everything is hooked up correctly.

Thanks.

As you mentioned, I've implemented those changes, and I ran all the tests locally on my device. They are all passing successfully. Could you please review the changes?

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.62%. Comparing base (3b6084f) to head (f3b31dd).
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2837      +/-   ##
==========================================
- Coverage   70.89%   69.62%   -1.27%     
==========================================
  Files         209      216       +7     
  Lines       15589    16090     +501     
==========================================
+ Hits        11052    11203     +151     
- Misses       4537     4887     +350     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

If species list contains invalid entries.

"""
from tardis.util.base import atomic_number2element_symbol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this import defined here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is defined inside the function to break the circular dependency between tardis.io.util and tardis.util.base

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in the below sdec_plot
The parse_species_list function in util.py builds on the sdec_plot.py version by not only parsing species but also filtering them based on interaction frequency in the data. This makes it more data-driven and adaptable for cases where top interacting elements are needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports should be defined at the start of the file right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but importing this statement at the start of the file creates a circular dependency. Specifically, atomic_number2element_symbol is imported from tardis.util.base, and within tardis.util.base, get_internal_data_path is imported from util.py, which triggers a circular loop. Refactoring the functions to avoid this would increase code complexity and could introduce new errors.

@@ -508,7 +508,7 @@ def from_hdf(cls, hdf_fpath, packets_mode=None):
}
)

def _parse_species_list(self, species_list):
def parse_species_list(self, species_list):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this serve a different functionality?

@@ -160,7 +211,7 @@ def traverse_configs(base, other, func, *args):
traverse_configs(base[k], other[k], func, *args)
elif (
isinstance(base, collections_abc.Iterable)
and not isinstance(base, basestring)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change was made to ensure that function is compatible with python 3

@@ -138,6 +138,57 @@ def yaml_load_file(filename, loader=yaml.Loader):
return yaml.load(stream, Loader=loader)


def parse_species_list(sdec_plotter, data, species_list, packets_mode, nelements=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it take a plotter argument? What is the purpose of this function?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it relies on some methods and attributes within sdec_plotter to parse and organize the species list.

@rudrakshnalbalwar
Copy link
Author

Hey @atharva-2001 and Prof. @wkerzendorf,
I've made the necessary changes to both sdec_plot.py and test_sdec_plot.py files as part of refactoring the parse_species_list functionality. The function is now correctly imported from util.py after being moved from liv_plot.py.
Could you please review the changes and let me know if everything looks good or if any further adjustments are needed?

@andrewfullard
Copy link
Contributor

Thanks for the contribution. Unfortunately we have decided to take a different path to refactor this part of the code. Specifically your plan to reference the sdec_plotter object within the function makes it less useful as a general utility function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants