sunpy icon indicating copy to clipboard operation
sunpy copied to clipboard

fixes notes heading reappearing due to another notes section in sunpy docs

Open NucleonGodX opened this issue 1 year ago • 7 comments

fixes notes heading reappearing due to another notes section in subclass docstring (issue #7286 )

NucleonGodX avatar Jan 11 '24 04:01 NucleonGodX

Testing this in a unit test might be the way to go: As of now:

/home/runner/work/sunpy/sunpy/.tox/build_docs/lib/python3.9/site-packages/sunpy/map/sources/mlso.py:docstring of sunpy.map.sources.mlso.KCorMap:24: ERROR: Unexpected indentation.
/home/runner/work/sunpy/sunpy/.tox/build_docs/lib/python3.9/site-packages/sunpy/map/sources/mlso.py:docstring of sunpy.map.sources.mlso.KCorMap:25: WARNING: Block quote ends without a blank line; unexpected unindent.

Using the docbuild to check it works is ok but maybe not the fastest way to iterate.

nabobalis avatar Jan 15 '24 19:01 nabobalis

I think it might be easier to construct a fake map class with a notes section and work it out that way. Then run this in a unit test and check the docstring is ok.

nabobalis avatar Jan 17 '24 17:01 nabobalis

I think it might be easier to construct a fake map class with a notes section and work it out that way. Then run this in a unit test and check the docstring is ok.

Yeah, on it!

NucleonGodX avatar Jan 18 '24 13:01 NucleonGodX

any updates on this @nabobalis ?

NucleonGodX avatar Jan 28 '24 15:01 NucleonGodX

any updates on this @nabobalis ?

Can you add unit tests to make sure this doesn't break in the future?

nabobalis avatar Jan 28 '24 17:01 nabobalis

any updates on this @nabobalis ?

Can you add unit tests to make sure this doesn't break in the future?

added :)

NucleonGodX avatar Jan 31 '24 13:01 NucleonGodX

made all the suggested changes, I think it looks good now!

NucleonGodX avatar Feb 01 '24 17:02 NucleonGodX

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 5.0
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 59cafc5a5ebcfc03f0321bebd437577b978785bb
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #7376: fixes notes heading reappearing due to another notes section in sunpy docs'
  1. Push to a named branch:
git push YOURFORK 5.0:auto-backport-of-pr-7376-on-5.0
  1. Create a PR against branch 5.0, I would have named this PR:

"Backport PR #7376 on branch 5.0 (fixes notes heading reappearing due to another notes section in sunpy docs)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

lumberbot-app[bot] avatar Mar 21 '24 01:03 lumberbot-app[bot]

Thanks for the PR @NucleonGodX, sorry it took this long to get merged.

nabobalis avatar Mar 21 '24 01:03 nabobalis