diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 097d21e21..ae955a1b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,11 +11,11 @@ on: jobs: Build: - runs-on: '${{ matrix.os }}' + runs-on: "${{ matrix.os }}" strategy: matrix: - os: ['ubuntu-18.04', 'macos-latest'] - python-version: ['3.7', '3.8', '3.9'] + os: ["ubuntu-22.04", "macos-latest"] + python-version: ["3.7", "3.8", "3.9"] steps: - name: Checkout source uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: activate-environment: test - python-version: '${{ matrix.python-version }}' + python-version: "${{ matrix.python-version }}" - name: CI Tests shell: bash -l {0} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index d52079e45..8a1209345 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,41 +1,41 @@ name: Publish Python 🐍 distributions 📦 to PyPI on: - release: + release: types: [created] workflow_dispatch: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - - name: Checkout source - uses: actions/checkout@master - - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install pypa/build - run: >- - python -m - pip install - build - --user - - - name: Build a binary wheel and a source tarball - run: >- - python -m - build - --sdist - --wheel - --outdir dist/ - . + - name: Checkout source + uses: actions/checkout@master - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 66c82782a..c9c2e9ff5 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -6,35 +6,35 @@ on: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - - name: Checkout source - uses: actions/checkout@master - - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install pypa/build - run: >- - python -m - pip install - build - --user - - - name: Build a binary wheel and a source tarball - run: >- - python -m - build - --sdist - --wheel - --outdir dist/ - . + - name: Checkout source + uses: actions/checkout@master - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 5550dcb3b..9e66d0b55 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,6 +13,20 @@ "7001" ] }, + { + "name": "Run Server Locally with a Git repo", + "type": "python", + "request": "launch", + "program": "scripts/knowledge_repo", + "console": "integratedTerminal", + "args": [ + "--repo", + "~/test_repo", + "runserver", + "--port", + "7001" + ] + }, { "name": "Run Server Locally with config", "type": "python", diff --git a/docker/Dockerfile b/docker/Dockerfile index 2d8ea668e..10ea6f908 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 LABEL description="knowledge-repo service"