-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Configure ide #11615
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
base: main
Are you sure you want to change the base?
Configure ide #11615
Conversation
@th3linja you don't need to open a new PR for each new change, just push commits to your branch and they should show up on GitHub. cc @britta-wstnr this is why #11613 was closed I think |
@larsoner Sorry, I accidentally made a conflict when playing around with the code and couldn't find a way to revert it so I had to start anew. |
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 added some changes to the text - @th3linja you can accept those changes right here on GitHub if you want (then you'd have to pull the changes to your local copy via git
).
As mentioned in a comment to @mscheltienne's review: I wonder if the how to's for the different IDE's will be very hard to keep up-to-date. Things will be moved around in the Settings, I assume, and then we'd have to remember our list and compare periodically. Maybe we could only keep the list of things that is good to add to any IDE, but not mention how this should be done?
Thoughts?
doc/install/configure_ide.rst
Outdated
Thanks for taking the time to contribute! This guide steps through various IDE settings that are helpful when | ||
contributing to MNE-Python. |
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 taking the time to contribute! This guide steps through various IDE settings that are helpful when | |
contributing to MNE-Python. | |
This guide steps through various IDE settings that are helpful when contributing to MNE-Python. |
Given that this will land somewhere within the contributor's guide, I don't think we will need to add the thank you again.
doc/install/configure_ide.rst
Outdated
|
||
Some of the basic settings include enabling linting, setting line margins, introspection, and docstring type: | ||
|
||
* Linting - is the automated checking of your source code for programmatic and stylistic errors. Most of the time basic linting is already enabled but let's double check. |
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.
* Linting - is the automated checking of your source code for programmatic and stylistic errors. Most of the time basic linting is already enabled but let's double check. | |
* Linting is the automated checking of your source code for programmatic and stylistic errors. Most of the time, basic linting is already enabled but it is a good idea to double check. |
doc/install/configure_ide.rst
Outdated
|
||
* Line margins - we have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders adhere to that rule. | ||
|
||
* Introspection - this helps removes trailing whitespaces that could be problematic when compiling or building |
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.
* Introspection - this helps removes trailing whitespaces that could be problematic when compiling or building | |
* Introspection helps by removing trailing whitespaces that can be problematic when compiling or building. |
doc/install/configure_ide.rst
Outdated
* Line margins - we have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders adhere to that rule. | ||
|
||
* Introspection - this helps removes trailing whitespaces that could be problematic when compiling or building | ||
|
||
* Docstring - we use NumPy because it supports a combination of reStructured and GoogleDocstrings and supported by Sphinx |
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.
* Line margins - we have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders adhere to that rule. | |
* Introspection - this helps removes trailing whitespaces that could be problematic when compiling or building | |
* Docstring - we use NumPy because it supports a combination of reStructured and GoogleDocstrings and supported by Sphinx | |
* Line margins - we have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders adhere to that rule. | |
* Introspection - this helps removes trailing whitespaces that could be problematic when compiling or building | |
* Docstring - we use NumPy because it supports a combination of reStructured and GoogleDocstrings and is supported by Sphinx |
I think this bullet point also could have a bit more information.
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 last one on "Docstring" that is - just seeing now GitHub shows the previous ones in the view here too 🙃 )
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! Will get to it as soon as I can.
doc/install/configure_ide.rst
Outdated
------ | ||
|
||
* :menuselection:`Command Palette (Ctrl + Shift + P) --> Lint --> Python: Enable/Disable Linting (click on Enable)` | ||
* :menuselection:`Use ``python.autoComplete.preloadModules": ["numpy", "pandas", "matplotlib", "mne"]``` |
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.
Is this really still a thing with Pylance?
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'm just continuing off from the work that was left unattended for a while. Not sure what versioning was in place when the instructions were last created. Let me know if there needs to be a change.
I've made some changes to reflect the suggestions made. Let me know what you think. Also if someone using VSCode could double down on the steps with their IDE version, that would be great. |
Given @hoechenberger's latest comment and before we venture further, can I raise the point again that I raised above and that @mscheltienne seemed to agree with? Pinging @larsoner @hoechenberger and @drammock who opened the original issue. |
+1. I imagine something like this would be more future-proof:
|
For sure! I'll send an update as soon as I get the chance. |
Hi all, I made some revisions. Let me know how it looks! |
|
||
Rulers | ||
^^^^^^ | ||
We have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders |
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.
We have code style rules that forbid lines longer than 79 characters, so having a ruler at 79 characters helps coders | |
We have code style rules that forbid lines longer than 88 characters, so having a ruler at 88 characters helps coders |
I would mention that MNE uses black
for enforcing a code style.
Syntax Highlighting | ||
^^^^^^^^^^^^^^^^^^^ | ||
Syntax highlighting is a feature that determines the color and style of source code displayed in the IDE. Most users | ||
find it helpful and is usually enabled by default. If not, search "python syntax highlight [name of IDE]" to learn how |
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.
find it helpful and is usually enabled by default. If not, search "python syntax highlight [name of IDE]" to learn how | |
find it helpful and it is usually enabled by default. If not, search "python syntax highlight [name of IDE]" to learn how |
Linting | ||
^^^^^^^ | ||
Linting is the automated checking of your source code for programmatic and stylistic errors. Most of the time, basic | ||
linting is already enabled but it is a good idea to double-check. Search "python [name of IDE] linting" to learn how to | ||
configure it. |
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 would mention black here.
.. note:: The IDE configurations recommended below are not catered towards specified versions of the IDE, but rather a | ||
general guide of where these settings may be found regardless of versioning. | ||
|
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 would remove this now that there are no details below.
Should I add Vim to this list or would that be overly archaic? |
Reference issue
Fixes #9112
What does this implement/fix?
Creating a page that steps through the various IDE settings that are helpful when contributing to MNE-Python.
Additional information
Picking up and resolving an idle ticket. Tried implementing some of the changes as suggested. Not sure if :menuselection: by Sphinx is working as rst is not displaying correctly for me when installing MNE right out of the box. May require additional setup to view it correctly.
**Fixed duplicate label