From 51889a0371ffa474ec9110fe0be422d237a53003 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 28 Apr 2025 14:55:41 -0400 Subject: [PATCH 1/4] break add --- vector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector.py b/vector.py index 99e667d..abaebe8 100644 --- a/vector.py +++ b/vector.py @@ -19,7 +19,7 @@ def __repr__(self): def __add__(self, other): if isinstance(other, Vector): - return Vector(self.x + other.x, self.y + other.y) + return Vector(self.x + other.x, self.y - other.y) else: # it doesn't make sense to add anything but two vectors print(f"we don't know how to add a {type(other)} to a Vector") From 5be9b55d8b3676fa9eb7868aa44424b4b05cf7de Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 28 Apr 2025 14:59:00 -0400 Subject: [PATCH 2/4] add requirements --- requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 From 61321fb9f518724584fcc221cd7f539a8914f26e Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 28 Apr 2025 15:00:31 -0400 Subject: [PATCH 3/4] add requirements --- .github/workflows/pytest-all.yml | 5 +++++ requirements.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/pytest-all.yml b/.github/workflows/pytest-all.yml index a36b319..f00e310 100644 --- a/.github/workflows/pytest-all.yml +++ b/.github/workflows/pytest-all.yml @@ -28,6 +28,11 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run tests with pytest run: pytest -v -s diff --git a/requirements.txt b/requirements.txt index e69de29..e079f8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +pytest From 2b50b7b38e70e0d259e1c9ddf95c3ef14ae678e3 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 28 Apr 2025 17:21:02 -0400 Subject: [PATCH 4/4] fix --- vector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector.py b/vector.py index abaebe8..99e667d 100644 --- a/vector.py +++ b/vector.py @@ -19,7 +19,7 @@ def __repr__(self): def __add__(self, other): if isinstance(other, Vector): - return Vector(self.x + other.x, self.y - other.y) + return Vector(self.x + other.x, self.y + other.y) else: # it doesn't make sense to add anything but two vectors print(f"we don't know how to add a {type(other)} to a Vector")