Skip to content

Commit

Permalink
в cd-stage добавили выбор строить ли pdf-книгу; решили уязвимость с…
Browse files Browse the repository at this point in the history
… `nbconvert`; немного обновили contribution (#445)

* docs: fix link to cd-stage intor contr

* cd: add `inputs`

* style: apply

* fix: remove if for 1 job

* ci: bump mirrors-pyright

* style: apply

* style: apply

* style: apply

* cd: fix cond if true

* cd: update `default` from `false` to `no`

* build(deps): bump nbconvert from 5.6.1 to 6.3.0 (#444)

Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 5.6.1 to 6.3.0.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](jupyter/nbconvert@5.6.1...6.3.0)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* style: apply

* docs: update contributing

* docs: update contributing

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
vvssttkk and dependabot[bot] authored Aug 11, 2022
1 parent 81e231d commit bff6e2f
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 85 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }}
run: |
poetry run jupyter-book toc migrate /home/runner/work/qmlcourse/qmlcourse/qmlcourse/_toc.yml -o /home/runner/work/qmlcourse/qmlcourse/qmlcourse/_toc.yml
poetry run jupyter-book build ./qmlcourse
- name: update publish dir to build branch
Expand All @@ -79,7 +78,6 @@ jobs:
DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }}
run: |
sudo apt-get install texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk
poetry run jupyter-book build ./qmlcourse --builder latex
- name: create pdf book
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/cd-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: cd-stage

on:
workflow_dispatch:
inputs:
build_pdf:
description: 'build pdf book? (it is increase time workflow)'
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'

env:
PUBLISH_BRANCH: web-page-stage
Expand Down Expand Up @@ -62,7 +71,6 @@ jobs:
DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }}
run: |
poetry run jupyter-book toc migrate /home/runner/work/qmlcourse/qmlcourse/qmlcourse/_toc.yml -o /home/runner/work/qmlcourse/qmlcourse/qmlcourse/_toc.yml
poetry run jupyter-book build ./qmlcourse
- name: update publish dir to build branch
Expand All @@ -73,20 +81,22 @@ jobs:
publish_branch: ${{ env.PUBLISH_BRANCH }}

- name: build latex files
if: github.event.inputs.build_pdf == 'yes'
env:
DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }}
run: |
sudo apt-get install texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk
poetry run jupyter-book build ./qmlcourse --builder latex
- name: create pdf book
if: github.event.inputs.build_pdf == 'yes'
continue-on-error: true
run: |
cd ./qmlcourse/_build/latex/
xelatex -interaction=nonstopmode qmlcourse.tex
- name: send pdf book to build branch
if: github.event.inputs.build_pdf == 'yes'
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ repos:
- id: mypy

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.265
rev: v1.1.266
hooks:
- id: pyright

Expand Down
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Still, if you are not comfortable with GitHub at all but can provide valuable fe

### GitHub intro

If you are not familiar with GitHub, please take [a short course](https://learngitbranching.js.org/) on Git branches. Be familiar with what commits, branches, pulls/pushes are. Further, what are Issues and Pull Requests on GitHub. The rest of the work on the course material is built on that.
If you are not familiar with GitHub, please take [a short course](https://learngitbranching.js.org/) on Git branches or the official [training manual](https://githubtraining.github.io/training-manual/#/). Be familiar with what commits, branches, pulls/pushes are. Further, what are Issues and Pull Requests on GitHub. The rest of the work on the course material is built on that.

## Contributor roles

Expand Down Expand Up @@ -93,7 +93,7 @@ Matplotlib figures should be

### Building the project

To watch your result (after `git push`) you can build `Jupyter Book` automatically by GitHub Action: in the page, https://github.com/quantum-ods/qmlcourse/actions/workflows/deploy-book-stage.yml choose your branch and press `Run workflow`. After 10-15min visit https://qmlc-web-page-stage.netlify.app/ and find your lectures page.
To watch your result (after `git push`) you can build `Jupyter Book` automatically by GitHub Action: in the [action page](https://github.com/quantum-ods/qmlcourse/actions/workflows/cd-stage.yml) choose your branch and press `Run workflow`. After ~15min visit the [stage book](https://qmlc-web-page-stage.netlify.app/) to find your ended result.

### Chapters and headers

Expand Down Expand Up @@ -163,14 +163,17 @@ Example:

## Pull Requests

- If you were assigned to an issue, you need to create a new branch from the `master`.
- When you finish your work you make a Pull Request (into `master` branch) where you tag the initial issue and assign yourself (right in the panel).
- Fork and clone the repository
- Create a new branch: `git checkout -b my-branch-name`
- Make your change, and make sure the actions still work
- Push to your fork and submit a pull request
- Wait for your pull request to be reviewed and merged.

### Run pre-commit hooks before building

*This part not necessarily, the reviewers will do it for you*

Before the final `git push` you can run hooks, you should install the [pre-commit](https://pre-commit.com/#installation). To execute pre-commit, run (if using poetry)
Before the final `git push` you should install the [pre-commit](https://pre-commit.com/#installation). To execute pre-commit, run (if using poetry)

```{shell}
poetry run pre-commit run --all-files
Expand All @@ -195,7 +198,7 @@ The list is sorted alphabetically and you need to place your surname and name (o

## Translate

All English version start after block **"О КУРСЕ / ABOUT THE COURSE"** where blocks duplicated from Russian. Each lectures folders and pictures have `ru/` & `en/` separate folders to split languages versions.
All English version start after block **"О КУРСЕ / ABOUT THE COURSE"** where they are duplicated from Russian. Each lectures folders and pictures have `ru/` & `en/` separate folders to split languages versions.

## Intellectual property rights

Expand Down
Loading

0 comments on commit bff6e2f

Please sign in to comment.