New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing CI/CD #221
Implementing CI/CD #221
Conversation
This reverts commit 12857cb.
This reverts commit ae7bf4e.
- Copy assets into _build/html/assets instead of into docs/assets during build.
2cf731c
to
83d8175
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. There is a small code complication in the pavement file, but we can solve this later
pavement.py
Outdated
|
|
||
|
|
||
| @task | ||
| def build_qt(): | ||
| sh('export QTHELP=True; make qthelp') | ||
| sh('qcollectiongenerator _build/qthelp/Qt5CadaquesBook.qhcp') | ||
| path('_build/qthelp/Qt5CadaquesBook.qch').copy('assets') | ||
| path('_build/qthelp/Qt5CadaquesBook.qch').copy('docs/assets') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you copy things to docs folder? This is not an output folder
pavement.py
Outdated
| with pushd('docs'): | ||
| with pushd('assets'): | ||
| excludelist = [ './index.rst', './examples-list.txt' ] | ||
| for f in filter(lambda x: x not in excludelist, path('.').files('*')): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you copy RST files to the output?
pavement.py
Outdated
| name = '%s-assets.tgz' % ch | ||
| with pushd('docs'): | ||
|
|
||
| chapters = [ 'meetqt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too complicated. To much manual code. Need to find better solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just rename the chapter to ch01-introduction, not sure if this makes life more complicated at other places
pavement.py
Outdated
| 'extensions' ] | ||
|
|
||
| examples = [] | ||
| for c, n in enumerate(chapters, 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c,n are to cryptic names. Please use more meaningful names
pavement.py
Outdated
|
|
||
| # files to include from the indexes as all chapters does not have examples | ||
| f = open('examples-list.txt', 'w') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be called "assets-lists.rst" as this is about the assets of the book, not only examples.
Also I think you should create a list in python and then just simply use writelines on the path. (see https://pathpy.readthedocs.io/en/stable/api.html#path.Path.write_lines). Maybe we should also use the new f-string syntax this would cleanup the script big time.
| @task | ||
| def assets_init(): | ||
| path('assets').makedirs() | ||
| # create _build path assets for generated contents | ||
| path('_build').makedirs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should be able to make
path('_build/html').makedirs_p()
path('_build/intermediate').makedirs_p()
…l clean up the gh-pages in prod
Current status is:
Builds QtHelpBuilds translationsYou can find the generated pages here: https://e8johan.github.io/qmlbook/index.html
The setup has been modified according to discussions with @jryannel and now do the following:
The current head version is called master. Future branches will be created based on Qt versions. These will have to be explicitly linked from master as we go along (I guess we put these in the sidebar).