Commit graph

22 commits

Author SHA1 Message Date
Paul Gauthier
1334392418 lint 2023-09-01 15:53:19 -07:00
Paul Gauthier
fb82a20d60 aider: Add python_requires='>=3.9' to setup.py.
# Aider chat conversation:

USER: Add python_requires='>=3.8'

ASSISTANT: To add the `python_requires='>=3.8'` to the `setup
^C KeyboardInterrupt

USER: Add python_requires='>=3.9'

ASSISTANT: To add the `python_requires='>=3.9'` to the `setup.py` file, we need to modify the `setup()` function call to include this new argument.

Here is the *edit block* for this change:

```python
setup.py
<<<<<<< HEAD
setup(
    name="aider-chat",
    version=__version__,
    packages=find_packages(),
    include_package_data=True,
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "aider = aider.main:main",
        ],
    },
    description="aider is GPT powered coding in your terminal",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/paul-gauthier/aider",
)
=======
setup(
    name="aider-chat",
    version=__version__,
    packages=find_packages(),
    include_package_data=True,
    install_requires=requirements,
    python_requires='>=3.9',
    entry_points={
        "console_scripts": [
            "aider = aider.main:main",
        ],
    },
    description="aider is GPT powered coding in your terminal",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/paul-gauthier/aider",
)
>>>>>>> updated
```
This change ensures that the package will not be installed on Python versions lower than 3.9.
2023-08-17 08:34:21 -07:00
Paul Gauthier
fde537cd7f aider: Fix regular expression in setup.py to remove all links, not just the internal anchor links.
# Aider chat conversation:

USER: the regex in `setup.py` is supposed to remove the list of links that appears right below the image in README. but it doesn't remove the links to aider.chat urls, just the internal anchor links. fix that.

ASSISTANT: To fix the regular expression in `setup.py` to remove all links, not just the internal anchor links, we need to modify the `setup.py` file.

Here's the change:

```python
setup.py
<<<<<<< ORIGINAL
    long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description)
    long_description = re.sub(r"\n- \[.*\]\(#.*\)", "", long_description)
=======
    long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description)
    long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description)
>>>>>>> UPDATED
```

This change will ensure that all links, including those to `aider.chat` URLs, are removed from the `long_description`.
2023-07-11 13:08:10 -07:00
Paul Gauthier
0ca0db3edf fix; bump to 0.6.4 2023-06-17 07:08:45 -07:00
Paul Gauthier
79f6be2163 aider: Added __version__ variable to aider/__init__.py and imported it in setup.py.
# Context:
USER: is it safe/sensible to put __version__ into `aider/__init__.py` and have setup.py import that to learn the version?
ASSISTANT: Yes, it is safe and sensible to put the `__version__` variable in `aider/__init__.py` and have `setup.py` import it to learn the version. This is a common practice in Python projects to maintain a single source of truth for the package version.

Here's how you can modify the `aider/__init__.py` and `setup.py` files:

```python
aider/__init__.py
<<<<<<< ORIGINAL
=======
__version__ = "0.6.2"
>>>>>>> UPDATED
```

```python
setup.py
<<<<<<< ORIGINAL
import re

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
    long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description)
    long_description = re.sub(r"\n- \[.*\]\(#.*\)", "", long_description)

setup(
    name="aider-chat",
    version="0.6.2",
=======
from aider import __version__

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
    long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description)
    long_description = re.sub(r"\n- \[.*\]\(#.*\)", "", long_description)

