Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-13 Thread matteo via QGIS-Developer

you might need to copy the folder, same than for _templates:
see https://github.com/qgis/pyqgis/search?q=_templates 



this approach seems working (at least locally). I've made a PR:

https://github.com/qgis/pyqgis/pull/101

Cheers and thanks for the help

Matteo>
otherwise, look at https://github.com/qgis/pyqgis/pull/89/files?w=1 



Le mar. 13 déc. 2022 à 09:12, matteo > a écrit :


Hi Denis,

 > yes you can limit what you build
 > see
https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh

 > >
 >
 > either use --package core/gui/… or --class QgsVector (which will
work as
 > QgsVector*)

thanks, it works as expected!

Last (hopefully :) ) question: I'm adding some custom css in the
_static/css/custom.css file. I've also added:

html_static_path = ['_static']
html_css_files = [
      'css/custom.css',
]

in the conf.py.in  file, but when compiling
sphinx is complaining:

WARNING: html_static_path entry '_static' does not exist

Do you have any idea why this is happening?

Cheers and thanks again

Matteo
 >
 >
 >
 >      > Another approach is to do a PR on the repo, you will have
a built
 >      > example at https://qgis.org/pyqgis/master_PRXX

 >     >
 >      > 
 >     >> (replace XX) when it's finished.
 >
 >     and this can be done also to the forked repository right?
 >
 >
 > you would need to enable the pages on your repo, I am not sure
this will
 > work out-of-the-box.
 >
 >
 >      > I believe it would require a bit of love to improve this
workflow
 >     and
 >      > drop the gh-pages branch.
 >      >
 >      > I hope this helps a bit.
 >
 >     Thanks Denis
 >
 >     Matteo
 >
 >
 >      > Cheers,
 >      > Denis
 >      >
 >      >
 >      >
 >      > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer
 >      > mailto:qgis-developer@lists.osgeo.org>
 >     >
 >     
 >           > a écrit :
 >      >
 >      >     Hi devs,
 >      >
 >      >     I've some small ideas to enhance the readthedocs theme
of the
 >     pyqgis
 >      >     documentation and I want make some local test before
making a
 >     pull
 >      >     request.
 >      >
 >      >     I've cloned this repository (around 7GB?!):
 >      >
 >      > https://github.com/qgis/pyqgis
 >
 >      >>
 >      >
 >      >     and then I followed the instruction of the Readme
file. It seems
 >      >     building but it is literally taking ages (./build-docs.sh
 >      >     -qgis-build-dir /home/matteo/dev/qgis-master/).
 >      >
 >      >     Am I doing something wrong or can I use some shortcut to
 >     build it? I'm
 >      >     just playing with some css and eventually the
config.py.in 
 >     >
 >      >     
>> file.
 >      >
 >      >     Cheers and thanks for any advice
 >      >
 >      >     Matteo
 >      >
 >      >     ___
 >      >     QGIS-Developer mailing list
 >      > QGIS-Developer@lists.osgeo.org

 >     >
 >     
 >     >>
 >      >     List info:
 > https://lists.osgeo.org/mailman/listinfo/qgis-developer
   

Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-13 Thread Denis Rouzaud via QGIS-Developer
you might need to copy the folder, same than for _templates:
see https://github.com/qgis/pyqgis/search?q=_templates

otherwise, look at https://github.com/qgis/pyqgis/pull/89/files?w=1

Le mar. 13 déc. 2022 à 09:12, matteo  a écrit :

