From d375d040a726d50237708cd05ddffef37838c3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Morales?= Date: Wed, 24 Apr 2024 18:07:43 -0600 Subject: [PATCH] remove other checks --- .github/workflows/build-docs.yaml | 78 ------------------- .github/workflows/ci.yaml | 95 ----------------------- .github/workflows/deploy-readme.yaml | 57 -------------- .github/workflows/lint.yaml | 25 ------ .github/workflows/models-performance.yaml | 65 ---------------- .github/workflows/no-response.yaml | 21 ----- .github/workflows/python-publish.yml | 39 ---------- .github/workflows/test-publish.yml | 42 ---------- 8 files changed, 422 deletions(-) delete mode 100644 .github/workflows/build-docs.yaml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/deploy-readme.yaml delete mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/models-performance.yaml delete mode 100644 .github/workflows/no-response.yaml delete mode 100644 .github/workflows/python-publish.yml delete mode 100644 .github/workflows/test-publish.yml diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml deleted file mode 100644 index f5eef477..00000000 --- a/.github/workflows/build-docs.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: "build-docs" -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - workflow_dispatch: - -defaults: - run: - shell: bash - -jobs: - build-docs: - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v3 - - name: Clone docs repo - uses: actions/checkout@v3 - with: - repository: Nixtla/docs - ref: scripts - path: docs-scripts - - uses: actions/setup-python@v4 - with: - cache: "pip" - python-version: '3.10' - cache-dependency-path: settings.ini - - name: Build docs - run: | - set -ux - python -m pip install --upgrade pip - pip install -Uq nbdev nbdev_plotly - pip install -e ".[dev]" - mkdir nbs/_extensions - cp -r docs-scripts/mintlify/ nbs/_extensions/ - python docs-scripts/update-quarto.py - echo "procs = nbdev_plotly.plotly:PlotlyProc" >> settings.ini - nbdev_docs - - name: Apply final formats - run: bash ./docs-scripts/docs-final-formatting.bash - - name: Copy over necessary assets - run: | - cp nbs/mint.json _docs/mint.json - cp docs-scripts/imgs/* _docs/ - - name: Deploy to Mintlify Docs - if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: docs - publish_dir: ./_docs - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com - - name: Trigger mintlify workflow - if: github.event_name == 'push' - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: 'nixtla', - repo: 'docs', - workflow_id: 'mintlify-action.yml', - ref: 'main', - }); - - name: Configure redirects for gh-pages - run: python docs-scripts/configure-redirects.py nixtla - - name: Deploy to Github Pages - if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: ./gh-pages - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 2a446877..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -defaults: - run: - shell: bash -l {0} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - nb-sync: - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up python - uses: actions/setup-python@v2 - - - name: Install nbdev - run: pip install nbdev - - - name: Check if all notebooks are cleaned - run: | - echo "Check we are starting with clean git checkout" - if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi - echo "Trying to strip out notebooks" - nbdev_clean - echo "Check that strip out was unnecessary" - git status -s # display the status to see which nbs need cleaning up - if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi - - check-import: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: [3.9, '3.10'] - steps: - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install nixtla - run: pip install ./ - - - name: Check import - run: | - python -c "from nixtla import TimeGPT;" - python -c "from nixtla import NixtlaClient;" - - run-tests: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.9, '3.10'] - env: - NIXTLA_API_KEY: ${{ secrets.NIXTLA_API_KEY }} - NIXTLA_BASE_URL: ${{ secrets.NIXTLA_BASE_URL }} - NIXTLA_API_KEY_CUSTOM: ${{ secrets.NIXTLA_API_KEY_CUSTOM }} - NIXTLA_BASE_URL_CUSTOM: ${{ secrets.NIXTLA_BASE_URL_CUSTOM }} - API_KEY_FRED: ${{ secrets.API_KEY_FRED }} - steps: - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up environment - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: environment.yml - create-args: python=${{ matrix.python-version }} - cache-environment: true - - - name: Install pip requirements - run: pip install -e ".[dev]" - - - name: Run tests - run: nbdev_test --skip_file_glob "*distributed*" - - - name: Run tests with distributed (ubuntu) - if: matrix.os == 'ubuntu-latest' - run: nbdev_test --file_glob "*distributed*" diff --git a/.github/workflows/deploy-readme.yaml b/.github/workflows/deploy-readme.yaml deleted file mode 100644 index 4697343d..00000000 --- a/.github/workflows/deploy-readme.yaml +++ /dev/null @@ -1,57 +0,0 @@ -name: Deploy to readme dot com - -on: - push: - branches: [main] - workflow_dispatch: - -defaults: - run: - shell: bash -l {0} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - deploy-readme: - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: Set up environment - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: environment.yml - create-args: python=3.9 - cache-environment: true - - - name: Install pip requirements - run: pip install ./ - - - name: Install Quarto - run: nbdev_install_quarto - - - name: Create readme docs - env: - README_HOST_URL: ${{ secrets.README_HOST_URL }} - README_CATEGORY: ${{ secrets.README_CATEGORY }} - run: ./action_files/readme_com/create_readme_docs.sh - - - name: Push PNGs to readme_docs branch - run: | - git config --global user.name 'FedericoGarza' - git config --global user.email 'fede.garza.ramirez@gmail.com' - git push https://${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }} --delete readme_docs || true - git checkout -b readme_docs - git add -f "*.png" - git commit -m "[cd] update png images" || echo "No changes to commit" - git push https://${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }} HEAD:readme_docs - - - name: Deploy to readme com - uses: readmeio/rdme@v8 - with: - rdme: docs ./nbs/_docs/docs/ --key=${{ secrets.README_API_KEY }} --version=0.0.2 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 945a3831..00000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Lint - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: pip install black nbdev pre-commit - - - name: Run pre-commit - run: pre-commit run diff --git a/.github/workflows/models-performance.yaml b/.github/workflows/models-performance.yaml deleted file mode 100644 index cb006cb9..00000000 --- a/.github/workflows/models-performance.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Models Performance - -permissions: write-all - -on: - pull_request: - types: [opened, synchronize, reopened] - -defaults: - run: - shell: bash -l {0} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - run-models-performance: - runs-on: ubuntu-latest - strategy: - fail-fast: false - env: - NIXTLA_API_KEY: ${{ secrets.NIXTLA_API_KEY }} - PLOTS_REPO_URL: https://github.com/Nixtla/nixtla/blob/docs-figs-model-performance - steps: - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up environment - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: environment.yml - create-args: python=3.9 - cache-environment: true - - - name: Install pip requirements - run: pip install '.[plotting]' - - - name: Run evaluation - run: python -m action_files.models_performance.main - - - name: Upload images to new branch main - run: | - git config --global user.email azul@nixtla.io - git config --global user.name AzulGarza - git push https://$GITHUB_TOKEN@github.com/nixtla/nixtla.git --delete docs-figs-model-performance || true - git checkout -b docs-figs-model-performance - git add -f "*.png" - git commit -m "[cd] update png images" || echo "No changes to commit" - git push https://$GITHUB_TOKEN@github.com/nixtla/nixtla.git HEAD:docs-figs-model-performance - - - name: Upload results to the PR - uses: actions/github-script@v6 - with: - script: | - const fs = require('fs'); - const markdown = fs.readFileSync('./action_files/models_performance/summary.md', 'utf8'); - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: markdown - }); - github-token: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/no-response.yaml b/.github/workflows/no-response.yaml deleted file mode 100644 index a2b26e12..00000000 --- a/.github/workflows/no-response.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: No Response Bot - -on: - issue_comment: - types: [created] - schedule: - - cron: '0 4 * * *' - -jobs: - noResponse: - runs-on: ubuntu-latest - steps: - - uses: lee-dohm/no-response@v0.5.0 - with: - closeComment: > - This issue has been automatically closed because it has been awaiting a response for too long. - When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. - If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. - daysUntilClose: 30 - responseRequiredLabel: awaiting response - token: ${{ github.token }} diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index acffb0c0..00000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Upload Python Packages - -on: - push: - tags: ['v*'] - -jobs: - deploy: - runs-on: ubuntu-latest - permissions: - id-token: write - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: python -m pip install --upgrade pip && pip install build - - - name: Build nixtla package - run: python -m build - - - name: Publish nixtla package - uses: pypa/gh-action-pypi-publish@release/v1 - - - name: Build nixtlats package - run: > - rm -rf build dist && - mv nixtla nixtlats && - sed -i 's/name="nixtla"/name="nixtlats"/g' setup.py && - find nixtlats -type f -name '*.py' -exec sed -i 's/from nixtla/from nixtlats/g' {} + && - echo -e 'import warnings\nwarnings.warn("This package is deprecated, please install nixtla instead.", category=FutureWarning)' >> nixtlats/__init__.py && - python -m build - - - name: Publish nixtlats package - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test-publish.yml b/.github/workflows/test-publish.yml deleted file mode 100644 index af6cb77b..00000000 --- a/.github/workflows/test-publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Upload Python Packages to TestPyPI - -on: - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - permissions: - id-token: write - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: python -m pip install --upgrade pip && pip install build - - - name: Build nixtla package - run: python -m build - - - name: Publish nixtla package - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - - - name: Build nixtlats package - run: > - rm -rf build dist && - mv nixtla nixtlats && - sed -i 's/name="nixtla"/name="nixtlats"/g' setup.py && - find nixtlats -type f -name '*.py' -exec sed -i 's/from nixtla/from nixtlats/g' {} + && - echo -e 'import warnings\nwarnings.warn("This package is deprecated, please install nixtla instead.", category=FutureWarning)' >> nixtlats/__init__.py && - python -m build - - - name: Publish nixtlats package - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/