[Qgis-community-team] Improving PyQGIS cookbook. Question.
Raymond Nijssen
r.nijssen at terglobo.nl
Tue Jan 15 02:09:16 PST 2019
Hi Victor,
Thanks for bringing up this subject! I would love improving the
cookbook, cause it is really outdated after all the api changes for
qgis3. I was planning to discuss this during the next hackfest but you
might not attend.
During the foss4g europe code sprint I've been spending some time on
finding the outdated code and it is really hard to set up the context
for every code snippet to be able to run the code.
I would like to find a way to make it possible to run the entire
cookbook. Don't know how yet, but possibly some script that selects all
the python code and runs it.
For that, we should only use some test or training dataset, to create
the layers. (That would improve the cookbook as well, because sometimes
the code snippets are not clear about what dataset is in a layer, etc.)
Then, for every new qgis release, we can run the cookbook and fix the
errors.
Your suggestions about using links to the API-documentation sound good
to me. Though, I'm using the API doc a lot, but still find it hard to
write code from what I find there. So working scripts in a cookbook are
really helpful for me.
Regards,
Raymond
On 15-01-19 10:46, Victor Olaya wrote:
> Hi all,
>
> I plan to work on updating the PyQGIS Cookbook (those parts that are
> still not adapted to QGIS 3) and would like to hear ideas about what
> can be improved, what is missing, etc, so I can do more than just
> replacing a few Python snippets
>
> Please let me know if you have any suggestion.
>
> There is one question I would like to ask. I see that we are using
> :class:`ClassName` and :func:`functionName` to add format to the text.
> I believe it would be much better to replace all that with hyperlinks
> to the correspodning API pages and sections, (I think that the key to
> become a competent programmer for PyQGIS is to know how to navigate
> the API and find stuff there), but not sure if everyone agrees on
> that.
>
> I don't think we can add the link *and* keep the :class: and :func:
> tags, so we would lose the semantics of the text. If there's a way of
> doing that, let me know.
>
> I am ot completely sure about the time I can spend on this (this is
> not on my personal time, but on company time), but most likely it will
> be around a week, kinda full time.
>
> Thanks!
> _______________________________________________
> Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
> Qgis-community-team at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-community-team
>
--
Terglobo
Fahrenheitstraat 1
5223 BJ 's-Hertogenbosch
The Netherlands
+31 (0) 6 25 31 49 83
More information about the Qgis-community-team
mailing list