Commit graph

103 commits

Author SHA1 Message Date
Paul Gauthier
ed2829fa03 updated issue template 2024-01-10 07:57:53 -08:00
paul-gauthier
552390f298
Update issue templates 2024-01-10 07:55:33 -08:00
Paul Gauthier
5c9bd4d405 Bump all dependencies, to pick up py-tree-sitter-languages 1.9.1 with py12 support 2024-01-04 07:48:00 -08:00
Paul Gauthier
531ea58eb6 use env to test secrets 2023-12-31 10:12:05 -08:00
Paul Gauthier
9d4fcff921 Updated docker-build-test workflow to always check for DockerHub credentials before building. 2023-12-31 10:08:35 -08:00
Paul Gauthier
1b43dddec5 aider: This change corrected the conditional expression for the Docker login step by removing the incorrect ${{ }} around secrets.DOCKERHUB_USERNAME and secrets.DOCKERHUB_PASSWORD and adding a check for the github.event_name to ensure that the login step is only executed when it's not a pull request or when the secrets are available.
# Aider chat conversation:

USER: The workflow is not valid. .github/workflows/docker-build-test.yml (Line: 30, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DOCKERHUB_USERNAME

ASSISTANT: ```diff
--- .github/workflows/docker-build-test.yml
+++ .github/workflows/docker-build-test.yml
@@ ... @@
       uses: docker/login-action@v3
       with:
         username: ${{ secrets.DOCKERHUB_USERNAME }}
         password: ${{ secrets.DOCKERHUB_PASSWORD }}
-      if: ${{ secrets.DOCKERHUB_USERNAME }} && ${{ secrets.DOCKERHUB_PASSWORD }}
+      if: ${{ github.event_name != 'pull_request' || (secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD) }}
```

This change corrects the conditional expression for the Docker login step by removing the incorrect `${{ }}` around `secrets.DOCKERHUB_USERNAME` and `secrets.DOCKERHUB_PASSWORD` and adding a check for the `github.event_name` to ensure that the login step is only executed when it's not a pull request or when the secrets are available.
2023-12-31 10:06:59 -08:00
Joshua Vial
62da17e333 aider: Adjust DockerHub login action to complete without failing if credentials are not present.
# Aider chat conversation:

USER: please adjust this github action file so it will complete without failing if the dockerhub_username or password are not there

ASSISTANT: ```diff
--- .github/workflows/docker-build-test.yml
+++ .github/workflows/docker-build-test.yml
@@ ... @@
     - name: Login to DockerHub
       uses: docker/login-action@v3
       with:
         username: ${{ secrets.DOCKERHUB_USERNAME }}
         password: ${{ secrets.DOCKERHUB_PASSWORD }}
+      if: ${{ secrets.DOCKERHUB_USERNAME }} && ${{ secrets.DOCKERHUB_PASSWORD }}
```
2023-12-28 11:07:35 +13:00
Paul Gauthier
c9aa36d7b6 Put build-essential back into dockerfile 2023-10-31 14:52:04 -07:00
Paul Gauthier
702fc0c6ea restore release.yml, do multi arch build in docker-build-test.yml 2023-10-31 14:48:37 -07:00
Paul Gauthier
982c58a94d just arm64 2023-10-31 14:40:07 -07:00
Paul Gauthier
ce1977b75c temp disable push 2023-10-31 14:34:11 -07:00
Paul Gauthier
59d65a0b1b temp disable arm64 2023-10-31 14:33:43 -07:00
Paul Gauthier
dcaa94551e temp disable twine, arm64 2023-10-31 14:29:33 -07:00
Paul Gauthier
3eaa9671be Just test building the docker image 2023-10-30 09:15:16 -07:00
Paul Gauthier
0beba57a98 aider: Added a new workflow that builds the Docker image and runs tests inside it.
# Aider chat conversation:

USER: add a new workflow that will build the docker image and make sure the tests succeed inside it

ASSISTANT: To add a new workflow that builds the Docker image and runs tests inside it, we need to create a new GitHub Actions workflow file. Let's call it `docker-build-and-test.yml` and place it in the `.github/workflows/` directory.

Here is the *SEARCH/REPLACE block* for the new file:

```yaml
.github/workflows/docker-build-and-test.yml
<<<<<<< SEARCH

=======
name: Docker Build and Test

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Check out repository
      uses: actions/checkout@v3

    - name: Build Docker image
      run: |
        docker build -t myapp:latest .

    - name: Run tests in Docker container
      run: |
        docker run myapp:latest python -m unittest discover -s tests
>>>>>>> REPLACE
```

This workflow will trigger on every push and pull request to the `main` branch. It will build a Docker image from the Dockerfile in the root directory of the repository and then run the tests inside a container from that image.
2023-10-30 09:08:40 -07:00
Paul Gauthier
25c06940d6 re-enable twine/pypi 2023-10-19 07:09:09 -07:00
Paul Gauthier
02386c16aa setup multi-arch docker images 2023-10-19 07:00:23 -07:00
Paul Gauthier
fc92862017 enable pypi again 2023-10-18 09:15:40 -07:00
Paul Gauthier
44afdeff25 aider: Updated build and push action to include the ":latest" tag when pushing the Docker image.
# Aider chat conversation:

USER: i also want to update :latest when i push

ASSISTANT: To update the `:latest` tag each time you push, you can add it to the `tags` parameter of the `docker/build-push-action` action in your workflow file. This will build and push the Docker image with both the branch or tag name and `latest` as tags.

Here's how you can update your workflow file:

```yaml
.github/workflows/release.yml
<<<<<<< HEAD
    - name: Build and push Docker image
      uses: docker/build-push-action@v5
      with:
        context: .
        file: ./docker/Dockerfile
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
=======
    - name: Build and push Docker image
      uses: docker/build-push-action@v5
      with:
        context: .
        file: ./docker/Dockerfile
        push: true
        tags: |
          ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
          ${{ secrets.DOCKERHUB_USERNAME }}/aider:latest
>>>>>>> updated
```

This will ensure that the `:latest` tag always points to the most recently pushed image.
2023-10-18 09:05:53 -07:00
Paul Gauthier
87296ddcee aider: Updated Docker tag to use github.ref_name instead of github.ref.
# Aider chat conversation:

USER: how can i test this release action?

ASSISTANT: Testing a GitHub Actions workflow can be done in a few ways:

1. **Push to a branch:** You can push your changes to a branch and see if the workflow runs as expected. This is the most straightforward way to test a workflow, but it may not be suitable if the workflow is supposed to run on specific events like a release or a tag.

2. **Use Pull Requests:** If your workflow should run on pull requests, you can open a pull request to trigger the workflow.

3. **Use Actions tab on GitHub:** You can manually trigger a workflow run from the Actions tab in your GitHub repository. Click on the workflow you want to run, then click `Run workflow` and select the branch you want to run the workflow on.

4. **Use a workflow_dispatch event:** You can add a `workflow_dispatch` event to your workflow file to manually trigger the workflow from GitHub's UI. Here's an example of how to add it:

```yaml
on:
  workflow_dispatch:
  push:
    tags:
      - 'v*'
```

After adding this to your workflow file and pushing it to your repository, you can manually trigger the workflow from the Actions tab in your GitHub repository.

5. **Use a specific branch for testing:** If your workflow runs on a push to a specific branch, you can create a separate branch for testing. You can push your changes to this branch to test the workflow.

6. **Use act:** [act](https://github.com/nektos/act) is a tool that lets you run your GitHub Actions workflows locally. This can be useful for testing your workflows before pushing them to your repository.

Remember to remove or comment out any actions that could have side effects (like publishing a package or pushing a Docker image) when you're testing your workflows.

USER: what will github.ref be if i manually trigger?

ASSISTANT: When you manually trigger a workflow using the `workflow_dispatch` event, the `github.ref` will be set to the branch or tag you selected when you triggered the workflow.

If you didn't select a branch or tag (which is possible if your workflow file doesn't specify any `inputs` for the `workflow_dispatch` event), `github.ref` will be set to the default branch of your repository (usually `main` or `master`).

Here's an example of how you can specify an input for the `workflow_dispatch` event:

```yaml
on:
  workflow_dispatch:
    inputs:
      branch:
        description: 'Branch or tag to run the workflow on'
        required: true
        default: 'main'
```

In this example, when you manually trigger the workflow, you'll be prompted to enter a branch or tag. The value you enter will be available in the `github.event.inputs.branch` context, and `github.ref` will be set to the same value.

USER: buildx failed with: ERROR: invalid tag "***/aider:refs/tags/v0.14.2-dev1": invalid reference format

ASSISTANT: The error message indicates that the Docker tag is not valid. Docker tags cannot contain slashes (`/`), and `github.ref` includes the full Git reference, which will be something like `refs/tags/v0.14.2-dev1` for a tag.

To fix this, you can use the `github.ref_name` context instead of `github.ref`. The `github.ref_name` context contains just the name of the branch or tag without the `refs/heads/` or `refs/tags/` prefix.

Here's how you can update your workflow file:

```yaml
.github/workflows/release.yml
<<<<<<< HEAD
    - name: Build and push Docker image
      uses: docker/build-push-action@v5
      with:
        context: .
        file: ./docker/Dockerfile
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref }}
=======
    - name: Build and push Docker image
      uses: docker/build-push-action@v5
      with:
        context: .
        file: ./docker/Dockerfile
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
>>>>>>> updated
```

This will tag the Docker image with just the name of the branch or tag that triggered the workflow run, which should be a valid Docker tag.
2023-10-18 09:01:37 -07:00
Paul Gauthier
8cb9d1d64d update actions 2023-10-18 08:54:26 -07:00
Paul Gauthier
ec13c87e8d disable pypi for now 2023-10-18 08:48:24 -07:00
Paul Gauthier
b69edcfcba prep docker build to run in github action 2023-10-18 08:45:02 -07:00
Paul Gauthier
5769821a35 aider: Updated Dockerfile path to ./docker/Dockerfile in the docker/build-push-action action.
# Aider chat conversation:

USER: what is github.ref?

ASSISTANT: In GitHub Actions, `github.ref` is a context variable that refers to the branch or tag name that triggered the workflow run.

For example, if you push a commit to the `main` branch, `github.ref` will be `refs/heads/main`. If you create a tag named `v1.0.0`, `github.ref` will be `refs/tags/v1.0.0`.

In your workflow file, you're using `github.ref` to tag the Docker image. This means that the Docker image will be tagged with the name of the branch or tag that triggered the workflow run.

However, since you're triggering the workflow on tag creation (`on: push: tags: - 'v*'`), `github.ref` will always be the name of the tag. If you create a tag named `v1.0.0`, the Docker image will be tagged as `v1.0.0`.

USER: the Dockerfile is in the docker/ subdir.

ASSISTANT: If your Dockerfile is in the `docker/` subdirectory, you need to specify this in the `context` and `file` parameters of the `docker/build-push-action` action in your GitHub Actions workflow file.

The `context` parameter is the path to the directory that contains the Dockerfile. The `file` parameter is the path to the Dockerfile.

Here are the changes you need to make to the `.github/workflows/release.yml` file:

```yaml
.github/workflows/release.yml
<<<<<<< HEAD
    - name: Build and push Docker image
      uses: docker/build-push-action@v2
      with:
        context: .
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref }}
=======
    - name: Build and push Docker image
      uses: docker/build-push-action@v2
      with:
        context: .
        file: ./docker/Dockerfile
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref }}
>>>>>>> updated
```

This will tell the `docker/build-push-action` action to look for the Dockerfile in the `docker/` subdirectory.
2023-10-18 08:38:30 -07:00
Paul Gauthier
9bcef8b853 aider: Added Docker login and build/push steps to the GitHub Actions workflow for building and pushing a Docker image to DockerHub on each release.
# Aider chat conversation:

USER: what's the best way to docker build and push a new version to dockerhub on each release?

ASSISTANT: To build and push a new Docker image to DockerHub on each release, you can use GitHub Actions. You will need to modify the existing GitHub Actions workflow file `.github/workflows/release.yml` to include steps for building and pushing the Docker image.

Here are the steps you need to follow:

1. Add Docker login step: You need to log in to DockerHub before you can push images. You can use the `docker/login-action` action for this. You will need to store your DockerHub username and password as secrets in your GitHub repository.

2. Build the Docker image: You can use the `docker/build-push-action` action to build your Docker image. You should use the new version as the tag for the Docker image.

3. Push the Docker image: The `docker/build-push-action` action can also push the Docker image to DockerHub.

Here are the changes you need to make to the `.github/workflows/release.yml` file:

```yaml
.github/workflows/release.yml
<<<<<<< HEAD
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  build_and_publish:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine

    - name: Build and publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*
=======
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  build_and_publish:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine

    - name: Build and publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

    - name: Login to DockerHub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_PASSWORD }}

    - name: Build and push Docker image
      uses: docker/build-push-action@v2
      with:
        context: .
        push: true
        tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref }}
>>>>>>> updated
```

Please replace `DOCKERHUB_USERNAME` and `DOCKERHUB_PASSWORD` with your DockerHub username and password. You should store these as secrets in your GitHub repository.

Please note that this will build and push a new Docker image for every release. If you want to build and push a Docker image only for specific releases, you will need to modify the `on` section of the workflow file.
2023-10-18 08:36:16 -07:00
Paul Gauthier
43047c3835 Updated python versions for Ubuntu and Windows tests. 2023-08-17 08:34:57 -07:00
Paul Gauthier
b3d624b7cd Run windows tests on push 2023-07-05 15:26:06 -07:00
Paul Gauthier
de40f77a4f turn all windows tests back on 2023-07-05 15:20:37 -07:00
Paul Gauthier
f3af05f3ee simpler, faster run just failing test 2023-07-05 14:57:35 -07:00
Paul Gauthier
0ff4e5362b just 3.11 for windows for now 2023-07-05 14:39:21 -07:00
Paul Gauthier
bfd363ffde rename 2023-07-05 14:31:15 -07:00
Paul Gauthier
eada60d169 renamed github actions 2023-07-05 14:30:58 -07:00
Paul Gauthier
bc6e958d7e aider: Remove push and pull_request triggers, add workflow_dispatch trigger to make the GitHub action only run when manually initiated.
# Context:
USER: can you stop this action from running on pushes/merges and make it so that it only runs when manually initiated?
ASSISTANT: Sure, to make the GitHub action only run when manually initiated, we need to modify the `.github/workflows/windows-tests.yml` file. We will remove the `push` and `pull_request` triggers and add a `workflow_dispatch` trigger.

Here is the change:

```yaml
.github/workflows/windows-tests.yml
<<<<<<< ORIGINAL
name: Windows Tests

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
=======
name: Windows Tests

on:
  workflow_dispatch:
>>>>>>> UPDATED
```

This change will make the workflow only run when manually triggered from the GitHub Actions UI.
2023-07-04 14:49:16 -07:00
Paul Gauthier
37e8c49f7a aider: Added step to install universal ctags using Chocolatey before installing Python dependencies.
# Context:
USER: we do need to install universal ctags on windows too
ASSISTANT: To install universal ctags on Windows, we need to modify the `windows-tests.yml` file. However, universal ctags is not available in the standard repositories used by GitHub Actions' Windows environment. We can use Chocolatey, a package manager for Windows, to install universal ctags.

Here are the changes:

```yaml
.github/workflows/windows-tests.yml
<<<<<<< ORIGINAL
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
=======
    - name: Install universal ctags
      run: |
        choco install universal-ctags

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
>>>>>>> UPDATED
```

This adds a new step to the workflow to install universal ctags using Chocolatey before installing the Python dependencies.
2023-07-04 14:43:34 -07:00
Paul Gauthier
2cdeae8fdd aider: Create a Windows workflow for running tests based on the existing Python workflow.
# Context:
USER: make a windows workflow to run the tests, based on the existing python workflow
ASSISTANT: To create a Windows workflow for running tests, we can use the existing Python workflow as a base. We will need to modify the `runs-on` field to specify a Windows environment, and adjust the commands for installing dependencies and running tests to be compatible with Windows.

Here are the changes:

```yaml
.github/workflows/windows-tests.yml
<<<<<<< ORIGINAL

=======
name: Windows Tests

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: windows-latest
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]

    steps:
    - name: Check out repository
      uses: actions/checkout@v3

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt

    - name: Run tests
      run: |
        python -m unittest discover -s tests
>>>>>>> UPDATED
```

This creates a new file `.github/workflows/windows-tests.yml` with the necessary configuration for running tests on a Windows environment. The Python version matrix, checkout, setup, and test steps are the same as in the original Python workflow. The command to install dependencies has been simplified, as the `universal-ctags` package is not required or available on Windows.
2023-07-04 14:42:53 -07:00
Paul Gauthier
8596a5725f Added new files to the git repo: .github/workflows/windows-tests.yml 2023-07-04 14:42:11 -07:00
Paul Gauthier
9c45e01354 restore ubuntu 2023-07-04 14:41:40 -07:00
Paul Gauthier
6d70e3aa57 Just windows 2023-07-04 14:40:09 -07:00
Paul Gauthier
4d41964531 aider: Added Windows image for running tests and modified the 'Install universal ctags' step to work on both Ubuntu and Windows.
# Context:
USER: can we add a github action to also run tests on a windows image?
ASSISTANT: Sure, to add a GitHub action to run tests on a Windows image, we need to modify the GitHub actions workflow file. This file is usually located in the `.github/workflows` directory and has a `.yml` or `.yaml` extension.

Could you please provide the *read-write* access to the GitHub actions workflow file?
USER: I added these *read-write* files: .github/workflows/python-tests.yml
ASSISTANT: Great! We will modify the `.github/workflows/python-tests.yml` file to add a Windows image for running tests.

Here are the steps:

1. Add 'windows-latest' to the `runs-on` field under the `strategy` section. This will ensure that the tests are run on both Ubuntu and Windows environments.

Here is the *edit block* for the change:

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]
=======
jobs:
  build:
    runs-on: [ubuntu-latest, windows-latest]
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]
>>>>>>> UPDATED
```

2. Modify the 'Install universal ctags' step to work on both Ubuntu and Windows. For Windows, we will use Chocolatey to install universal ctags.

Here is the *edit block* for the change:

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
    - name: Install universal ctags
      run: |
        sudo apt-get update
        sudo apt-get install -y universal-ctags
=======
    - name: Install universal ctags
      run: |
        if [[ "${{ runner.os }}" == "Windows" ]]; then
          choco install universal-ctags
        else
          sudo apt-get update
          sudo apt-get install -y universal-ctags
        fi
>>>>>>> UPDATED
```

