-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add coverage to workflow #51 #52
Conversation
Add coverage report using https://github.com/marketplace/actions/code-coverage-summary
With this action it is currently not possible to include the badge in the readme. @siliconlad do we want the coverage to fail under a certain threshold? |
Is it silly to get the bot to overwrite the badge in the README every time (or on merge)? |
Is there a reason not to set it at 100%? |
I don't see any. I will have it fail then |
I don't think it is worth the effort, but if we really want the badge we can do it |
1 similar comment
Let's leave it then 👍 |
Do we need the bot vs just a job that fails? I wonder how annoying the bot will become. |
Let's get rid of the bot 🤖🔫 |
The non-tested code we have is the following. In class ParameterSchema:
@staticmethod
def matches(parameter: Parameter) -> bool:
raise NotImplementedError() # <---- this line
def _get_type(self) -> Union[str, Parameter.empty]:
return Parameter.empty # <---- this line Maybe it can be solved with abstract classes. # ---- this method ----
def SaveGPTEnabled(module: ModuleType, path: str, schema_type: SchemaType = SchemaType.API):
schemas = FindGPTEnabledSchemas(module, schema_type)
json.dump(schemas, open(path, "w"))
# ...
class _GPTEnabled:
# ...
# ---- this method ----
def gpt_enabled(self) -> bool:
return True
# ...
class FunctionSchema:
# ...
def _get_parameters_schema(self, schema_type: SchemaType) -> dict:
schema = {"type": "object"}
if not self.parameter_schemas and schema_type == SchemaType.API:
# Skip properties
return schema # <---- this line |
Lowered the threshold to 95%. |
Add coverage report using