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

Failing Docs Fix #2832

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Failing Docs Fix #2832

merged 1 commit into from
Sep 30, 2024

Conversation

atharva-2001
Copy link
Member

📝 Description

Type: 🪲 bugfix | 🚀 feature | ☣️ breaking change | 🚦 testing | 📝 documentation | 🎢 infrastructure

A bad import of download_atom_data caused this.
This PR replaces the import mechanism of download_atom_data function.

📌 Resources

Examples, notebooks, and links to useful references.

🚦 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.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tardis-bot
Copy link
Contributor

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

24	W291  	[*] Trailing whitespace
22	W293  	[*] Blank line contains whitespace
20	I001  	[*] Import block is un-sorted or un-formatted
10	S108  	[ ] Probable insecure usage of temporary file or directory: "/tmp/full_example.hdf"
9	E402  	[ ] Module level import not at top of cell
8	F401  	[*] `astropy.units` imported but unused
6	D202  	[*] No blank lines allowed after function docstring (found 1)
4	ICN001	[ ] `pandas` should be imported as `pd`
3	UP015 	[*] Unnecessary open mode parameters
3	UP032 	[*] Use f-string instead of `format` call
2	C416  	[*] Unnecessary `list` comprehension (rewrite using `list()`)
2	W605  	[*] Invalid escape sequence: `\A`
1	G004  	[ ] Logging statement uses f-string
1	RET505	[ ] Unnecessary `elif` after `return` statement
1	E703  	[*] Statement ends with an unnecessary semicolon
1	F541  	[*] f-string without any placeholders
1	F811  	[*] Redefinition of unused `run_tardis` from cell 2, line 2

Complete output(might be large):

