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

Create a new subpackage for jupyter-widgets and add shell info widgets #1166

Merged
merged 25 commits into from
Jun 23, 2020

Conversation

jaladh-singhal
Copy link
Member

@jaladh-singhal jaladh-singhal commented May 27, 2020

This PR primarily aims to make shell info jupter-widgets accessible via widgets subpackage. The code is put together in a class in submodule base.py (as of now) along with relevant tests and documentation.

Things to do:

  • Put entire shell info widget's code in a working OOP structure
  • Make the shell info widget generate by a single function call, passing simulation object as only argument
  • Add relevant docstrings to improve code documentation
  • Also implement different way of accessing simulation data like from HDF
  • Create an example notebook demonstrating its use in tardis docs
  • Create basic unit tests
  • Create an issue for known bugs after merging

tardis/widgets/base.py Outdated Show resolved Hide resolved
tardis/widgets/base.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #1166 into master will increase coverage by 0.59%.
The diff coverage is 96.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1166      +/-   ##
==========================================
+ Coverage   77.13%   77.73%   +0.59%     
==========================================
  Files          89       92       +3     
  Lines        5551     5731     +180     
==========================================
+ Hits         4282     4455     +173     
- Misses       1269     1276       +7     
Impacted Files Coverage Δ
tardis/widgets/base.py 93.85% <93.85%> (ø)
tardis/widgets/__init__.py 100.00% <100.00%> (ø)
tardis/widgets/tests/test_base.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5e2919...ff70c2b. Read the comment docs.

tardis/widgets/base.py Outdated Show resolved Hide resolved
tardis/widgets/base.py Outdated Show resolved Hide resolved
@jaladh-singhal jaladh-singhal marked this pull request as ready for review June 11, 2020 20:05
tardis/widgets/base.py Outdated Show resolved Hide resolved
tardis/widgets/base.py Outdated Show resolved Hide resolved
@wkerzendorf wkerzendorf requested a review from ycamacho June 18, 2020 20:53
- Notes section wasn't visible
- Other parameters section was being rendered incorrectly
- External links & inline code blocks were also incorrect
tardis/widgets/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ycamacho ycamacho left a comment

Choose a reason for hiding this comment

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

Everything looks good to me.

@wkerzendorf wkerzendorf merged commit 19beeec into tardis-sn:master Jun 23, 2020
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
tardis-sn#1166)

* Create a widgets submodule

* Creat a class for shell info with functions to extract tables data

* Put all shell info widget code in its class

* Debugged several logical errors in code due to copying

* Import main ShellInfoWidget class in init.py

* Removed default simulation argument from ShellInfoWidget class

* Created one method for creating 4 different table widgets in init

* Separated shell info data into HDF and Simulation child class

* Made ShellInfoWidget work with both HDF & simulation object

* Imputed NaN count values wih 0

* Fixed settingwithcopy error in Z_count_table

* Added widgets notebook to be put in docs and shell info demo gif

* Refactored Z to element and atomic_num to respect PEP8

* Added docstrings to multiple functions and classes

* Converted 2 interdependent optional args of create_table_widget as 1 dict

* Added some  docstrings and improved signature of display function

* Updated the way of accessing shell info widget from hdf and simulation

* Added unit tests for shwll info data

* Added tests for ion_count and element_count

* Added tests for shell info widget

* Added qgrid to tardis env file

* Added jupyter-widgets notebook to index

* Several fixes to docstrings

- Notes section wasn't visible
- Other parameters section was being rendered incorrectly
- External links & inline code blocks were also incorrect

* Fixed typo in widgets notebook

* Applied black formatter to cover all pep8 changes
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.

6 participants