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

Issue 2673: Rename binding_energy to remove ambiguity, add electron_binding_energy #2692

Closed
wants to merge 109 commits into from

Conversation

chasepd
Copy link
Contributor

@chasepd chasepd commented May 15, 2024

Description

Adds requested feature from #2673.

  • Renames binding_energy to nuclear_binding_energy, but leaves binding_energy as a pointer to nuclear_binding_energy for backwards compatibility with a warning that it is deprecated and will be removed in a future release.
  • Adds electron_binding_energy, defined as the sum of ionization_energy for all charge states above the given ionization.

Motivation and context

See #2673. With the addition of ionization energy data, calculating electron_binding_data becomes fairly easy. However, this causes binding_energy to be ambiguous/confusing, and is renamed to nuclear_binding_energy for clarity and greater specificity.

Related issues

Resolves #2673.

chasepd and others added 30 commits May 3, 2024 08:59
Co-authored-by: Peter Heuer <pvheuer@gmail.com>
Co-authored-by: Peter Heuer <pvheuer@gmail.com>
Co-authored-by: Peter Heuer <pvheuer@gmail.com>
Co-authored-by: Peter Heuer <pvheuer@gmail.com>
Co-authored-by: Peter Heuer <pvheuer@gmail.com>
Co-authored-by: Nick Murphy <namurphy@cfa.harvard.edu>
@github-actions github-actions bot added plasmapy.particles Related to the plasmapy.particles subpackage testing python Pull requests that update Python code labels May 15, 2024
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.23%. Comparing base (24d83fb) to head (700e1d1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2692      +/-   ##
==========================================
+ Coverage   94.90%   95.23%   +0.32%     
==========================================
  Files         104      104              
  Lines        9435     9435              
  Branches     2159     2159              
==========================================
+ Hits         8954     8985      +31     
+ Misses        299      273      -26     
+ Partials      182      177       -5     

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

@github-actions github-actions bot added the feature For new functionality, excluding breaking changes label May 15, 2024
@chasepd
Copy link
Contributor Author

chasepd commented May 15, 2024

pre-commit.ci autofix

@chasepd
Copy link
Contributor Author

chasepd commented May 15, 2024

@pheuer - FYI since you submitted #2673

@github-actions github-actions bot added docs PlasmaPy Docs at http://docs.plasmapy.org plasmapy.utils Related to the plasmapy.utils subpackage CI Related to continuous integration requirements Related to updating requirements GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) contributor guide packaging Related to packaging or distribution linters Code linters and autoformatters maintenance General updates to package infrastructure documentation infrastructure nox Related to the nox automation software labels May 16, 2024
@pheuer
Copy link
Member

pheuer commented May 16, 2024

@chasepd This looks great!

Unfortunately something really strange is happening with Git here (probably my fault): when I tried to pull this branch locally, GitHub Desktop ended up pushing chasepd/main into this branch? Which is also chasepd/main? And then when I tried to revert that, it doesn't seem to have worked?? @namurphy HELP!

I think the issue might be that it looks like you are editing the code on your main branch, then opening PRs from that. Typically it's better to make a new branch for each PR (from main), then delete it after the PR is merged. Probably wouldn't be an issue if I was better at Git!

EDIT: Just to reassure you nothing is lost, I'm easily able to create a new branch off of your last commit, which I've done here:
https://github.com/pheuer/PlasmaPy/tree/2657_save

I just can't figure out how to reset THIS branch. I think only you may be able to do that, since it is on your repository.

@chasepd
Copy link
Contributor Author

chasepd commented May 16, 2024

@chasepd This looks great!

Unfortunately something really strange is happening with Git here (probably my fault): when I tried to pull this branch locally, GitHub Desktop ended up pushing chasepd/main into this branch? Which is also chasepd/main? And then when I tried to revert that, it doesn't seem to have worked?? @namurphy HELP!

I think the issue might be that it looks like you are editing the code on your main branch, then opening PRs from that. Typically it's better to make a new branch for each PR (from main), then delete it after the PR is merged. Probably wouldn't be an issue if I was better at Git!

EDIT: Just to reassure you nothing is lost, I'm easily able to create a new branch off of your last commit, which I've done here: https://github.com/pheuer/PlasmaPy/tree/2657_save

I just can't figure out how to reset THIS branch. I think only you may be able to do that, since it is on your repository.

No worries! I have a local copy, I'll just nuke this PR and my local fork, re-fork this, and then make a new PR from a non-main branch

@chasepd chasepd closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Related to continuous integration contributor guide docs PlasmaPy Docs at http://docs.plasmapy.org documentation infrastructure feature For new functionality, excluding breaking changes GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) linters Code linters and autoformatters maintenance General updates to package infrastructure nox Related to the nox automation software packaging Related to packaging or distribution plasmapy.particles Related to the plasmapy.particles subpackage plasmapy.utils Related to the plasmapy.utils subpackage python Pull requests that update Python code requirements Related to updating requirements testing
Projects
None yet
2 participants