From 341bf1bd43b1a9e6eb459e797bce08342ab9e529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7e=20Uludo=C4=9Fan?= Date: Thu, 25 Jan 2024 00:43:46 +0300 Subject: [PATCH 01/11] Create publish.yml --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..83a94e7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + push: + branches: + - release/* + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 2862cde3aae9da41a05ffe92c57b543474c90421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7e=20Uludo=C4=9Fan?= Date: Thu, 25 Jan 2024 10:07:33 +0300 Subject: [PATCH 02/11] Update publish.yml --- .github/workflows/publish.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 83a94e7..1ccb535 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,10 +9,9 @@ name: Upload Python Package on: - push: - branches: - - release/* - + release: + types: [published] + permissions: contents: read @@ -34,7 +33,6 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From 002511a4bb97b2746af94f2e11406fb370230cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7e=20Uludo=C4=9Fan?= Date: Thu, 25 Jan 2024 10:14:46 +0300 Subject: [PATCH 03/11] Update pyproject.toml --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 177e9ef..7ce1131 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Scientific/Engineering :: Natural Language Processing", "Topic :: Scientific/Engineering :: Information Analysis", "Natural Language :: Turkish", "Operating System :: OS Independent", @@ -112,4 +111,4 @@ ignore = [ ] # Exclude a variety of commonly ignored directories. exclude = [".git", "docs", "_notebooks"] -ignore-init-module-imports = true \ No newline at end of file +ignore-init-module-imports = true From 3e60444fd65b32a39b858ba592275b0032f069e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7e=20Uludo=C4=9Fan?= Date: Fri, 26 Jan 2024 23:05:39 +0300 Subject: [PATCH 04/11] Create doc.yml --- .github/workflows/doc.yml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..8048d78 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,47 @@ +name: doc + +on: + push: + branches: ["main"] + +# Prevent doc action on `main` to conflict with each others. +concurrency: + group: doc-${{ github.ref }} + cancel-in-progress: true + +jobs: + doc: + runs-on: "ubuntu-latest" + timeout-minutes: 30 + + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout the code + uses: actions/checkout@v3 + + - name: Setup mamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: env.yml + environment-name: my_env + cache-environment: true + cache-downloads: true + + - name: Install library + run: python -m pip install --no-deps . + + - name: Configure git + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + + - name: Deploy the doc + run: | + echo "Get the gh-pages branch" + git fetch origin gh-pages + + echo "Build and deploy the doc on main" + mike deploy --push main From 037f020d1f742ffda5cceb7bdc59975f57730e89 Mon Sep 17 00:00:00 2001 From: Furkan Akkurt <71407287+furkanakkurt1335@users.noreply.github.com> Date: Fri, 26 Jan 2024 23:31:55 +0300 Subject: [PATCH 05/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index afc6a9d..1709626 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ from turkish_lm_tuner import DatasetProcessor, TrainerForConditionalGeneration dataset_name = "tr_news" task = "summarization" task_format="conditional_generation" -model_name = "boun-tabi-lmt/TURNA" +model_name = "boun-tabi-LMG/TURNA" max_input_length = 764 max_target_length = 128 dataset_processor = DatasetProcessor( From 12286fbeeb557444c30a549e7e4efbc26468469a Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 15:47:44 +0300 Subject: [PATCH 06/11] Update doc workflow --- .github/workflows/doc.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 8048d78..5c54916 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -2,9 +2,11 @@ name: doc on: push: - branches: ["main"] + branches: + - main + - patch-workflow -# Prevent doc action on `main` to conflict with each others. +# Prevent doc action on `main` from conflicting with others. concurrency: group: doc-${{ github.ref }} cancel-in-progress: true @@ -20,7 +22,7 @@ jobs: steps: - name: Checkout the code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup mamba uses: mamba-org/setup-micromamba@v1 @@ -40,8 +42,8 @@ jobs: - name: Deploy the doc run: | - echo "Get the gh-pages branch" - git fetch origin gh-pages + echo "Get the latest version of the doc" + git fetch origin patch-workflow:patch-workflow echo "Build and deploy the doc on main" - mike deploy --push main + mike deploy --push patch-workflow From 9bfbb7143353bb9e52986c8bdc8660ba0329d4a0 Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 15:57:59 +0300 Subject: [PATCH 07/11] revert back to gh-pages --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 5c54916..b94d424 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -43,7 +43,7 @@ jobs: - name: Deploy the doc run: | echo "Get the latest version of the doc" - git fetch origin patch-workflow:patch-workflow + git fetch origin gh-pages echo "Build and deploy the doc on main" mike deploy --push patch-workflow From 906c8f93a93cd565cfd8d81933748a949b514acc Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 16:02:20 +0300 Subject: [PATCH 08/11] add token to doc.yml --- .github/workflows/doc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b94d424..5a628c7 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -47,3 +47,5 @@ jobs: echo "Build and deploy the doc on main" mike deploy --push patch-workflow + env: + github_token: ${{ secrets.PAT }} From aba706da1b42c30a78bd76ac8ac1f7e47a5066ea Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 16:37:51 +0300 Subject: [PATCH 09/11] update doc.yml update doc.yml update doc.yml update doc.yml update doc.yml --- .github/workflows/doc.yml | 64 +++++++++++++-------------------------- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 5a628c7..b76d954 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,51 +1,29 @@ -name: doc - +name: Deploy Docs to GitHub Pages on: push: branches: - main - patch-workflow - -# Prevent doc action on `main` from conflicting with others. -concurrency: - group: doc-${{ github.ref }} - cancel-in-progress: true - +permissions: + contents: write jobs: - doc: - runs-on: "ubuntu-latest" - timeout-minutes: 30 - - defaults: - run: - shell: bash -l {0} - + deploy: + runs-on: ubuntu-latest steps: - - name: Checkout the code - uses: actions/checkout@v4 - - - name: Setup mamba - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: env.yml - environment-name: my_env - cache-environment: true - cache-downloads: true - - - name: Install library - run: python -m pip install --no-deps . - - - name: Configure git - run: | - git config --global user.name "${GITHUB_ACTOR}" - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - - name: Deploy the doc + - uses: actions/checkout@v4 + - name: Configure Git Credentials run: | - echo "Get the latest version of the doc" - git fetch origin gh-pages - - echo "Build and deploy the doc on main" - mike deploy --push patch-workflow - env: - github_token: ${{ secrets.PAT }} + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material mkdocs-material-extensions mkdocstrings mkdocstrings-python mkdocs-jupyter markdown-include mike mdx_truly_sane_lists + - run: mkdocs gh-deploy --force \ No newline at end of file From 16180b7ae55c0dfe793210a62255af88e0e1f45c Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 17:10:38 +0300 Subject: [PATCH 10/11] remove patch-workflow branch from branch list in workflow --- .github/workflows/doc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b76d954..0f60a44 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - patch-workflow permissions: contents: write jobs: From a505763f9f527de97fccb21ad005918558e863c9 Mon Sep 17 00:00:00 2001 From: Furkan Akkurt Date: Thu, 1 Feb 2024 17:17:25 +0300 Subject: [PATCH 11/11] update publish.yml update publish.yml --- .github/workflows/publish.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ccb535..0db3f97 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,19 +11,17 @@ name: Upload Python Package on: release: types: [published] - + permissions: contents: read jobs: deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install dependencies @@ -33,6 +31,6 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@release/v1.8 with: password: ${{ secrets.PYPI_API_TOKEN }}