Conversation
|
@j9ac9k sorry to increase the PR count so soon 😆 |
|
@ixjlyons Any idea why the docs failed? It says there is a problem but I'm not sure how to find out what it was... |
|
From the docs build: I believe we have our sphinx config set to error on warning. |
You're not going to hear me complain about a PR that will make the library easier to maintain. |
|
@NilsNemitz Right, I didn't realize until Ogi's comment that warnings equate to errors with the current build specifications |
|
I would recommend migrating to numpy-docstyle ...we're slowly moving over in that direction, it's a bit easier to read, preserves horizontal space. We haven't been enforcing it, given much of the library isn't of that format. TargetItem.py has some examples of how to format there that may be useful. I think PyCharm (or really any popular IDE/editor) has extensions to auto-populate/format a stub that you can just fill in. But to directly answer your question, I'm not sure what sphinx is talking about (my doc-formatting game is weak). I can recreate the doc-build environment and help diagnose in a bit. |
|
Dear @ntjess , I think it might mostly be complaining about the missing blank line. |
e1a6189 to
bfbdd8c
Compare
bfbdd8c to
c813e0f
Compare
| Parameters | ||
| ---------- | ||
|
|
||
| .. autoclass:: SimpleParameter |
There was a problem hiding this comment.
I have somewhat of a preference for keeping these as just the ClassName here. The difference is the signature rendered in the docs:
class pyqtgraph.parametertree.parameterTypes.SliderParameter(**opts)
vs.
class pyqtgraph.parametertree.parameterTypes.slider.SliderParameter(**opts)
Since they will almost always be imported via from pyqtgraph.parametertree import parameterTypes, the old version may be a little less confusing.
There was a problem hiding this comment.
Currently the items are ordered by appearance in PARAM_TYPES. Do you think they should be ordered alphabetically instead while I'm making changes? Not sure which is preferable.
There was a problem hiding this comment.
I don't have a strong preference. I guess I'd lean toward alphabetical so it's a little easier to find something when scrolling, but if I know what I'm looking for I'd probably ctrl+f or use the search box anyway.
There was a problem hiding this comment.
Scratch that -- I thought I took out set logic but that means order changes almost every time the script is run... I think I will sort so the order is deterministic and makes clear where new parameters should be added
| @@ -0,0 +1,42 @@ | |||
| import os.path | |||
There was a problem hiding this comment.
Script seems fine to me, just highlights that we really should try to migrate toward using sphinx-autogen/autosummary. My issue is it usually seems to require some templating/theming which isn't really a passion of mine.
There was a problem hiding this comment.
Yeah, this is more of a stand-in but certainly not the best long-term solution
- `registerParameterItemType`: * added to docs and parametertree.__init__ * Remove unsed PARAM_TYPES global * Hyperlink to `registerParameterType` - parameter tree rst: * Alphabetize entries * Rebuild RST without fully qualified class name * Add note at file header that it is auto generated
de378df to
174d4cf
Compare
|
|
||
| def setAddList(self, vals): | ||
| """Change the list of options available for the user to add to the group.""" | ||
| self.setOpts(addList=vals) No newline at end of file |
There was a problem hiding this comment.
nit-pick; looks like this file needs a newline at the end.
EDIT: a number of files look like they need new-lines after the last line of code.
There was a problem hiding this comment.
I didn't realize this was a requirement, apologies. I'll configure my settings accordingly
There was a problem hiding this comment.
I ran a script which found a few other repo files without newlines. Should a quick PR be added for them?
examples/exampleLoaderTemplate_pyside2.py
examples/exampleLoaderTemplate_pyside6.py
examples/initExample.py
examples/optics/__init__.py
examples/verlet_chain/__init__.py
pyqtgraph/canvas/__init__.py
pyqtgraph/console/__init__.py
pyqtgraph/dockarea/__init__.py
pyqtgraph/flowchart/__init__.py
pyqtgraph/imageview/__init__.py
pyqtgraph/ordereddict.py
pyqtgraph/util/get_resolution.py
pyqtgraph/util/pil_fix.py
pyqtgraph/widgets/FeedbackButton.py
pyqtgraph/widgets/VerticalLabel.py
tests/test_Point.py
|
My only issue here is lack of |
|
@j9ac9k Wow, CodeQL is actually helpful when it doesn't trigger all 300 warnings across the project for an unrelated PR 😆 |
|
@ntjess if you think this guy is ready for merging, probably should remove the draft status 👍🏻 |
Note: intentionally leaves out instance in parametertypes.py to avoid merge conflict with pyqtgraph#1919
Note: intentionally leaves out instance in parametertypes.py to avoid merge conflict with pyqtgraph#1919
|
@ksunden If you used a script to find unneeded castings before, it might be good to run the same script on this branch to make sure I didn't miss anything |
Note: intentionally avoids files moved / already adjusted from pyqtgraph#1919
prior to PR pyqtgraph#1919, there was no ptree.types.ColorMapParameter, and type "colormap" was handled directly by ptree.types.SimpleParameter. PR pyqtgraph#1919 created ColorMapParameter as a sub-class of SimpleParameter, and moved colormap specific functionality into ColorMapParameter. Hence RangeColorMapItem now needs to derive from ColorMapParameter.
prior to PR pyqtgraph#1919, there was no ptree.types.ColorMapParameter, and type "colormap" was handled directly by ptree.types.SimpleParameter. PR pyqtgraph#1919 created ColorMapParameter as a sub-class of SimpleParameter, and moved colormap specific functionality into ColorMapParameter. Hence RangeColorMapItem now needs to derive from ColorMapParameter.

To prevent the extraordinary merge hassle of last parameter type PR, this organization:
WidgetParameterItemimplementations into actually separate items likeBoolParameterItem,ColorParameterItem, etc.For reviewers: The content of each Parameter/Item is unchanged -- the only modifications are to the imports