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 Verification Manual VM8 #820

Merged
merged 45 commits into from
Jan 26, 2022
Merged

Add Verification Manual VM8 #820

merged 45 commits into from
Jan 26, 2022

Conversation

RomanIlchenko1308
Copy link
Contributor

This PR adds VM8, with good step by step explanations, how to provide full simulation of
the Parametric Calculation of Point-to-Point Distances.

VM8:
1st commit: code almost done with idea how to modify mapdl.ndist at the main script

@RomanIlchenko1308 RomanIlchenko1308 self-assigned this Jan 14, 2022
@codecov
Copy link

codecov bot commented Jan 20, 2022

Codecov Report

Merging #820 (50f0053) into main (5c7d2f3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #820   +/-   ##
=======================================
  Coverage   57.58%   57.58%           
=======================================
  Files         172      172           
  Lines       10559    10559           
=======================================
  Hits         6080     6080           
  Misses       4479     4479           

@RomanIlchenko1308 RomanIlchenko1308 marked this pull request as draft January 20, 2022 18:33
Copy link
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

Minor suggestions, mainly regarding format.

examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
examples/06-verif-manual/vm-008-parametric_calculation.py Outdated Show resolved Hide resolved
Comment on lines 200 to 216
df2.style.set_table_styles([
{
"selector": "th",
"props": [('font-size', '16px')]
},
{
"selector": "td",
"props": [('font-size', '16px')]
},
{
"selector": "td:hover",
"props": [("background-color", "#FFF8DC")]
}]).set_properties(**
{
"color": "black",
"text-align": "center"
}).format("{:.2f}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
df2.style.set_table_styles([
{
"selector": "th",
"props": [('font-size', '16px')]
},
{
"selector": "td",
"props": [('font-size', '16px')]
},
{
"selector": "td:hover",
"props": [("background-color", "#FFF8DC")]
}]).set_properties(**
{
"color": "black",
"text-align": "center"
}).format("{:.2f}")
df2.style

You could just use this, and the output is similar:
image

But smaller font size.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I really think this block of code is not needed.

@germa89
Copy link
Collaborator

germa89 commented Jan 21, 2022

Hi @RomanIlchenko1308

Please do not include any style in the dataframe, I believe we are better moving towards a theme definition of the table style.

Therefore, after getting the pandas dataframe, just call df.style. See this:

# Create and fill the output dataframe with pandas.
df2 = pd.DataFrame(main_columns, index=row_names)

# Apply style settings for the dataframe.
df2.style

It should look like:

image

Please check:

ansys/ansys-sphinx-theme#17

@RomanIlchenko1308
Copy link
Contributor Author

Thank u German for your feedback!

About data frame code
I will leave it until I have not merged the data frame PR #848.
When I finish that, I will create new PR with New branch and I will go through all VMs and substitute the print f output tables with pandas data frame.

I will finish PR of VM10 during a few hours, and I'll be back to check all your suggestions and apply them.

Thank you again for your feedback!

Comment on lines 200 to 216
df2.style.set_table_styles([
{
"selector": "th",
"props": [('font-size', '16px')]
},
{
"selector": "td",
"props": [('font-size', '16px')]
},
{
"selector": "td:hover",
"props": [("background-color", "#FFF8DC")]
}]).set_properties(**
{
"color": "black",
"text-align": "center"
}).format("{:.2f}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really think this block of code is not needed.

@germa89
Copy link
Collaborator

germa89 commented Jan 24, 2022

You haven't addressed (almost) any of the changes I proposed you. Hiding the sphinx tag, removing the extra files and the pandas dataframe configuration code is needed for me to approve this PR.

@RomanIlchenko1308
Copy link
Contributor Author

RomanIlchenko1308 commented Jan 25, 2022

Hi @germa89,

As we have discussed, yesterday, I would like to summarize the work done:

  1. I have left the # sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' in the topic Start MAPDL.
  2. I have modified a script with decorators @property.
  3. Where I have some doubts it is about extra files, here I would like to ask you to give me a hand with it?
  4. I have left the Pandas data frame, as we discussed too, I will change it in the future with OOP functionality.

Thank you in advance!

@RomanIlchenko1308
Copy link
Contributor Author

Hi @germa89
I have removed style settings, just left the df2.style.format("{:.2f}") to obtain 2 decimals.
The VM8 is ready to be reviewed.
Thank you in advance sir and great work with CSS and HTML settings for web pages!!! Thank you!

Copy link
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

Good job. Thank you!

@RomanIlchenko1308 RomanIlchenko1308 marked this pull request as ready for review January 26, 2022 18:07
@RomanIlchenko1308 RomanIlchenko1308 merged commit 2b03f5f into main Jan 26, 2022
@RomanIlchenko1308 RomanIlchenko1308 deleted the doc/vm8 branch January 26, 2022 18:07
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.

2 participants