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

opacity_state_to_numba -> to_numba and moved to as a method of class OpacityState #2932

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Sonu0305
Copy link
Contributor

@Sonu0305 Sonu0305 commented Jan 9, 2025

📝 Description

Type: 🎢 infrastructure

  • Change the one of the methods name:
    opacity_state_to_numba -> to_numba
  • Moved to make it defined as one of the methods of class OpacityState

Closes #2882

📌 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

tardis-bot commented Jan 9, 2025

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

2	RET505	[ ] Unnecessary `else` after `return` statement
1	ANN204	[ ] Missing return type annotation for special method `__getitem__`
1	INP001	[ ] File `tardis/opacities/tests/test_opacity_state_numba.py` is part of an implicit namespace package. Add an `__init__.py`.
1	RET506	[ ] Unnecessary `else` after `raise` statement
1	I001  	[*] Import block is un-sorted or un-formatted
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	F401  	[*] `tardis.opacities.opacity_state.OpacityState` imported but unused
1	F821  	[ ] Undefined name `opacity_state_numba`

Complete output(might be large):

tardis/opacities/opacity_state.py:110:9: ANN204 Missing return type annotation for special method `__getitem__`
tardis/opacities/opacity_state.py:116:9: D407 [*] Missing dashed underline after section ("Returns")
tardis/opacities/opacity_state.py:116:9: D406 [*] Section name should end with a newline ("Returns")
tardis/opacities/opacity_state.py:247:9: D202 [*] No blank lines allowed after function docstring (found 1)
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/opacities/tests/test_opacity_state_numba.py:2:44: F401 [*] `tardis.opacities.opacity_state.OpacityState` imported but unused
tardis/spectrum/formal_integral.py:369:13: RET506 Unnecessary `else` after `raise` statement
tardis/spectrum/formal_integral.py:709:5: RET505 Unnecessary `else` after `return` statement
tardis/spectrum/formal_integral.py:745:5: RET505 Unnecessary `else` after `return` statement
tardis/transport/montecarlo/base.py:133:31: F821 Undefined name `opacity_state_numba`
Found 11 errors.
[*] 5 fixable with the `--fix` option.

@Sonu0305 Sonu0305 marked this pull request as draft January 9, 2025 19:03
@Sonu0305 Sonu0305 marked this pull request as ready for review January 10, 2025 07:28
@Sonu0305
Copy link
Contributor Author

Sonu0305 commented Jan 10, 2025

Hi @andrewfullard @atharva-2001 ,
Few tests are failing but I can't relate with the changes in this PR.
Please review this when you have a chance, Thank You.

@atharva-2001
Copy link
Member

Tests pass in master, that means it has something to with this PR right?
The Opacity tests fail-
tardis/opacities/tests/test_opacity_state_numba.py EEEEE

@Sonu0305
Copy link
Contributor Author

Tests pass in master, that means it has something to with this PR right? The Opacity tests fail- tardis/opacities/tests/test_opacity_state_numba.py EEEEE

Okay Thank You, I will look into it soon.

@Sonu0305 Sonu0305 marked this pull request as draft January 10, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opacity_state_to_numba should be a method of the OpacityState
3 participants