Skip to content

Commit

Permalink
VS Code integration (p5py#228)
Browse files Browse the repository at this point in the history
Added vscode and pylinter integration.

Fixes p5py#66
  • Loading branch information
Andy-Python-Programmer authored Aug 15, 2020
1 parent 5a3e6e0 commit 9b6bc6b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Guides
:maxdepth: 1

for-processing-users
vscode
31 changes: 31 additions & 0 deletions docs/guides/vscode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
=======================
VS Code Integration
=======================

Using VS Code as your code editor for p5py will be a great choice as of pylinter integration and a lot of autocomplete features!

Before you start using VS Code as your code editor for p5py. We reccomend that you turn off some pylint settings, for that you would require a settings file. The setup is simple so do not panic!

=======================
Setup
=======================

1. Go into the directory in which keep all of your p5py projects.
2. In that directory create a folder called ``.vscode``
3. In the ``.vscode`` directory create a file called ``settings.json``
4. In that file copy and paste all of these json settings:

.. code::
{
"python.linting.pylintArgs": [
"--disable", "E0102",
"--disable", "C0111",
"--disable", "W0401",
"--disable", "C0304",
"--disable", "W0614",
"--disable", "W0622"
]
}
5. Save the file and you are ready to write some amazing projects in VS Code and p5py!!
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

packages = ['p5']

requires = []

with open("requirements.txt", "r", encoding="UTF-8") as f:
require = f.read().split("\n")

for i in range(len(require)): requires.append(require[i].split("=")[0])
requires = [
'vispy',
'glfw',
'numpy',
'Pillow',
'triangle',
]

meta_data = {}

with open(os.path.join(here, 'p5', '__version__.py'), 'r', encoding='utf-8') as f:
exec(f.read(), meta_data)

Expand Down

0 comments on commit 9b6bc6b

Please sign in to comment.