Google docstring
Hi all, I tried to generate docstrings but when using the Google style simply nothing happens. All other available styles produce something. Am I missing a dependency or some config file? This Eric 24.4 on win11 with Python 3.11.7 On a side note: is format on save available somehow? Thanks in advance. Chris.
Re: tips for using eric for micropython?
Hi Detlev, aparently I'm missing something in the settings. The REPL works fine even including completion (by the board of course). In an editor buffer, completion works for QtScintilla (i.e., based on the buffer's content). I have enabled auto completion providers Eric, Jedi, QtScintilla, Rope and same for call-tips providers. Disabling all but eric does not change anything. Project is defined as "Micropython"/"Other". For example, there is no suggestion for methods and properties for "machine" (after "import machine") I didn't spot a plugin for µPy. The eric assistant plugin is installed. When looking at ~/eric_env/lib/python3.10/site-packages/eric7/APIs/MicroPython/micropython.api it looks like it should do something: There are 131 lines starting "machine". Is there a description of the file format? Even a tool for extracting from original py files or via introspection on the board? If I would want to add a specific flavor for the ESP8266 port - would it be sufficient to put another .api file ("micropython_esp8266.api") in that location? As for the workflow. At the moment I code in an editor and use the "run on device" button. When things become more stable, I plan to move those stable parts to separate files and upload them while keeping the main one, i.e., initialization and control loop, in this workflow until done or doing detached tests. If this works out, I'd be happy to provide a howto. Anything that I could use for inspiration / format? Chris. Am 03.09.22 um 18:54 schrieb Detlev Offenbach: Hi Chris, when typing in the MicroPython console ther is no completion available as all the code is executed on the micro controller. The suggested workflow is to code your project on the host computer using the eric Assistant completions with the provided MicroPython API files. However, I cannot guarantee that these are complete and 100% in line with the MicroPython or CircuitPython libraries. Patches and updates to these API files are welcome. Once you reach a sufficient code maturity, you can copy these files onto the µController using the built in µPy file management UI. Hope this helps a little bit. Once you worked out a workflow for you, I would be happy to get a HowTo on this topic. Regards, Detlev Am 03.09.22 um 18:23 schrieb Christian Haul: Hi list, I have recently started using Eric7 22.9 for micropython on an ESP8266 (Wemos D1 mini to be precise) and it works nicely. However, I'm missing API hints and validation. Is there a way to tell Eric about the environment and provide feedback on misspelled method names and get auto-completion? How do others setup Eric with uPy? Do you put all libs into your workspace? TIA, Chris.
tips for using eric for micropython?
Hi list, I have recently started using Eric7 22.9 for micropython on an ESP8266 (Wemos D1 mini to be precise) and it works nicely. However, I'm missing API hints and validation. Is there a way to tell Eric about the environment and provide feedback on misspelled method names and get auto-completion? How do others setup Eric with uPy? Do you put all libs into your workspace? TIA, Chris.
Micropython setup?
Hi list, Ich habe gerade angefangen, mit Eric auf einem ESP8266 uPy zu machen. Das funktioniert eigentlich ganz gut. Ich vermisse etwas das Ergänzen von APIs und es wäre cool, Schreibfehler in Methodennamen schon vor dem Start auf dem Device zu entdecken. Hat jemand dazu Tipps, wie man das am besten aufsetzt? Kann man das Eric, rope oder Jedi beibringen oder legt man am besten Kopien der Libraries ins Arbeitsverzeichnis? Wie machen das andere? Danke&Gruß Christian.
Re: Help to upgrade to 21.5 please - Sorry please ignore that last message
Thanks for the quick response, Detlev! This is wierd as I had never to do this on versions 19.* through 21.4. Maybe dependencies were bundled with the plugins before? Whatever, I have no issue here and am quite happy with Eric :-) Reason I mentioned it was, if there were a bug in installing dependencies, it might explain Mick's problems. So, sorry for the noise and keep up the good work! Chris. Ursprüngliche Nachricht Von: Detlev Offenbach Gesendet: 23. Mai 2021 11:25:41 MESZ An: Christian Haul , eric@riverbankcomputing.com Betreff: Re: Help to upgrade to 21.5 please - Sorry please ignore that last message Hello Christian, automatic dependency installation has been added to these plugins quite recently and is triggered by the eric plugin manager. However, this will be part of the next eric release (21.6). Before that eric did not install such plugin dependencies automatically. Detlev Am 23.05.21 um 08:00 schrieb Christian Haul: > Not sure it's related. I have installed Eric on win10 with the zip and > install.py files. When upgrading plugins for rope and vulture I had to > install dependencies manually ie by running pip. Previous installs > handled that automatically. > > Chris. > > > > *Von:* Mick Sulley > *Gesendet:* 22. Mai 2021 22:04:23 MESZ > *An:* eric@riverbankcomputing.com > *Betreff:* Re: Help to upgrade to 21.5 please - Sorry please ignore > that last message > > Just tried removing eric_env and running > > * |cd ~| > * |python3 -m venv eric_env| > * |~/eric_env/bin/python3 -m pip install --upgrade pip| > * |~/eric_env/bin/python3 -m pip install eric-ide| > * |~/eric_env/bin/eric6_post_install| > > and it worked fine! > > Mick > > On 22/05/2021 20:48, Mick Sulley wrote: >> Running Linux Mint 20.1 >> >> I have Eric 20.10 installed and working and I am trying to move to >> 21.5 and I am stuck. I am sure it is my lack of understanding rather >> than anything wrong with the software, but I would appreciate some help. >> >> Following the instructions on >> https://eric-ide.python-projects.org/eric-download.html >> >> Downloaded and extracted the package - this is what I see then >> >> mick@Mint20Desk:~/.eric6-21/eric6-21.5$ sudo python3 install.py >> Checking dependencies >> Python Version: 3.8.5 >> Found PyQt5 >> Found pyuic5 >> Optional 'PyQtWebEngine' could not be detected. >> Optional 'PyQtChart' could not be detected. >> Sorry, please install QScintilla2 and >> its PyQt5 wrapper. >> Error: QScintilla could not be installed. >> >> How do I install QScintilla2 and its PyQt5 wrapper? Looking in >> Synaptic pyqt5 and pyqt5.qsci-dev are installed >> >> Thanks >> >> Mick >> -- Detlev Offenbach det...@die-offenbachs.de
Re: Help to upgrade to 21.5 please - Sorry please ignore that last message
Not sure it's related. I have installed Eric on win10 with the zip and install.py files. When upgrading plugins for rope and vulture I had to install dependencies manually ie by running pip. Previous installs handled that automatically. Chris. Ursprüngliche Nachricht Von: Mick Sulley Gesendet: 22. Mai 2021 22:04:23 MESZ An: eric@riverbankcomputing.com Betreff: Re: Help to upgrade to 21.5 please - Sorry please ignore that last message Just tried removing eric_env and running * |cd ~| * |python3 -m venv eric_env| * |~/eric_env/bin/python3 -m pip install --upgrade pip| * |~/eric_env/bin/python3 -m pip install eric-ide| * |~/eric_env/bin/eric6_post_install| and it worked fine! Mick On 22/05/2021 20:48, Mick Sulley wrote: > Running Linux Mint 20.1 > > I have Eric 20.10 installed and working and I am trying to move to > 21.5 and I am stuck. I am sure it is my lack of understanding rather > than anything wrong with the software, but I would appreciate some help. > > Following the instructions on > https://eric-ide.python-projects.org/eric-download.html > > Downloaded and extracted the package - this is what I see then > > mick@Mint20Desk:~/.eric6-21/eric6-21.5$ sudo python3 install.py > Checking dependencies > Python Version: 3.8.5 > Found PyQt5 > Found pyuic5 > Optional 'PyQtWebEngine' could not be detected. > Optional 'PyQtChart' could not be detected. > Sorry, please install QScintilla2 and > its PyQt5 wrapper. > Error: QScintilla could not be installed. > > How do I install QScintilla2 and its PyQt5 wrapper? Looking in > Synaptic pyqt5 and pyqt5.qsci-dev are installed > > Thanks > > Mick >
Re: pipenv and eric?
Hi all, looks like I should have tried a little longer. Anyway, hopefully someone with a similar problem will find this :-) Am 13.07.20 um 20:05 schrieb Christian Haul: > $ pipenv --python 3.8 This is the important line in the output: > Virtualenv location: /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3 > In Extras->Virtualenv Manager add a new environment > name (does it matter?): pipenv > directory: /home/xyz/projects/python/piptest This should be the directory created by pipenv above (it's _not_ the directory I ran pipenv in!): /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3 > python: /usr/bin/python3.8 Again, this should be the interpreter in the above directory: /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3/bin/python3.8 With this, running or debugging from within eric works! Cheers. Chris.
pipenv and eric?
Hi all, I'm still quite new to python and am just starting to get my head around virtual environments. I got the impression that pipenv https://pipenv.pypa.io/en/latest/ is the way to go. How could I use such an environment it eric? IIUC pipenv creates regular virtualenv environments. $ pipenv --python 3.8 Creating a virtualenv for this project… Using /usr/bin/python3.8 (3.8.4) to create virtualenv… ⠋created virtual environment CPython3.8.4.candidate.1-64 in 170ms creator CPython3Posix(dest=/home/xyz/.local/share/virtualenvs/piptest-UMZySpb3, clear=False, global=False) seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/home/xyz/.local/share/virtualenv/seed-app-data/v1.0.1.debian) activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator Virtualenv location: /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3 $ pipenv shell Spawning environment shell (/bin/bash). Use 'exit' to leave. $ . /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3/bin/activate (piptest-UMZySpb3) $ pipenv --venv /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3 $ cat /home/xyz/.local/share/virtualenvs/piptest-UMZySpb3/pyvenv.cfg home = /usr implementation = CPython version_info = 3.8.4.candidate.1 virtualenv = 20.0.23+ds include-system-site-packages = false base-prefix = /usr base-exec-prefix = /usr base-executable = /usr/bin/python3.8 (piptest-UMZySpb3) $ pipenv install ldap3 Installing ldap3… Looking in indexes: https://pypi.python.org/simple Collecting ldap3 Downloading ldap3-2.7-py2.py3-none-any.whl (420 kB) Collecting pyasn1>=0.1.8 Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) Installing collected packages: pyasn1, ldap3 Successfully installed ldap3-2.7 pyasn1-0.4.8 Adding ldap3 to Pipfile's [packages]… Pipfile.lock not found, creating… Locking [dev-packages] dependencies… Locking [packages] dependencies… Updated Pipfile.lock (51db06)! Installing dependencies from Pipfile.lock (51db06)… 🐍 2/2 — 00:00:01 On the console, everything is fine, i.e. I can run a program that uses the ldap3 library. But, how to configure this in eric? In Extras->Virtualenv Manager add a new environment name (does it matter?): pipenv directory: /home/xyz/projects/python/piptest python: /usr/bin/python3.8 python variant: python-3 (no checkboxes checked) prefix: In window "PyPI" select "piptest", local packages: (empty) (was expecting ldap3 !?) In Run->Run Script Virtual Environment: pipenv Parameters: Working Directory: /home/xyz/projects/python/piptest Environment Variables: => unhandled ModuleNotFoundError „No module named 'ldap3'“ Can someone point me to some documentation / tutorial on how to use pipenv with eric? Or spot the error above? TIA Chris.