docs/contributing/tools/profiling/profiling_example.ipynb:cell 3:3:1: I001 [*] Import block is un-sorted or un-formatted
docs/contributing/tools/profiling/profiling_example.ipynb:cell 3:3:20: F401 [*] `tardis.run_tardis` imported but unused
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/io/grid/how_to_TardisGridTutorial.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/grid/how_to_TardisGridTutorial.ipynb:cell 7:2:74: W291 [*] Trailing whitespace
docs/io/grid/how_to_TardisGridTutorial.ipynb:cell 14:1:47: W291 [*] Trailing whitespace
docs/io/grid/how_to_TardisGridTutorial.ipynb:cell 14:4:46: E703 [*] Statement ends with an unnecessary semicolon
docs/io/grid/how_to_TardisGridTutorial.ipynb:cell 15:2:55: W291 [*] Trailing whitespace
docs/io/optional/tutorial_callback_example.ipynb:cell 5:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/optional/tutorial_callback_example.ipynb:cell 5:5:1: E402 Module level import not at top of cell
docs/io/optional/tutorial_callback_example.ipynb:cell 5:6:1: E402 Module level import not at top of cell
docs/io/optional/tutorial_callback_example.ipynb:cell 5:12:39: W291 [*] Trailing whitespace
docs/io/optional/tutorial_callback_example.ipynb:cell 9:5:29: W291 [*] Trailing whitespace
docs/io/optional/tutorial_callback_example.ipynb:cell 9:9:39: W291 [*] Trailing whitespace
docs/io/optional/tutorial_callback_example.ipynb:cell 14:6:65: W291 [*] Trailing whitespace
docs/io/optional/tutorial_callback_example.ipynb:cell 14:10:39: W291 [*] Trailing whitespace
docs/io/optional/tutorial_logging_configuration.ipynb:cell 31:1:21: W291 [*] Trailing whitespace
docs/io/output/how_to_physical_quantities.ipynb:cell 4:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/output/how_to_plasma_graph.ipynb:cell 3:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/output/how_to_plasma_graph.ipynb:cell 19:1:6: UP015 [*] Unnecessary open mode parameters
docs/io/output/how_to_rpacket_tracking.ipynb:cell 12:1:62: W291 [*] Trailing whitespace
docs/io/output/how_to_to_hdf.ipynb:cell 5:1:19: S108 Probable insecure usage of temporary file or directory: "/tmp/full_example.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 7:3:20: S108 Probable insecure usage of temporary file or directory: "/tmp/full_example.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 14:1:26: S108 Probable insecure usage of temporary file or directory: "/tmp/plasma_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 15:1:8: ICN001 `pandas` should be imported as `pd`
docs/io/output/how_to_to_hdf.ipynb:cell 15:3:31: S108 Probable insecure usage of temporary file or directory: "/tmp/plasma_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 17:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/output/how_to_to_hdf.ipynb:cell 17:2:26: S108 Probable insecure usage of temporary file or directory: "/tmp/plasma_input_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 18:1:8: ICN001 `pandas` should be imported as `pd`
docs/io/output/how_to_to_hdf.ipynb:cell 18:3:37: S108 Probable insecure usage of temporary file or directory: "/tmp/plasma_input_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 20:1:36: S108 Probable insecure usage of temporary file or directory: "/tmp/model_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 21:1:8: ICN001 `pandas` should be imported as `pd`
docs/io/output/how_to_to_hdf.ipynb:cell 21:3:30: S108 Probable insecure usage of temporary file or directory: "/tmp/model_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 23:1:29: S108 Probable insecure usage of temporary file or directory: "/tmp/transport_output.hdf"
docs/io/output/how_to_to_hdf.ipynb:cell 24:1:8: ICN001 `pandas` should be imported as `pd`
docs/io/output/how_to_to_hdf.ipynb:cell 24:3:34: S108 Probable insecure usage of temporary file or directory: "/tmp/transport_output.hdf"
docs/io/visualization/how_to_generating_widgets.ipynb:cell 5:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/visualization/how_to_generating_widgets.ipynb:cell 5:3:5: F401 [*] `tardis.visualization.shell_info_from_hdf` imported but unused
docs/io/visualization/how_to_sdec_plot.ipynb:cell 2:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/visualization/how_to_sdec_plot.ipynb:cell 29:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/visualization/tutorial_convergence_plot.ipynb:cell 9:4:28: W291 [*] Trailing whitespace
docs/io/visualization/tutorial_convergence_plot.ipynb:cell 12:29:1: W293 [*] Blank line contains whitespace
docs/io/visualization/tutorial_convergence_plot.ipynb:cell 13:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/io/visualization/tutorial_montecarlo_packet_visualization.ipynb:cell 5:1:1: I001 [*] Import block is un-sorted or un-formatted
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/nlte/nlte_rates.ipynb:cell 1:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/nlte/nlte_rates.ipynb:cell 1:1:32: F401 [*] `tardis.plasma.nlte.nlte_data` imported but unused
docs/physics/nlte/nlte_rates.ipynb:cell 1:5:19: F401 [*] `scipy.sparse` imported but unused
docs/physics/setup/model.ipynb:cell 2:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/setup/model.ipynb:cell 25:19:12: F541 [*] f-string without any placeholders
docs/physics/setup/setup_example.ipynb:cell 2:2:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/spectrum/basic.ipynb:cell 3:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/update_and_conv/update_and_conv.ipynb:cell 7:1:1: I001 [*] Import block is un-sorted or un-formatted
docs/physics/update_and_conv/update_and_conv.ipynb:cell 18:1:69: W291 [*] Trailing whitespace
docs/physics/update_and_conv/update_and_conv.ipynb:cell 26:1:50: W291 [*] Trailing whitespace
docs/physics/update_and_conv/update_and_conv.ipynb:cell 31:11:1: E402 Module level import not at top of cell
docs/physics/update_and_conv/update_and_conv.ipynb:cell 31:11:1: I001 [*] Import block is un-sorted or un-formatted
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`
tardis/io/atom_data/util.py:35:13: G004 Logging statement uses f-string
Found 118 errors.
[*] 80 fixable with the `--fix` option (13 hidden fixes can be enabled with the `--unsafe-fixes` option).

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.72%. Comparing base (de4d872) to head (a51c772).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2832      +/-   ##
==========================================
- Coverage   70.89%   70.72%   -0.18%     
==========================================
  Files         209      209              
  Lines       15589    15589              
==========================================
- Hits        11052    11025      -27     
- Misses       4537     4564      +27     

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

@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

The docs workflow has succeeded ✔️

Click here to see your results.

@jvshields jvshields merged commit 2b912a6 into tardis-sn:master Sep 30, 2024
16 of 28 checks passed
CePowers pushed a commit to CePowers/tardis that referenced this pull request Oct 1, 2024
Fix download_atom_data import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants