Skip to content

Commit

Permalink
tester code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Nov 4, 2023
1 parent 84120db commit 3c4e3ac
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pilot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ jobs:
cd DocPilot
# files changed can be accessed through ${HOME}/files.json
git diff HEAD~1 HEAD --output="temp.txt"
grep '^\+' temp.txt > diff.txt
grep '^\+' temp.txt > diff.txt
- name: Install Python Clients
run: |
pip install anthropic
- name: Run Claude Magic
run: |
cd DocPilot
Expand Down
8 changes: 1 addition & 7 deletions claude/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
import os
import fileinput

def _extract_relevant_info(text):
start_index = text.find('"""')
if start_index != -1:
extracted_text = text[start_index:]
return extracted_text
else:
return None

filename = "dummy-files/test.py"

Expand Down Expand Up @@ -51,6 +44,7 @@ def add_docstring(key):
# diff text file all strings, parse the file to only fetch statements with additions
# changed file names
with open("diff.txt", '+rb') as f:
print("Hello world", f)
# intelligent regex
content = f.readlines()
fns_with_docstring = dict()
Expand Down
22 changes: 21 additions & 1 deletion dummy-files/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,24 @@ def atan(
*,
out: Optional[Union[tf.Tensor, tf.Variable]] = None,
) -> Union[tf.Tensor, tf.Variable]:
return tf.math.atan(x)
return tf.math.atan(x)

@with_unsupported_dtypes({"2.13.0 and below": ("complex",)}, backend_version)
def atan2(
x1: Union[tf.Tensor, tf.Variable],
x2: Union[tf.Tensor, tf.Variable],
/,
*,
out: Optional[Union[tf.Tensor, tf.Variable]] = None,
) -> Union[tf.Tensor, tf.Variable]:
x1, x2 = ivy.promote_types_of_inputs(x1, x2)
return tf.math.atan2(x1, x2)


def atanh(
x: Union[tf.Tensor, tf.Variable],
/,
*,
out: Optional[Union[tf.Tensor, tf.Variable]] = None,
) -> Union[tf.Tensor, tf.Variable]:
return tf.math.atanh(x)

0 comments on commit 3c4e3ac

Please sign in to comment.