-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: House cleaning #7785
PR: House cleaning #7785
Conversation
README.md
Outdated
## Contributing and Credits | ||
|
||
Spyder was originally created by [Pierre Raybaut]( | ||
https://github.com/PierreRaybaut), and is currently developed maintained by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove developed
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks for the catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
img_src/Oxygen_Icon_Set/LICENSE.txt
Outdated
@@ -0,0 +1,25 @@ | |||
Oxygen Icon Theme SVG Sources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please uncapitalize the name of this directory, i.e. leave it as oxygen_icon_set
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
spyder/utils/help/LICENSE.txt
Outdated
Help Utilities License Information | ||
################################## | ||
|
||
Source files in this directory originate from sources other than Spyder itself, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only applies to our MathJax copy, or am I mistaken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, some files were also taken from somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning was inspired by that originally present in the init,py in this directory.
Of the files contained within this directory, conf.py
, sphinxify.py
and templates/layout.html
are from Sphixify, part of the Sage project; js/collapse_sections.js
is from the Cloud Sphinx theme, js/copy_button.js
is taken from Python's doc site, js/jquery.js
is the entire JQuery and SizzleJS libraries, tutorial.rst
and the contents of the static/images/
directory are originally copyright Hans Fanghor and dual-licensed, and there's of course MathJax as you mentioned; furthermore, every one of those is at least in part under a license other than MIT. The only Spyder-original files are the relatively trivial html/usage.html
and html/warning.html
, the remaining few files in the js/
directory, and those in the static/css/
directory.
However, I can clarify it a bit, along the lines of "Many source files in this directory..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as above.
Also, don't forget to merge with master to fix our tests in Circle. |
@ccordoba12 Did something further change in the last 24 hours that would break any further tests? I merged it with |
spyder/app/mainwindow.py
Outdated
msgBox.exec_() | ||
msgBox.setTextInteractionFlags( | ||
Qt.LinksAccessibleByMouse | Qt.TextSelectableByMouse) | ||
msgBox.setModal(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we all agreed on making the About Spyder
dialog not modal, but I think this is kind of a ninja change doing it so here. I think this should be part of a separate PR with its own associated Issue where this can be documented and discussed.
Several dialogs are modal in Spyder (Dependencies
, Check for updates
, Report issue
, Python path manager
, etc...). It is a little bit inconsistent to make the About dialog
the only one not modal and so, I think this needs to be discussed/documented in an Issue first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up, and sorry about that. Actually, I only did so in the first place since it was extremely annoying having it be modal when I was trying to go back and forth testing the changes. Then, I found a bug in the dialog (as noted in the commit message), that the links no longer worked after your change in your recent PR making the text selectable, so I had to fix that so the link to the legal notices and author attributions would actually work, as is of course required for them to fulfill their legal purpose. After I'd already had to make changes I apparently left the modal flag there as well; at this point its been so long and so much I can't 100% remember if it was a conscious decision or not.
The dependencies dialog should definitely not be modal as well, since it serves the same function as the about dialog (displaying useful information). However, the others are more arguable. In any case, I can open a separate issue to discuss it; for now I'll just revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, I found a bug in the dialog (as noted in the commit message), that the links no longer worked after your change in your recent PR making the text selectable
Thanks for catching that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependencies dialog should definitely not be modal as well, since it serves the same function as the about dialog (displaying useful information). However, the others are more arguable. In any case, I can open a separate issue to discuss it; for now I'll just revert this change.
I think the About
, Dependencies
and Report issue
are useful to use in a same workflow and should not be modal.
I'll let you open an issue where this can be discussed in more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@jnsebgosselin Fantastic idea!!! I had been eventually planning something like that, but as you mentioned earlier it would be well beyond the scope of this already bloated PR. I was thinking it would be good to have a tab to display the license, the authors file (would we want to include every Github contributor though, or just display it as it is now and have a clickable link to the Github contributors page), and the notices file as scrollable/selectable plain text. It would be nice if the bare links could be made clickable, but that's not a priority. Of course, this makes it even more important for the dialog to be non-modal. We could then remove the last paragraph of the current about dialog, since the authors would cover it. The first tab would be the about dialog more or less as it is now, and we could add the splash screen graphic in there at the top or bottom if we needed something to fill the space; and/or we'd have the room to list Spyder, OS, Qt, etc. versions in the same format as on Github, as a bulleted list, so users could simply copy and paste it directly if we wanted. We could also consider incorporating the dependencies dialog as a tab too, but that might be pushing it too far. |
@ccordoba12 With regard to the failing test only on the pip build of Py3.6 Linux on Travis, the apparent cause is the new version of |
Excellent, I'll open an issue so we can get discussed this and I'll implement it with your help in a PR if it is approved. |
NOTICE.txt
Outdated
=================== | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove two blanks here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccordoba12 As I implied above in response to your previous comment to this effect, I've already revised the introduction to eliminate or minimize blank lines where possible. Therefore, some of these initial comments are already out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then please merge with 3.x to fix the failure in Travis and push your new changes. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I need to address your other comments first, which is why I didn't just push to begin with. Thanks for fixing the Travis failure, BTW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done; pushed.
NOTICE.txt
Outdated
|
||
Overview | ||
-------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove one blank.
New Entry Template | ||
------------------ | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove one blank.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you get the idea. There a are lot of unneeded blanks in this file. Please remove them to make it more tight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slimmed down the lines at the top (as in your first few comments), as well as trimming 1-2 blanks (down to the minimal 2 required to maintain consistency and clarity between major elements of each entry) throughout the whole document between the top- and section-level headings and the text below, and likewise did the same between all the text and the section separator lines. However, as I elaborated in my rationale for it being plain text and not Markdown/rst above, with regard to the the remaining
unneeded blanks
that I haven't removed are needed and have meaning and purpose. For this file more than any other, meaning, purpose, and unambiguous clarity take absolute precedence over aesthetics, unless the aesthetics both serve and do not conflict with those ends.
To that end, the line breaks serve a the primary purpose of clearly establishing the textual hierarchy and unambiguously defining the format of each entry and section: Four lines between sections; three lines between entries; two lines between top-level elements of each entry. Particularly, the latter (on which the higher levels were based) was necessary due to the vital need to separate the descriptive text copied from the source and that added, which often contains blank lines as part of its verbatim native formatting.
In light of your request, I carefully considered whether the two line breaks between the headings and the content, and between the content and the -----
separator, could be removed, but ultimately concluded that it would be both inconsistent with the above separation and hierarchy convention; looks odd, as every other element is separated by two lines; and could also lead to some ambiguity particularly in the license full text section.
Furthermore, they are intended to aid in avoiding merge conflicts for two different PRs adding new entries by ensuring at least one blank line is present in the original for any addition of a new entry/section (one line on each side, and one between on which the change is nominally made) to avoid triggering git's conflict detection (which relies on at least one blank line between any parallel changes); I haven't extensively tested how much this helps in practice, but it certainly won't hurt. Finally, there is the practical aspect, that any further changes (which would necessarily be to the above convention, and thus have cascading effects) would involve changing many hundreds of more lines of the source, and would require touching every single entry (greatly complicating any future change that involved reverting or otherwise altering most of the 40+ commits in this PR).
============================= | ||
|
||
|
||
Font Awesome 4.7 (via QtAwesome) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes no sense. We don't distribute FontAwesome. Why do we need this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This notice needs to be moved to QtAwesome. Please remove it from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes no sense. We don't distribute FontAwesome. Why do we need this here?
A very good question, and one on which I initially came to the same conclusion as you—I didn't want to "open that can of worms" for the same reasons you probably don't. However, on closer inspection there were very particular reasons why FA is the one exception to not listing anything that isn't physically included in the Spyder repo, reasons which make much more sense if one considers that "distribution" is not always synonymous with what actually matters under copyright law—that is, whether the original work is a meaningful part of the end product and its presentation.
Even if not physically included in the package, they comprise the vast majority of the standard Spyder iconset that is actively displayed as part of Spyder's GUI itself (rather than as output, data, or reprisentations thereof) to the end user, forming an integral piece in the user-visible end-product that is Spyder, as much if not more so than any other icon that is included. If they weren't both graphical, an icon font (rather than a typographical one) and made a part of Spyder's core graphical UI (rather than e.g. as part of user output), then we could get away with it, but as it stands they deserve the same treatment as any other Spyder icon, as they are as much a part as anything of the visual pastiche that is Spyder.
Is it still somewhat gray? Yes, it's not 100% certain the courts would rule in their favor, but given there's some very clear distinctions with this specific case that prevent it from becoming a slippery slope and applying to any (other) Spyder dependencies (and recall, it is specific to Font Awesome the asset, not QtAwesome the dependency—I don't list the details for that) it costs us little to nothing to add it, shouldn't require any further maintenance, and is unlikely at best to apply to anything in the future (and even if arguably so, doesn't obligate us to do so).
This notice needs to be moved to QtAwesome
Indeed it does; it certainly needs to go there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also has the benefit of clearly documenting, in the same consistent place, exactly where all of Spyder's primary iconset is derived from, for both users and developers interested in finding out more (or even using QtAwesome). Otherwise, one has to dig through the code to find out exactly where they're originally from, and even then it may not be 100%. So again, even if this were somehow "out of date", still better to have something than nothing as a useful starting point for those curious.
Or in the words of the Zen of Python, which couldn't be more true when it comes to legal and attribution matters, and sums up in one line most of my decisions here:
Explicit is always better than implicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for helping us with this @CAM-Gerlach!
@ccordoba12 Thanks for putting up with my stubbornness; you have the patience of a saint. Was the merge that bad? |
Nop, fortunately it was quite easy 👍 |
Well then...Mission AcCAMplished! xD |
Good job 👍 |
Pull Request Checklist
Ensured your pull request hasn't eliminated unrelated blank lines/spaces,modified the
spyder/defaults
directory, or added new icons/assetsDescription of Changes
Waiting on @ccordoba12 to attach the source files for the Oxygen icons; then I'll make a few final changes that need to go last, and this will at long last be done.
Final changes:
Add source files for Oxygen icon them-derived icons from @ccordoba12 : BLOCKINGAlso, is there anything that needs to be done to make sure the NOTICE.txt always gets shipped with the package on both conda and pip?
Clean up a lot of old mess that could potentially cause problems, particularly legal ones, and make everything much cleaner, clearer, more transparent and well-documented.
I tried to minimize modifications to files that were moved in
split-plugins
to only those that were strictly necessary. The files added or changed in locations there moved were:Add:
Modify:
Once merged to master, I will follow this up with a PR making a few master-specific changes (mostly to file paths listed in NOTICE.txt), if they are not modified in the merge itself.
For the icon files that were removed, I took numerous steps to ensure to the greatest extent practical that they were not used anywhere and their removal would not cause other problems. Included among these steps for each of the removed icons (where "name" is the name of the icon, without the extension):
Thanks!