setup(
    name="aider-chat",
    version=__version__,
>>>>>>> UPDATED
```

This way, you can maintain the version in `aider/__init__.py` and `setup.py` will always use the correct version.
2023-06-17 06:59:58 -07:00
Paul Gauthier
14d42ee79d bump setup.py to 0.6.2 2023-06-17 06:47:24 -07:00
Paul Gauthier
7708b2b271 bump setup.py to 0.6.1 2023-06-17 06:46:13 -07:00
Paul Gauthier
89d9d17b2a bump setup.py to 0.6.0 2023-06-17 06:41:45 -07:00
Paul Gauthier
2a896daa0c Move back to 0.5.0 2023-06-08 16:24:45 -07:00
Paul Gauthier
419fccfa8a wip 2023-06-08 12:44:41 -07:00
Paul Gauthier
59e8f798d1 aider: Updated aiohttp version constraint in requirements.txt.
# Context:
USER: $ pip install -i https://test.pypi.org/simple/ aider-chat
Looking in indexes: https://test.pypi.org/simple/
Collecting aider-chat
  Downloading a61a5f1941/aider_chat-0.5.3-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.0/42.0 kB 614.5 kB/s eta 0:00:00
INFO: pip is looking at multiple versions of aider-chat to determine which version is compatible with other requirements. This could take a while.
  Downloading e8a3663c60/aider_chat-0.5.2-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 1.2 MB/s eta 0:00:00
  Downloading f69bb4653a/aider_chat-0.5.1-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 1.3 MB/s eta 0:00:00
  Downloading 005ae4324a/aider_chat-0.5.0-py3-none-any.whl (38 kB)
ERROR: Cannot install aider-chat==0.5.0, aider-chat==0.5.1, aider-chat==0.5.2 and aider-chat==0.5.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    aider-chat 0.5.3 depends on aiohttp==3.8.4
    aider-chat 0.5.2 depends on aiohttp==3.8.4
    aider-chat 0.5.1 depends on aiohttp==3.8.4
    aider-chat 0.5.0 depends on aiohttp==3.8.4

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

ASSISTANT: It seems there is a dependency conflict when trying to install `aider-chat` from TestPyPI. The conflict is caused by the `aiohttp` package version. To resolve this issue, you can try the following steps:

1. Update the `requirements.txt` file to loosen the version constraint for `aiohttp`. For example, you can change it to `aiohttp>=3.8.4` to allow any version greater than or equal to 3.8.4.
2. Update the `setup.py` file to read the updated `requirements.txt` file.
3. Re-upload the package to TestPyPI with the updated dependencies.

Here's the change you need to make in the `requirements.txt` file:

```plaintext

^C KeyboardInterrupt
USER: why is it trying to install multiple versions of aider-chat?
ASSISTANT: The reason pip is looking at multiple versions of `aider-chat` is that it's trying to find a version that is compatible with the other packages and their dependencies in your environment. This process is part of pip's dependency resolution mechanism.

In this case, it seems that all the versions of `aider-chat` have a conflicting dependency on `aiohttp==3.8.4`. To resolve this issue, you can try loosening the version constraint for `aiohttp` in the `requirements.txt` file, as I mentioned in my previous response. This should help pip find a compatible version of `aider-chat` that works with the other packages in your environment.
USER: I added these *read-write* files: requirements.txt
ASSISTANT: Great! Now, let's update the `requirements.txt` file to loosen the version constraint for `aiohttp`. Change the line with `aiohttp==3.8.4` to `aiohttp>=3.8.4`. Here's the change you need to make:

```plaintext
requirements.txt
<<<<<<< ORIGINAL
aiohttp==3.8.4
=======
aiohttp>=3.8.4
>>>>>>> UPDATED
```

After making this change, you can re-upload the package to TestPyPI with the updated dependencies and try installing it again.
2023-06-07 17:15:13 -07:00
Paul Gauthier
1eb9ab1b70 aider: Added regex to remove lines containing bullets with anchor links from long_description in setup.py.
# Context:
USER: also filter out the bullets which are just #anchor links to elsewhere in the readme
ASSISTANT: To filter out the bullets with anchor links in the `long_description` in `setup.py`, you can use a regular expression to remove the lines containing those links. Here's the change you need to make in `setup.py`:

```python
setup.py
<<<<<<< ORIGINAL
import re

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
    long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description)
=======
import re

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
    long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description)
    long_description = re.sub(r'\n- \[.*\]\(#.*\)', '', long_description)
>>>>>>> UPDATED
```

This change adds another `re.sub()` function to remove lines containing bullets with anchor links from the `long_description`.
2023-06-07 17:11:16 -07:00
Paul Gauthier
f8f2eb0f76 aider: Filtered out image links from long_description in setup.py.
# Context:
USER: pypi descriptions don't support markdown image links. filter out images before passing it
ASSISTANT: To filter out image links from the `long_description` in `setup.py`, you can use a regular expression to remove the lines containing image links. Here's the change you need to make in `setup.py`:

```python
setup.py
<<<<<<< ORIGINAL
with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
=======
import re

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()
    long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description)
>>>>>>> UPDATED
```

This change imports the `re` module and uses the `re.sub()` function to remove lines containing image links from the `long_description`.
2023-06-07 16:59:35 -07:00
Paul Gauthier
ece1cdd557 aider: Updated the setup.py to use the README.md as the long description source.
# Context:
USER: update the `setup.py` to use README.md as the long description source
ASSISTANT: To update the `setup.py` to use the `README.md` as the long description source, follow these steps:

1. Read the contents of the `README.md` file and store it in a variable.
2. Add the `long_description` and `long_description_content_type` arguments to the `setup()` function.

Here's the updated `setup.py`:

```python
setup.py
<<<<<<< ORIGINAL
from setuptools import find_packages, setup

with open("requirements.txt") as f:
    requirements = f.read().splitlines()

setup(
    name="aider-chat",
    version="0.5.0",
    packages=find_packages(),
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "aider = aider.main:main",
        ],
    },
)
=======
from setuptools import find_packages, setup

with open("requirements.txt") as f:
    requirements = f.read().splitlines()

with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()

setup(
    name="aider-chat",
    version="0.5.0",
    packages=find_packages(),
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "aider = aider.main:main",
        ],
    },
    long_description=long_description,
    long_description_content_type="text/markdown",
)
>>>>>>> UPDATED
```
2023-06-07 16:56:24 -07:00
Paul Gauthier
d65e782e80 Changed package name aider -> aider-chat 2023-06-07 16:43:46 -07:00
Paul Gauthier
85a14309ca bump version 2023-06-07 13:53:04 -07:00
Paul Gauthier
92cd2f3ce6 isort 2023-05-28 22:47:38 -07:00
Paul Gauthier
61c0892f58 bumped version 2023-05-25 08:28:57 -07:00
Paul Gauthier
981710ca16 Bumped version to 0.3.0 in setup.py. 2023-05-13 09:44:22 -07:00
Paul Gauthier
5490dc11d0 Updated version number to 0.2.0 in setup.py. 2023-05-11 23:26:22 -07:00
Paul Gauthier
2333e62b6a Add setup.py file that reads requirements.txt for dependencies and sets up CLI script.
# Context:
USER: make a setup.py for this project. it includes a cli script in main(). have setup.py read requirements.txt to get the install_requires
ASSISTANT: To create a `setup.py` file for this project, we'll use the `setuptools` package. We'll also read the `requirements.txt` file to get the `install_requires` dependencies. Here's the change:

```python
setup.py
<<<<<<< ORIGINAL

=======
from setuptools import setup, find_packages

with open("requirements.txt") as f:
    requirements = f.read().splitlines()

setup(
    name="aider",
    version="0.1.0",
    packages=find_packages(),
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "aider = aider.main:main",
        ],
    },
)
>>>>>>> UPDATED
```

This will create a `setup.py` file that reads the `requirements.txt` file for dependencies and sets up the CLI script for the `main()` function in `aider.main`.
2023-05-09 10:57:56 -07:00
Paul Gauthier
e32fb7c033 Initial commit: Added new files to the git repo: setup.py 2023-05-09 10:56:14 -07:00