From 4278bf6de1655140328248b3313c3d4f572fbf48 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 09:12:05 +0100 Subject: [PATCH 01/11] chore: useless commit Signed-off-by: samsja --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c327961697..4d2235dd6ad 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ print(doc.embedding.shape) - **Model** data of any type (audio, video, text, images, 3D meshes, raw tensors, etc) as a single, unified data structure, the `Document` - A `Document` is a juiced-up [Pydantic Model](https://pydantic-docs.helpmanual.io/usage/models/), inheriting all the benefits, while extending it with ML focussed features -### Use pre-defined `Document`s for common use cases: +### Use pre-definedd `Document`s for common use cases: ```python from docarray.documents import Image From 27b6cef34ef862d4a84a2c4d1d5e7d0bb2123b25 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 09:54:56 +0100 Subject: [PATCH 02/11] chore: fix docs building Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index 4bdf72a0d0d..def7a5b5e18 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -48,15 +48,12 @@ jobs: - name: Build and Deploy run: | npm i -g netlify-cli - git fetch origin python -m pip install --upgrade pip pip install -r requirements.txt python -m pip install wheel python -m pip install poetry - cd .. python -m poetry config virtualenvs.create false && python -m poetry install --no-interaction --no-ansi --all-extras - git fetch origin cd docs export NUM_RELEASES=2 # only 2 last tags to save build time bash makedoc.sh From e0d2b1719cb359ddb8142269b090678560252b9e Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 09:59:47 +0100 Subject: [PATCH 03/11] chore: fix docs build Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index def7a5b5e18..0cbfa036b43 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -52,6 +52,7 @@ jobs: pip install -r requirements.txt python -m pip install wheel python -m pip install poetry + cd .. python -m poetry config virtualenvs.create false && python -m poetry install --no-interaction --no-ansi --all-extras cd docs From 0e592140fb16abff8a31dde60cb93512a78bc0dd Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:05:45 +0100 Subject: [PATCH 04/11] fix: add build docs on branch Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index 0cbfa036b43..c0caa0a99b0 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -4,6 +4,7 @@ on: push: branches: - feat-rewrite-v2 + - test-build-doc pull_request: types: [opened, synchronize, reopened] From 04f4efc979853c2e973c700a82d5bf090d92d2bc Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:08:27 +0100 Subject: [PATCH 05/11] fix: no checkout in docs Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index c0caa0a99b0..c8932d1108b 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -36,10 +36,6 @@ jobs: steps: - run: | echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV - - uses: actions/checkout@v2.5.0 - with: - repository: jina-ai/docarray - ref: ${{ env.BRANCH_NAME }} - uses: actions/setup-python@v4 with: python-version: 3.7 From 923bcfcf9d91e87085e51d9ec290d2a8d6a92d5e Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:10:31 +0100 Subject: [PATCH 06/11] fix: no checkout in docs Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index c8932d1108b..87583c4ae9f 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -36,6 +36,7 @@ jobs: steps: - run: | echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV + - uses: actions/checkout@v2.5.0 - uses: actions/setup-python@v4 with: python-version: 3.7 From 08439db0a97a2fe5b06eb6bbe0892ad3dfc8a803 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:21:24 +0100 Subject: [PATCH 07/11] fix: split ci job for pr and branch push Signed-off-by: samsja --- .github/workflows/build_docs_on_branch.yml | 41 ++++++++++++++++++++++ .github/workflows/ci_only_pr.yml | 4 --- 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build_docs_on_branch.yml diff --git a/.github/workflows/build_docs_on_branch.yml b/.github/workflows/build_docs_on_branch.yml new file mode 100644 index 00000000000..9cd8e7c361f --- /dev/null +++ b/.github/workflows/build_docs_on_branch.yml @@ -0,0 +1,41 @@ +name: PR + +on: + push: + branches: + - feat-rewrite-v2 + - test-build-doc + +jobs: + + deploy-to-netlify: + runs-on: ubuntu-latest + needs: [assign-label-to-pr] + steps: + - run: | + echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV + - uses: actions/checkout@v2.5.0 + - uses: actions/setup-python@v4 + with: + python-version: 3.7 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build and Deploy + run: | + npm i -g netlify-cli + python -m pip install --upgrade pip + pip install -r requirements.txt + python -m pip install wheel + python -m pip install poetry + cd .. + python -m poetry config virtualenvs.create false && python -m poetry install --no-interaction --no-ansi --all-extras + + cd docs + export NUM_RELEASES=2 # only 2 last tags to save build time + bash makedoc.sh + netlify deploy --dir=_build/dirhtml --alias="ft-${{ env.BRANCH_NAME }}" --message="Deploying docs to ${{ env.BRANCH_NAME }} branch" + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN1 }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + working-directory: docs diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index 87583c4ae9f..b67a8c0af90 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -1,10 +1,6 @@ name: PR on: - push: - branches: - - feat-rewrite-v2 - - test-build-doc pull_request: types: [opened, synchronize, reopened] From d6f6b94cfa956ff6f8fbc0d0262ad67bfa7df6c3 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:27:33 +0100 Subject: [PATCH 08/11] fix: split ci job for pr and branch push Signed-off-by: samsja --- .github/workflows/ci_only_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index b67a8c0af90..71dc976971e 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -1,4 +1,4 @@ -name: PR +name: BRANCH on: pull_request: From 1b39deb35bf63b1e2c664d8060e22d95bfd3e000 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:29:19 +0100 Subject: [PATCH 09/11] fix: split ci job for pr and branch push Signed-off-by: samsja --- .github/workflows/build_docs_on_branch.yml | 2 +- .github/workflows/ci_only_pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docs_on_branch.yml b/.github/workflows/build_docs_on_branch.yml index 9cd8e7c361f..824cf34a603 100644 --- a/.github/workflows/build_docs_on_branch.yml +++ b/.github/workflows/build_docs_on_branch.yml @@ -1,4 +1,4 @@ -name: PR +name: BR on: push: diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index 71dc976971e..b67a8c0af90 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -1,4 +1,4 @@ -name: BRANCH +name: PR on: pull_request: From 9c8fe7a51267ece9fa5fb12206ccf7a39f6c520d Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:30:45 +0100 Subject: [PATCH 10/11] fix: split ci job for pr and branch push Signed-off-by: samsja --- .github/workflows/build_docs_on_branch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_docs_on_branch.yml b/.github/workflows/build_docs_on_branch.yml index 824cf34a603..73b359790eb 100644 --- a/.github/workflows/build_docs_on_branch.yml +++ b/.github/workflows/build_docs_on_branch.yml @@ -10,7 +10,6 @@ jobs: deploy-to-netlify: runs-on: ubuntu-latest - needs: [assign-label-to-pr] steps: - run: | echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV From edec18fbbcb640e3ad5059b42ce50641e0ce675f Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 30 Jan 2023 10:43:07 +0100 Subject: [PATCH 11/11] fix: update redame Signed-off-by: samsja --- .github/workflows/build_docs_on_branch.yml | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docs_on_branch.yml b/.github/workflows/build_docs_on_branch.yml index 73b359790eb..3713226da79 100644 --- a/.github/workflows/build_docs_on_branch.yml +++ b/.github/workflows/build_docs_on_branch.yml @@ -1,5 +1,6 @@ name: BR - +## this action is here only for the development phase of docarray v2 +## it will be removed once the new version is released on: push: branches: diff --git a/README.md b/README.md index 4d2235dd6ad..5c327961697 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ print(doc.embedding.shape) - **Model** data of any type (audio, video, text, images, 3D meshes, raw tensors, etc) as a single, unified data structure, the `Document` - A `Document` is a juiced-up [Pydantic Model](https://pydantic-docs.helpmanual.io/usage/models/), inheriting all the benefits, while extending it with ML focussed features -### Use pre-definedd `Document`s for common use cases: +### Use pre-defined `Document`s for common use cases: ```python from docarray.documents import Image