Skip to content
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

Benchmark runner test #488

Merged
merged 6 commits into from
Jan 18, 2024
Merged

Benchmark runner test #488

merged 6 commits into from
Jan 18, 2024

Conversation

jakethekoenig
Copy link
Member

@jakethekoenig jakethekoenig commented Jan 16, 2024

While writing this I made the following changes:

  • benchmark_repos was made a subdir of benchmarks so verify functions could import from generated code. Otherwise python complains it isn't part of a module.
  • In fact setup_repo does change the current directory. evalute_py and evaluate_sample now change the directory back.
  • The whole functions have a try now so spurious errors won't crash a run.
  • The append action is removed from the parser.

It's a little less comprehensive than the exercism analogue but I think it'll still be valuable.

Pull Request Checklist

  • Documentation has been updated, or this change doesn't require that

While writing this I made the following changes:
* benchmark_repos was made a subdir of benchmarks so verify functions
  could import from generated code. Otherwise python complains it isn't
  part of a module.
* In fact setup_repo does change the current directory. evalute_py and
  evaluate_sample now change the directory back.
* The whole functions have a try now so spurious errors won't crash a
  run.
@@ -9,31 +9,33 @@ def test_empty_sequence(self):

def test_pow(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't let the actual accumulate get formatted because it could make the saved gpt output invalid but I'm inclined to let our linter change the test.

Copy link
Member

@granawkins granawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It runs fine, I've just opened a big refactor to integrate the sample more so I'm fine merging this as-is.


[tool.ruff]
line-length = 120
ignore = ["E731"]

[tool.pytest.ini_options]
addopts = "--ignore=vscode/bundled --ignore=benchmark_repos --ignore=testbed/exercism-python"
addopts = "--ignore=vscode/bundled --ignore=benchmarks/benchmark_repos --ignore=testbed/exercism-python"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also update pyrightconfig.json, change benchmark_repos to benchmarks.

@jakethekoenig jakethekoenig merged commit b438094 into main Jan 18, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants