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

Update getting_started documentation 📘 #105

Merged
merged 12 commits into from
Jul 20, 2022
Merged

Update getting_started documentation 📘 #105

merged 12 commits into from
Jul 20, 2022

Conversation

soosub
Copy link
Contributor

@soosub soosub commented Jul 18, 2022

Context for changes

The getting_started.rst file was not up-to-date. This PR fixes that and will prevent it from happening again. The latter is done by adding it to the list of files that are run when building documentation, just like the tutorials. Any errors should then be caught by the CI checks.

  • Documentation changes:
    • Update outdated getting_started.rst
    • Run getting started file for documentation when building docs

Performance results justifying changes

  • Not Applicable

Expected benefits and drawbacks

Expected benefits:

  • Mechanism prevents out-of-date "getting started" page by running it with the current FlamingPy version, resulting in errors in CI check when there are any issues.

Possible drawbacks:

  • None

Related Github issues

Checklist and integration statements

  • My Python and C++ codes follow this project's coding and commenting styles as indicated by existing files. Precisely, the changes conform to given black, docformatter and pylint configurations.
  • I have performed a self-review of these changes, checked my code (including for codefactor compliance), and corrected misspellings to the best of my capacity. I have synced this branch with others as required.
  • I have added context for corresponding changes in documentation and README.md as needed.
  • I have added new workflow CI tests for corresponding changes, ensuring codecoverage is 95% or better, and these pass locally for me.
  • I have updated CHANGELOG.md following the template. I recognize that the developers may revisit CHANGELOG.md and the versioning, and create a Special Release including my changes.

@soosub soosub added the documentation Improvements or additions to documentation label Jul 18, 2022
@soosub soosub self-assigned this Jul 18, 2022
@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.19%. Comparing base (96d4926) to head (d5b5ffd).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #105   +/-   ##
=======================================
  Coverage   96.19%   96.19%           
=======================================
  Files          36       36           
  Lines        2209     2209           
=======================================
  Hits         2125     2125           
  Misses         84       84           

Continue to review full report in Codecov by Sentry.

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

@soosub soosub changed the title update getting_started to working version Update getting_started documentation 📘 Jul 18, 2022
@soosub
Copy link
Contributor Author

soosub commented Jul 18, 2022

@nariman87 or @ilan-tz, could you add this branch to our readthedocs for testing?
Nevermind! I was not aware that this functionality already exists 😌

@@ -0,0 +1,71 @@
""".. _getting-started-tutorial:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know where this is relevant. Should this be included? I basically took it over from the tutorial .py files.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is just adding an explicit target label so that the document can be referenced using it. Is a nice to have but feel free to remove it if it finds no use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, it's not used now but I will just leave it there as it might be useful in the future (and it doesn't hurt to keep it)

"show_axes": True,
}

c = correct(RHG, decoder="MWPM", draw=True, drawing_opts=dw)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The generated figures are pretty small, and I think this is because the first matplotlib figures in a session are not according to the specified style (this also happens when using a jupy notebook). Maybe it's good to fix this at some point. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can change the figure sizes by using plot_params from the viz module (here). For example

from flamingpy.utils.viz import plot_params
plot_params["figure.figsize"] = (16, 12)

This will increase (in fact duplicate) the size of all the figures.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I will leave it like this for now. When addressing #54 we can also improve upon the presentation of the correct visualization on the readthedocs. The corresponding plots are on the small side.
image

@soosub soosub marked this pull request as ready for review July 18, 2022 19:39
@nariman87
Copy link
Contributor

@sduquemesa tp kindly review next.

Copy link
Contributor

@sduquemesa sduquemesa left a comment

Choose a reason for hiding this comment

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

Thanks @soosub for this addition! It does help to keep the documentation up-to-date 📆

I'm approving as this is already in good shape. I left a suggestion for how to increase figure sizes, please include it before merging.

@@ -0,0 +1,71 @@
""".. _getting-started-tutorial:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just adding an explicit target label so that the document can be referenced using it. Is a nice to have but feel free to remove it if it finds no use.

"show_axes": True,
}

c = correct(RHG, decoder="MWPM", draw=True, drawing_opts=dw)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can change the figure sizes by using plot_params from the viz module (here). For example

from flamingpy.utils.viz import plot_params
plot_params["figure.figsize"] = (16, 12)

This will increase (in fact duplicate) the size of all the figures.

@soosub soosub merged commit 763e107 into main Jul 20, 2022
@soosub soosub deleted the getting_started branch July 20, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getting_started.rst is outdated 👴🏼
3 participants