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

Makes get_tau_integ a method of class OpacityState #2959

Closed
wants to merge 15 commits into from

Conversation

Sonu0305
Copy link
Contributor

📝 Description

Type: 🎢 infrastructure

  • Moved get_tau_integ from tardis\workflows\util.py to class OpacityState in tardis\opacities\opacity_state.py.
  • Fixed the imports
  • Updated the only reference of get_tau_integ in tardis\workflows\v_inner_solver.py.

Closes #2883

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

@tardis-bot
Copy link
Contributor

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

11	F405  	[ ] `const` may be undefined, or defined from star imports
4	F401  	[*] `astropy.constants` imported but unused
3	G004  	[ ] Logging statement uses f-string
1	ANN204	[ ] Missing return type annotation for special method `__getitem__`
1	TD005 	[ ] Missing issue description after `TODO`
1	D202  	[*] No blank lines allowed after function docstring (found 1)
1	D406  	[*] Section name should end with a newline ("Returns")
1	D407  	[*] Missing dashed underline after section ("Returns")
1	F403  	[ ] `from tardis.workflows.util import *` used; unable to detect undefined names

Complete output(might be large):

tardis/opacities/opacity_state.py:9:1: F403 `from tardis.workflows.util import *` used; unable to detect undefined names
tardis/opacities/opacity_state.py:111:9: ANN204 Missing return type annotation for special method `__getitem__`
tardis/opacities/opacity_state.py:117:9: D407 [*] Missing dashed underline after section ("Returns")
tardis/opacities/opacity_state.py:117:9: D406 [*] Section name should end with a newline ("Returns")
tardis/opacities/opacity_state.py:248:9: D202 [*] No blank lines allowed after function docstring (found 1)
tardis/opacities/opacity_state.py:389:54: F405 `u` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:397:56: F405 `u` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:415:48: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:421:19: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:423:19: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:424:27: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:424:43: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:429:34: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:429:60: F405 `const` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:437:57: F405 `u` may be undefined, or defined from star imports
tardis/opacities/opacity_state.py:437:72: F405 `const` may be undefined, or defined from star imports
tardis/workflows/util.py:1:17: F401 [*] `numpy` imported but unused
tardis/workflows/util.py:2:34: F401 [*] `astropy.constants` imported but unused
tardis/workflows/util.py:3:30: F401 [*] `astropy.units` imported but unused
tardis/workflows/v_inner_solver.py:8:44: F401 [*] `tardis.opacities.opacity_state.OpacityState` imported but unused
tardis/workflows/v_inner_solver.py:16:3: TD005 Missing issue description after `TODO`
tardis/workflows/v_inner_solver.py:179:17: G004 Logging statement uses f-string
tardis/workflows/v_inner_solver.py:206:17: G004 Logging statement uses f-string
tardis/workflows/v_inner_solver.py:314:17: G004 Logging statement uses f-string
Found 24 errors.
[*] 7 fixable with the `--fix` option.

Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 4.76190% with 40 lines in your changes missing coverage. Please review.

Project coverage is 69.20%. Comparing base (ba33d7b) to head (8ff2fa7).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
tardis/opacities/opacity_state.py 4.87% 39 Missing ⚠️
tardis/workflows/v_inner_solver.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2959      +/-   ##
==========================================
- Coverage   69.52%   69.20%   -0.33%     
==========================================
  Files         228      228              
  Lines       16429    16430       +1     
==========================================
- Hits        11422    11370      -52     
- Misses       5007     5060      +53     

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

@Sonu0305
Copy link
Contributor Author

Sonu0305 commented Feb 6, 2025

Hi,
Are there any further changes to be made to this PR, please let me know when you have a chance, Thank You.

@wkerzendorf
Copy link
Member

Thank you! Please don't make anymore PRs until you apply with us.

@Sonu0305
Copy link
Contributor Author

Thank you! Please don't make anymore PRs until you apply with us.

Thank you for the guidance! I’ll hold off on PRs and focus on applying for GSoC with your organization. Looking forward to contributing further soon.

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.

Make tardis/tardis/workflows/util.py:get_tau_integ a method of the opacity state
4 participants