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

Vr/sqlmodel 20 #35

Merged
merged 73 commits into from
May 2, 2023
Merged

Vr/sqlmodel 20 #35

merged 73 commits into from
May 2, 2023

Conversation

vreuter
Copy link
Member

@vreuter vreuter commented Apr 28, 2023

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why were some constants moved here from const.py?

@@ -35,23 +35,22 @@ def main():
status_schema_path=args.status_schema,
flag_file_dir=args.flag_dir,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

 namespace=args.namespace
 status_schema_path=args.status_schema

Should be removed or they will throw an error during creation of psm.

@@ -35,23 +35,22 @@ def main():
status_schema_path=args.status_schema,
flag_file_dir=args.flag_dir,
)
types_to_read_from_json = ["object"] + list(CANONICAL_TYPES.keys())
if args.command == REPORT_CMD:
value = args.value
if psm.schema is None:
raise SchemaNotFoundError(msg="report", cli=True)
result_metadata = psm.schema[args.result_identifier]
Copy link
Contributor

Choose a reason for hiding this comment

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

Now returning ParsedSchema instead of schema, should be:
result_metadata = psm.schema.results_data[args.result_identifier]

@vreuter
Copy link
Member Author

vreuter commented May 2, 2023 via email

@nsheff nsheff changed the base branch from dev to sqlmodel May 2, 2023 20:30
@nsheff nsheff merged commit faad7b1 into pepkit:sqlmodel May 2, 2023
@nsheff nsheff mentioned this pull request May 2, 2023
@simeoncarstens
Copy link
Contributor

@CodiumAI-Agent /describe

@CodiumAI-Agent
Copy link

Title

Vr/sqlmodel 20


Type

Enhancement, Tests


Description

This PR introduces significant changes and enhancements to the codebase, including:

  • Refactoring of test functions in tests/test_pipestat.py and tests/test_init.py to accommodate changes in the main codebase.
  • Addition of new test functions to cover new features and changes.
  • Introduction of new exception classes in pipestat/exceptions.py for better error handling.
  • Update to pipestat/__init__.py to import the PipestatError class and include it in the __classes__ list.

Changes walkthrough

Relevant files                                                                                                                                 
Tests
test_pipestat.py                                                                                       
    tests/test_pipestat.py

    **The test file tests/test_pipestat.py has been
    significantly refactored. Changes include:

    • Importing
      additional modules and functions for testing.
    • Refactoring
      of test functions to accommodate changes in the main
      codebase.
    • Addition of new test functions to cover new
      features and changes.
    • Removal of the TestHighlighting
      class and its test function, and replacement with a
      standalone test function.
    • Changes in the TestEnvVars
      class to test the creation of a PipestatManager instance
      from environment variables.
    • Changes in the
      TestPipestatManagerInstantiation class to test the
      instantiation of the PipestatManager class.**
+142/-70
test_init.py                                                                                               
    tests/test_init.py

    **The test file tests/test_init.py has been significantly
    refactored. Changes include:

    • Importing additional modules
      and functions for testing.
    • Refactoring of test functions
      to accommodate changes in the main codebase.
    • Addition of
      new test functions to cover new features and changes.

    • Changes in the TestPipestatManagerInstantiation class to
      test the instantiation of the PipestatManager class.**
+31/-49
Error handling
exceptions.py                                                                                             
    pipestat/exceptions.py

    **The pipestat/exceptions.py file has been updated with new
    exception classes:

    • NoBackendSpecifiedError for
      designating lack of backend specification.

    • UnrecognizedStatusError for when a value to set as status
      isn't declared in the active status schema.
    • Also, some
      minor changes in the existing exception classes.**
+21/-4
Miscellaneous
__init__.py                                                                                                 
    pipestat/__init__.py

    The pipestat/__init__.py file has been updated to import
    the PipestatError class and include it in the
    __classes__ list.

+2/-1

✨ Usage guide:

Overview:
The describe tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

When commenting, to edit configurations related to the describe tool (pr_description section), use the following template:

/describe --pr_description.some_config1=... --pr_description.some_config2=...

With a configuration file, use the following template:

[pr_description]
some_config1=...
some_config2=...
Enabling\disabling automation
  • When you first install the app, the default mode for the describe tool is:
pr_commands = ["/describe --pr_description.add_original_user_description=true" 
                         "--pr_description.keep_original_user_title=true", ...]

meaning the describe tool will run automatically on every PR, will keep the original title, and will add the original user description above the generated description.

  • Markers are an alternative way to control the generated description, to give maximal control to the user. If you set:
pr_commands = ["/describe --pr_description.use_description_markers=true", ...]

the tool will replace every marker of the form pr_agent:marker_name in the PR description with the relevant content, where marker_name is one of the following:

  • type: the PR type.
  • summary: the PR summary.
  • walkthrough: the PR walkthrough.

Note that when markers are enabled, if the original PR description does not contain any markers, the tool will not alter the description at all.

Custom labels

The default labels of the describe tool are quite generic: [Bug fix, Tests, Enhancement, Documentation, Other].

If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
Examples for custom labels:

  • Main topic:performance - pr_agent:The main topic of this PR is performance
  • New endpoint - pr_agent:A new endpoint was added in this PR
  • SQL query - pr_agent:A new SQL query was added in this PR
  • Dockerfile changes - pr_agent:The PR contains changes in the Dockerfile
  • ...

The list above is eclectic, and aims to give an idea of different possibilities. Define custom labels that are relevant for your repo and use cases.
Note that Labels are not mutually exclusive, so you can add multiple label categories.
Make sure to provide proper title, and a detailed and well-phrased description for each label, so the tool will know when to suggest it.

More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

  • /review: Request a review of your Pull Request.
  • /describe: Update the PR title and description based on the contents of the PR.
  • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
  • /ask <QUESTION>: Ask a question about the PR.
  • /update_changelog: Update the changelog based on the PR's contents.
  • /add_docs 💎: Generate docstring for new components introduced in the PR.
  • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
  • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the describe usage page for a comprehensive guide on using this tool.

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.

5 participants