Please review these changes and let me know if they are acceptable.
2023-07-04 14:18:38 -07:00
Paul Gauthier
108328b4be CI should only check tests 2023-06-30 14:02:37 -07:00
Paul Gauthier
143d20b1e6 Upgrade to new actions versions 2023-06-17 07:12:05 -07:00
Paul Gauthier
fc30663ce4 aider: work in progress
# Context:
USER: can i use github actions to make it easy to release a new version on github and pypi
ASSISTANT: Yes, you can use GitHub Actions to automate the release process for both GitHub and PyPI. To do this, you'll need to create a new GitHub Actions workflow file and configure it with the necessary steps.

Please follow these steps:

1. Create a new file named `release.yml` in the `.github/workflows/` directory of your repository. If the directory doesn't exist, create it.

```yaml
.github/workflows/release.yml
<<<<<<< ORIGINAL
=======
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  build_and_publish:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine

    - name: Build and publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*
>>>>>>> UPDATED
```

2. Replace `PYPI_API_TOKEN` in the `TWINE_PASSWORD` line with your actual PyPI API token. You can create an API token by following the instructions in the [PyPI documentation](https://pypi.org/manage/account/token/).

3. Commit and push the changes to your repository.

Now, whenever you push a new tag starting with 'v' (e.g., `v1.0.0`), the GitHub Actions workflow will automatically build and publish your package to PyPI.

Please note that you'll need to have a `setup.py` file in your repository for this workflow to work correctly. If you don't have one, please let me know, and I can help you create one.
2023-06-17 06:44:02 -07:00
Paul Gauthier
82cc64eb6f upgrade actions versions 2023-05-29 06:46:22 -07:00
Paul Gauthier
caa61089d8 add py3.8, 3.9 to actions 2023-05-29 06:43:16 -07:00
paul-gauthier
9abaddb754
Update python-tests.yml 2023-05-29 05:57:27 -07:00
Paul Gauthier
387477d5c2 try running all tests w/ctags 2023-05-27 14:16:58 -07:00
Paul Gauthier
a84f93b9e4 aider: Added step to install "universal ctags" before installing Python dependencies.
# Context:
USER: i need to install the "universal ctags" binary in ubuntu before i run tests
ASSISTANT: To install the "universal ctags" binary in Ubuntu before running tests, you can add a new step in the `.github/workflows/python-tests.yml` file.

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
=======
    - name: Install universal ctags
      run: |
        sudo apt-get update
        sudo apt-get install -y universal-ctags

    - name: Install dependencies
      run: |
        python
^C KeyboardInterrupt
USER: sorry, do that again
ASSISTANT: Sure, here's the updated step to install "universal ctags" in the `.github/workflows/python-tests.yml` file.

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
=======
    - name: Install universal ctags
      run: |
        sudo apt-get update
        sudo apt-get install -y universal-ctags

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
>>>>>>> UPDATED
```

This change adds a new step to install "universal ctags" before installing the Python dependencies.
2023-05-27 14:16:41 -07:00
Paul Gauthier
9d1b4a9f5d aider: Changed approach to exclude specific test case using unittest module.
# Context:
USER: the  -k 'not test_get_tags_map_with_identifiers' seems to have made it skip all the tests
ASSISTANT: It seems that the `-k` flag with the `not` expression is not working as expected. Let's change the approach and use the `unittest` module to exclude the specific test case. We'll modify the `python-tests.yml` file to achieve this.

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
    - name: Run tests excluding test_get_tags_map_with_identifiers
      run: |
        python -m unittest discover -k 'not test_get_tags_map_with_identifiers'
=======
    - name: Run tests excluding test_get_tags_map_with_identifiers
      run: |
        python -c "import unittest; loader = unittest.TestLoader(); suite = loader.discover('.'); suite_filtered = unittest.TestSuite([t for t in suite if 'test_get_tags_map_with_identifiers' not in str(t)]); unittest.TextTestRunner().run(suite_filtered)"
>>>>>>> UPDATED
```

This change will discover all tests, filter out the `test_get_tags_map_with_identifiers` test case, and then run the remaining tests.
2023-05-27 14:08:32 -07:00
Paul Gauthier
81f54a0322 aider: Excluded test_get_tags_map_with_identifiers from running in GitHub Actions.
# Context:
USER: how can i exclude running test_get_tags_map_with_identifiers from tests/test_repomap.py when tests run in github actions?
ASSISTANT: To exclude the `test_get_tags_map_with_identifiers` test from running in GitHub Actions, you can modify the `python-tests.yml` file to include a command-line option for the `unittest discover` command. You can use the `-k` option to specify a pattern that matches all test methods except `test_get_tags_map_with_identifiers`.

Here's the change you need to make in the `.github/workflows/python-tests.yml` file:

```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
    - name: Run tests
      run: |
        python -m unittest discover
=======
    - name: Run tests excluding test_get_tags_map_with_identifiers
      run: |
        python -m unittest discover -k 'not test_get_tags_map_with_identifiers'
>>>>>>> UPDATED
```

This change will exclude the `test_get_tags_map_with_identifiers` test method from running when the GitHub Actions workflow is executed.
2023-05-27 14:03:10 -07:00
Paul Gauthier
775f6fc192 updated python version list 2023-05-27 13:55:37 -07:00