-
Notifications
You must be signed in to change notification settings - Fork 8
4. FAQ
There is an option to debug pylabnet with VScode through the launch control window. In Visual Studio, this requires configuring a debugger with a launch.json file that looks like this:
{
"name": "Python: attach to launcher",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost",
"redirectOutput" : true,
"processId": "${command:pickProcess}"
}
Then in the launch control window, click on the debug radio button at the top left of the window:
Then use the dropdown menu to choose whether you want to attach to the launcher or pylabnet_server
and finally launch the script you want to debug. You will see the follow message in the logger:
Then immediately afterwards go to VScode, go to run and debug, choose Python: attach to launcher, search for the process with the appropriate PID in the search bar:
Now you can debug your subprocess that was launched via Launch Control! Add breakpoints where you want in VS code.
At any given time, we can freeze the pylabnet source code and publish it to the Python Package Index (PyPI) to be available for public download via pip
. The current version on PyPI is available here.
Generally, not every commit or even merge into master needs to be published to pip as a new version. However, if substantial functionality is added that could be useful to other users (especially ones that are not actively developing the platform), it is a good idea to release a new version on pip. In this case, you can do this with the following steps:
- Make sure the
install_requires
kwarg insetup.py
is up to date with all mandatory packages. If you have added new dependencies, add them here.
NOTE: The preferred format is to use
>=
to constrain package versions, rather than==
. Try not to write code that requires a<
constraint, since this could cause user-dependent conflicts. As an example of this poor practice, the latest version of Spyder has a conflict with the latest versions of pyqt5.
-
Update the version number in
__init__.py
in the root module. We have adopted a 3 digit versioning schemex.y.z
wherex
is the major version, each newy
digit corresponds to a substantially new release (with new software components), and thez
digit can increment with any improvements, changes, and bug fixes. -
Update
CHANGELOG.md
-
Run the following from the commandline
python setup.py sdist bdist_wheel
This will create a pylabnet/dist
directory (which should not be tracked by Github) containing the build files for this version. Note that this requires one to pip install wheel
.
- To upload to pip, run the command
twine upload dist/*
NOTE: This requires credentials on PyPI, as well as the
twine
package which can be installed withpip install twine
. You may also run into issues if yourdist/
folder has older distributions, these should be deleted prior to upload.