Skip to content
Snippets Groups Projects
Commit e462584e authored by Simon Wittl's avatar Simon Wittl
Browse files

added code to readme

parent 2c35421d
No related branches found
No related tags found
No related merge requests found
image: ubuntu:latest
stages:
- code_embed
variables:
GIT_STRATEGY: clone
code_embedder:
stage: code_embed
script:
- echo "Personal a"
- cd code-embedder/
- poetry install --only main
- README_PATHS=$(find .. -maxdepth 1 -name "*.md" -print)
- poetry run python ./src/main.py --readme-paths $README_PATHS
- cd ..
- README_PATHS=$(find . -maxdepth 1 -name "*.md" -print)
- git add $README_PATHS
- git diff --staged
- export BRANCH_NAME="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_REF_NAME}"
- echo "branch name $BRANCH_NAME"
- git remote set-url origin "https://oauth2:${PERSONAL_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
- echo "https://oauth2:${PERSONAL_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
- if ! git diff --cached --exit-code; then
git commit -m "Apply Code Embedder";
git push origin HEAD:$BRANCH_NAME;
else
echo "No changes to commit";
fi
before_script:
- apt-get update && apt-get install -y curl git python3 python3-pip
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="$HOME/.local/bin:$PATH"
- git clone https://github.com/kvankova/code-embedder.git
- git config --global user.email $GITLAB_USER_EMAIL
- git config --global user.name $GITLAB_USER_NAME
only:
- merge_requests
......@@ -27,3 +27,9 @@ This schema defines the properties for projection data in THD JSON format.
| `image_heigth_px` | integer | Height of the image in pixels | Minimum 1 | Yes |
| `projection_matrix_cera` | array | Projection matrix for CERA, representing transformations | 3 arrays of 4 numbers | No |
### Examples
```python:../scripts/validate_thd_json.py:o:main
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment