Hi,

On Thu, Dec 29, 2016 at 4:55 AM, Tudor Barascu <tudorbara...@yahoo.com>
wrote:

> Hi Alexander and thanks for the info.
>
> From what I noticed, the PyQgis.api is normally built every time but
> there's a corresponding pap file which the autocomplete is based on that
> doesn't get usually created.
>
> In order to create that file there's a "make qsci-pap-src" option which
> seems to be broken on master.
>
> Think Larry is more familiar with this part.
>

Yeah, looks like the the .api and .pap setup is woefully outdated. The .api
files in the source tree need updated, and the .pap script probably needs
revamped.

Since the finished .pap file is large enough (~ 1.3 MB) that is should not
be auto-generated and pushed to the master branch upon *every* Travis CI
run, could be that we can leverage Travis in the following way:

* Use the Travis 'cron job' feature [0] to generate the .api (and/or .pap)
file, probably once a week, or maybe nightly. If the build cache on Travis
is available, then the API files could be referenced without needing to
rebuild the Python modules.

* Deploy the .api or .pap files from Travis to an S3 bucket (or other QGIS
server infrastructure). Then, a dev build target can be used to pull the
latest, or even an updater function could be added to the console. If that
is an API deployed file, then the .pap generation script could be called
when making the target or running an updater.

While such a dev target could also just generate the API file from scratch
(as currently exists, albeit apparently broken), leveraging Travis
deployment of a generated auto-completion artifact to a centralized
download location ensures that what is tested during development is what
ends up as part of packaged releases as well. Also, it would cache .api
files relative to versioned builds, and the largish .pap doesn't need to
pollute the source tree with excessive commits.

Another solution might be to have the API file(s) be distributed via a
project-maintained PyQGIS plugin. Then it would be updatable via normal
Plugin Manager channels.

Side note: the QScintilla2 completion is purely static, with no
introspection/completion on assigned variables, etc. (unless there are new
QScintilla2 features here). If you are looking for a more robust console,
consider the IPyConsole plugin [1].

[0] https://docs.travis-ci.com/user/cron-jobs/
[1] https://plugins.qgis.org/plugins/IPyConsole/ ,
http://www.itopen.it/qgis-and-ipython-the-definitive-interactive-console

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


> All the best,
> Tudor
>
> On Thursday, December 29, 2016 10:08 AM, Alexander Bruy <
> alexander.b...@gmail.com> wrote:
>
>
> Hi Tudor,
>
> AFAIK, autocompletion uses pre-generated API-files. Usually they updated
> before release and not updated during dev cycle as some signatures may
> change.
>
> 2016-12-28 20:21 GMT+02:00 Tudor Barascu <tudorbara...@yahoo.com>:
> > Hello,
> >
> > Just noticed that in the master python console some of the autocomplete
> > suggestions are bad.
> > For instance, although QgsDataSourceURI has been renamed to
> QgsDataSourceUri
> > and the console suggests the first version which doesn't work.
> >
> > Shouldn't the suggestions be automatic?
> >
> > Thanks,
> > Tudor
>
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> --
> Alexander Bruy
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to