> Hi Denis,
>
> > yes you can limit what you build
> > see https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh
> > 
> >
> > either use --package core/gui/… or --class QgsVector (which will work as
> > QgsVector*)
>
> thanks, it works as expected!
>
> Last (hopefully :) ) question: I'm adding some custom css in the
> _static/css/custom.css file. I've also added:
>
> html_static_path = ['_static']
> html_css_files = [
>  'css/custom.css',
> ]
>
> in the conf.py.in file, but when compiling sphinx is complaining:
>
> WARNING: html_static_path entry '_static' does not exist
>
> Do you have any idea why this is happening?
>
> Cheers and thanks again
>
> Matteo
> >
> >
> >
> >  > Another approach is to do a PR on the repo, you will have a built
> >  > example at https://qgis.org/pyqgis/master_PRXX
> > 
> >  >  > > (replace XX) when it's
> finished.
> >
> > and this can be done also to the forked repository right?
> >
> >
> > you would need to enable the pages on your repo, I am not sure this will
> > work out-of-the-box.
> >
> >
> >  > I believe it would require a bit of love to improve this workflow
> > and
> >  > drop the gh-pages branch.
> >  >
> >  > I hope this helps a bit.
> >
> > Thanks Denis
> >
> > Matteo
> >
> >
> >  > Cheers,
> >  > Denis
> >  >
> >  >
> >  >
> >  > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer
> >  >  > 
> >  > >>
> >  > a écrit :
> >  >
> >  > Hi devs,
> >  >
> >  > I've some small ideas to enhance the readthedocs theme of the
> > pyqgis
> >  > documentation and I want make some local test before making a
> > pull
> >  > request.
> >  >
> >  > I've cloned this repository (around 7GB?!):
> >  >
> >  > https://github.com/qgis/pyqgis 
> > >
> >  >
> >  > and then I followed the instruction of the Readme file. It
> seems
> >  > building but it is literally taking ages (./build-docs.sh
> >  > -qgis-build-dir /home/matteo/dev/qgis-master/).
> >  >
> >  > Am I doing something wrong or can I use some shortcut to
> > build it? I'm
> >  > just playing with some css and eventually the config.py.in
> > 
> >  > > file.
> >  >
> >  > Cheers and thanks for any advice
> >  >
> >  > Matteo
> >  >
> >  > ___
> >  > QGIS-Developer mailing list
> >  > QGIS-Developer@lists.osgeo.org
> > 
> >  > >
> >  > List info:
> > https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> >  >  > >
> >  > Unsubscribe:
> > https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> >  >  > >
> >  >
> >
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-13 Thread matteo via QGIS-Developer

Hi Denis,


yes you can limit what you build
see https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh 



either use --package core/gui/… or --class QgsVector (which will work as 
QgsVector*)


thanks, it works as expected!

Last (hopefully :) ) question: I'm adding some custom css in the 
_static/css/custom.css file. I've also added:


html_static_path = ['_static']
html_css_files = [
'css/custom.css',
]

in the conf.py.in file, but when compiling sphinx is complaining:

WARNING: html_static_path entry '_static' does not exist

Do you have any idea why this is happening?

Cheers and thanks again

Matteo




 > Another approach is to do a PR on the repo, you will have a built
 > example at https://qgis.org/pyqgis/master_PRXX

 > > (replace XX) when it's finished.

and this can be done also to the forked repository right?


you would need to enable the pages on your repo, I am not sure this will 
work out-of-the-box.



 > I believe it would require a bit of love to improve this workflow
and
 > drop the gh-pages branch.
 >
 > I hope this helps a bit.

Thanks Denis

Matteo


 > Cheers,
 > Denis
 >
 >
 >
 > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer
 > mailto:qgis-developer@lists.osgeo.org>
>>
 > a écrit :
 >
 >     Hi devs,
 >
 >     I've some small ideas to enhance the readthedocs theme of the
pyqgis
 >     documentation and I want make some local test before making a
pull
 >     request.
 >
 >     I've cloned this repository (around 7GB?!):
 >
 > https://github.com/qgis/pyqgis 
>
 >
 >     and then I followed the instruction of the Readme file. It seems
 >     building but it is literally taking ages (./build-docs.sh
 >     -qgis-build-dir /home/matteo/dev/qgis-master/).
 >
 >     Am I doing something wrong or can I use some shortcut to
build it? I'm
 >     just playing with some css and eventually the config.py.in

 >     > file.
 >
 >     Cheers and thanks for any advice
 >
 >     Matteo
 >
 >     ___
 >     QGIS-Developer mailing list
 > QGIS-Developer@lists.osgeo.org

>
 >     List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer

 >     >
 >     Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer

 >     >
 >


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-12 Thread Denis Rouzaud via QGIS-Developer
Le mar. 13 déc. 2022 à 08:35, matteo  a écrit :

> Hi Denis,
>
> > The main issue is that the website is added to a branch (gh-pages) and
> > is versioned.
> >  From time to time, I squash the commits and force push to avoid such a
> > large size (obviously, it's been a while since I didn't do it).
> > I am a bit reluctant at squashing / force pushing directly from the
> > workflow as any error would mean losing the pages (potentially losing
> > the older versions).
> >
> > By fetching only the master branch you should be better.
>
> got it, thanks
>
> > Then, building docs shouldn't take too long. What duration are you
> > experiencing?
>
> just reading sources it's more than 10 minutes while building the
> documentation is still running (so more or less 30 minutes). I don't
> understand if/where I can skip sources and compile just a small small
> part of the documentation since what I want to to is only theme related.
>

yes you can limit what you build
see https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh

either use --package core/gui/… or --class QgsVector (which will work as
QgsVector*)



