-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🙉Monke Good #13
🙉Monke Good #13
Conversation
awtkns
commented
Nov 17, 2023
•
edited
Loading
edited
- improve test names (shown below)
- make pytest output be verbose by default
- add ability to load runners by path
- improved code loading
Maybe outside scope but should get the id in the name or folder somehow for spot testing single failures |
bananalyzer/__main__.py
Outdated
def find_decorated_scrapers(file_path: Path) -> List[AgentRunnerClass]: | ||
with open(file_path, "r") as source: | ||
node = ast.parse(source.read()) | ||
|
||
runners: List[AgentRunnerClass] = [] | ||
for clazz in [n for n in node.body if isinstance(n, ast.ClassDef)]: | ||
if "AgentRunner" in [getattr(base, "id", "") for base in clazz.bases]: | ||
runners.append( | ||
AgentRunnerClass( | ||
class_name=clazz.name, | ||
class_path=str(file_path), | ||
class_def=clazz, | ||
) | ||
) | ||
|
||
return runners |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the README with this new functionality
What's with the deletion of the test? |
yes,
its a test in the wrong directory, the null agent test file is not needed anymore with the code analyzsis |