Skip to content
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

feat(project): Micropy Project Folder #28

Merged
merged 2 commits into from
Jul 14, 2019
Merged

Conversation

BradenM
Copy link
Owner

@BradenM BradenM commented Jul 14, 2019

Instead of using the absolute paths to $HOME/.micropy folder in settings.json and .pylintrc, this creates a <PROJECT_NAME>/.micropy folder where used stubs are symlinked. This way, they can be referenced from settings.json as so:

"setting_name" : [
    "${workspaceRoot}/.micropy/micropython/frozen",
    "${workspaceRoot}/.micropy/esp32-micropython-1.11.0/frozen",
    "${workspaceRoot}/.micropy/esp32-micropython-1.11.0/stubs"
]

NOTE: This requires the VSCode Python extension (which you probably have anyways if your using this.) See microsoft/vscode#2809 for more details.

and from .pylint rc:

init-hook='import sys;sys.path.insert(1, ".micropy/micropython/frozen");sys.path.insert(1, ".micropy/esp32-micropython-1.11.0/frozen");sys.path.insert(1, ".micropy/esp32-micropython-1.11.0/stubs")'

Using this method allows settings.json and .pylintrc to be VCS friendly, while only adding .micropy/ to your .gitignore

Closes #19

Creates a .micropy folder in project. Stubs used in the project are symlinked into this folder from
the main .micropy folder. This way, the stub files can be referenced from settings.json/.pylintrc lo
cally, allowing them to be VCS friendly.
@BradenM BradenM merged commit 977ff1f into develop Jul 14, 2019
@BradenM BradenM deleted the feat/micropy-project-folder branch July 14, 2019 03:27
@BradenM BradenM mentioned this pull request Jul 17, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant