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

Add examples to thermal_bremsstrahlung docstring #2618

Merged
merged 3 commits into from Apr 9, 2024
Merged

Conversation

jwreep
Copy link
Contributor

@jwreep jwreep commented Apr 5, 2024

Description

I've added a few examples to the docstring of thermal_bremsstrahlung.

Related issues

Fixes #2529

@jwreep jwreep requested a review from a team as a code owner April 5, 2024 03:02
@jwreep jwreep requested review from ejohnson-96 and removed request for a team April 5, 2024 03:02
@github-actions github-actions bot added the plasmapy.formulary Related to the plasmapy.formulary subpackage label Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱

Our contributor guide has information on:

The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:

  • Try fixing CI / Python 3.12 test failures first.
  • Most pre-commit.ci - pr failures can be automagically fixed by commenting pre-commit.ci autofix below, followed by a git pull to bring the changes back to your computer. Please also see our pre-commit troubleshooting guide.
  • If pre-commit.ci - pr says that a function is too long or complex, try breaking up that function into multiple short functions that each do one thing. See also these tips on writing clean scientific software.
  • If the CI / Documentation check ends with a cryptic error message, check out our documentation troubleshooting guide.
  • For a documentation preview, click on Details next to docs/readthedocs.org:plasmapy.

If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder.

Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples.

We thank you once again!

@github-actions github-actions bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.17%. Comparing base (ac0ffc8) to head (b61ba88).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2618   +/-   ##
=======================================
  Coverage   95.17%   95.17%           
=======================================
  Files         104      104           
  Lines        9417     9417           
  Branches     2154     2154           
=======================================
  Hits         8963     8963           
  Misses        276      276           
  Partials      178      178           

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

@jwreep
Copy link
Contributor Author

jwreep commented Apr 5, 2024

Not sure I understand the Read the Docs error in the checks. What have I done wrong here?

@pheuer pheuer self-requested a review April 5, 2024 14:10
@pheuer
Copy link
Member

pheuer commented Apr 5, 2024

Not sure I understand the Read the Docs error in the checks. What have I done wrong here?

@namurphy FYI
I'm looking into this: I can reproduce this error locally by upgrading my lmfit version from 1.2.0 to 1.3.0 (the latter is what PlasmaPy is now running on, at least in CI). The error occurs in thomson_fitting.ipynb:

Edit: opened #2620

This isn't related to this PR, so @namurphy I suggest we ignore the error?

@jwreep
Copy link
Contributor Author

jwreep commented Apr 5, 2024

Well, at least glad to hear it wasn't something I did. I was a bit surprised that adding comments should cause issues.

Thanks for diagnosing the error!

@pheuer
Copy link
Member

pheuer commented Apr 6, 2024

Well, at least glad to hear it wasn't something I did. I was a bit surprised that adding comments should cause issues.

Thanks for diagnosing the error!

Thanks for finding it! A fix has now been merged into main, so if you merge main into this branch this test should pass!

@jwreep
Copy link
Contributor Author

jwreep commented Apr 6, 2024

Well, readthedocs passed, but looks like another bug has taken its place. Has anything else been patched?

FAILED plasmapy/utils/data/tests/test_downloader.py::test_at_most_one_api_call - requ...
FAILED plasmapy/utils/data/tests/test_downloader.py::test_creating_another_downloader

@pheuer
Copy link
Member

pheuer commented Apr 6, 2024

This test that failed relies on a connection to the GitHub API, and for some reason it looks like that is timing out? I wonder if the API is just temporarily down? I am trying re-running it

======================================= FAILURES =======================================
______________________________ test_at_most_one_api_call _______________________________
[gw2] darwin -- Python 3.11.8 /Users/runner/work/PlasmaPy/PlasmaPy/.tox/py311-pins-pytest_cov_all/.venv/bin/python
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:467: in _make_request
    self._validate_conn(conn)
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1099: in _validate_conn
    conn.connect()
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/connection.py:653: in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/connection.py:806: in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/util/ssl_.py:465: in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
.tox/py311-pins-pytest_cov_all/.venv/lib/python3.11/site-packages/urllib3/util/ssl_.py:509: in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py:517: in wrap_socket
    return self.sslsocket_class._create(
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py:1104: in _create
    self.do_handshake()
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py:1382: in do_handshake
    self._sslobj.do_handshake()
E   TimeoutError: _ssl.c:9[89](https://github.com/PlasmaPy/PlasmaPy/actions/runs/8577281504/job/23509646075?pr=2618#step:6:90): The handshake operation timed out

@pheuer
Copy link
Member

pheuer commented Apr 6, 2024

Ok, re-running that test fixed it, so I think it was just a communication issue with the API

@namurphy it looks like the codecov error is rearing it's head again, even after I think #2624 was merged into this branch?

Run codecov/codecov-action@v4
==> macos OS detected
https://cli.codecov.io/latest/macos/codecov.SHA256SUM
==> Running version latest
==> Running version v0.4.9
==> Running git config --global --add safe.directory /Users/runner/work/PlasmaPy/PlasmaPy
/usr/local/bin/git config --global --add safe.directory /Users/runner/work/PlasmaPy/PlasmaPy
==> Running command '/Users/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/Users/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github -C b61ba8817d6e7f1656a28f79cd6d4876a46745b3 -Z
info - 2024-04-06 01:24:41,896 -- ci service found: github-actions
gpg: directory '/Users/runner/.gnupg' created
gpg: /Users/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg:               imported: 1

gpg: Signature made Thu Mar 28 [15](https://github.com/PlasmaPy/PlasmaPy/actions/runs/8577281504/job/23510545977?pr=2618#step:7:16):15:56 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869

Error: Codecov token not found. Please provide Codecov token with -t flag.
==> Uploader SHASUM verified (cb250ac4addcd9a[21](https://github.com/PlasmaPy/PlasmaPy/actions/runs/8577281504/job/23510545977?pr=2618#step:7:22)bf1c73d583cdae0e7fbd2c369350829fcc21ffb55ca81e6  codecov)

Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻 Thank you again for doing this, and for your patience while we fixed some of our continuous integration checks! Happy to merge it now that we got the stuff that broke figured out.

@namurphy namurphy merged commit 8710b7f into PlasmaPy:main Apr 9, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org plasmapy.formulary Related to the plasmapy.formulary subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an examples section in the docstring for thermal_bremsstrahlung
3 participants