> > Another approach is to do a PR on the repo, you will have a built
> > example at https://qgis.org/pyqgis/master_PRXX
> >  (replace XX) when it's finished.
>
> and this can be done also to the forked repository right?
>

you would need to enable the pages on your repo, I am not sure this will
work out-of-the-box.

>
> > I believe it would require a bit of love to improve this workflow and
> > drop the gh-pages branch.
> >
> > I hope this helps a bit.
>
> Thanks Denis
>
> Matteo
>
>
> > Cheers,
> > Denis
> >
> >
> >
> > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer
> > mailto:qgis-developer@lists.osgeo.org>>
>
> > a écrit :
> >
> > Hi devs,
> >
> > I've some small ideas to enhance the readthedocs theme of the pyqgis
> > documentation and I want make some local test before making a pull
> > request.
> >
> > I've cloned this repository (around 7GB?!):
> >
> > https://github.com/qgis/pyqgis 
> >
> > and then I followed the instruction of the Readme file. It seems
> > building but it is literally taking ages (./build-docs.sh
> > -qgis-build-dir /home/matteo/dev/qgis-master/).
> >
> > Am I doing something wrong or can I use some shortcut to build it?
> I'm
> > just playing with some css and eventually the config.py.in
> >  file.
> >
> > Cheers and thanks for any advice
> >
> > Matteo
> >
> > ___
> > QGIS-Developer mailing list
> > QGIS-Developer@lists.osgeo.org  QGIS-Developer@lists.osgeo.org>
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> >
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-12 Thread matteo via QGIS-Developer

Hi Denis,

The main issue is that the website is added to a branch (gh-pages) and 
is versioned.
 From time to time, I squash the commits and force push to avoid such a 
large size (obviously, it's been a while since I didn't do it).
I am a bit reluctant at squashing / force pushing directly from the 
workflow as any error would mean losing the pages (potentially losing 
the older versions).


By fetching only the master branch you should be better.


got it, thanks

Then, building docs shouldn't take too long. What duration are you 
experiencing?


just reading sources it's more than 10 minutes while building the 
documentation is still running (so more or less 30 minutes). I don't 
understand if/where I can skip sources and compile just a small small 
part of the documentation since what I want to to is only theme related.


Another approach is to do a PR on the repo, you will have a built 
example at https://qgis.org/pyqgis/master_PRXX 
 (replace XX) when it's finished.


and this can be done also to the forked repository right?

I believe it would require a bit of love to improve this workflow and 
drop the gh-pages branch.


I hope this helps a bit.


Thanks Denis

Matteo



Cheers,
Denis



Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> 
a écrit :


Hi devs,

I've some small ideas to enhance the readthedocs theme of the pyqgis
documentation and I want make some local test before making a pull
request.

I've cloned this repository (around 7GB?!):

https://github.com/qgis/pyqgis 

and then I followed the instruction of the Readme file. It seems
building but it is literally taking ages (./build-docs.sh
-qgis-build-dir /home/matteo/dev/qgis-master/).

Am I doing something wrong or can I use some shortcut to build it? I'm
just playing with some css and eventually the config.py.in
 file.

Cheers and thanks for any advice

Matteo

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Building pyqgis doc locally

2022-12-12 Thread Denis Rouzaud via QGIS-Developer
Hi Matteo,

The main issue is that the website is added to a branch (gh-pages) and is
versioned.
>From time to time, I squash the commits and force push to avoid such a
large size (obviously, it's been a while since I didn't do it).
I am a bit reluctant at squashing / force pushing directly from the
workflow as any error would mean losing the pages (potentially losing the
older versions).

By fetching only the master branch you should be better.
Then, building docs shouldn't take too long. What duration are you
experiencing?

Another approach is to do a PR on the repo, you will have a built example
at https://qgis.org/pyqgis/master_PRXX (replace XX) when it's finished.

I believe it would require a bit of love to improve this workflow and drop
the gh-pages branch.

I hope this helps a bit.

Cheers,
Denis



Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer <
qgis-developer@lists.osgeo.org> a écrit :

> Hi devs,
>
> I've some small ideas to enhance the readthedocs theme of the pyqgis
> documentation and I want make some local test before making a pull request.
>
> I've cloned this repository (around 7GB?!):
>
> https://github.com/qgis/pyqgis
>
> and then I followed the instruction of the Readme file. It seems
> building but it is literally taking ages (./build-docs.sh
> -qgis-build-dir /home/matteo/dev/qgis-master/).
>
> Am I doing something wrong or can I use some shortcut to build it? I'm
> just playing with some css and eventually the config.py.in file.
>
> Cheers and thanks for any advice
>
> Matteo
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer