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

fix: type error #97

Merged
merged 2 commits into from
Jan 2, 2025
Merged

fix: type error #97

merged 2 commits into from
Jan 2, 2025

Conversation

JaeAeich
Copy link
Contributor

@JaeAeich JaeAeich commented Dec 31, 2024

IMPORTANT: Please create an issue before filing a pull request! Changes need to be discussed before proceeding. Please read the contribution guidelines.

fix type error caused by mishandling path type.

Details

Please provide enough information so that others can review your pull request. Give a brief summary of the motivation. Refer to the corresponding issue/s with #XXXX for more information.

Testing

Write the appropriate unit and integration tests, if applicable. Make sure these and all other tests pass.

Documentation

Please document your changes and test cases in the appropriate places, if applicable.

Style

Make sure your changes adhere to the coding/documentation style used throughout the project.

Closing issues

If your changes fix any issue/s, put closes #XXXX in your comment to auto-close it/them.

Credit

Add your credentials to the list of contributors once your pull request was merged.

Summary by Sourcery

Update the WES endpoint URL and fix a type error in the workflow run document.

Bug Fixes:

  • Fixed a type error when setting the work_dir field by converting the Path object to a string.

Enhancements:

  • Updated the WES endpoint URL from https://csc-wes-noauth.rahtiapp.fi to https://wes-na.cloud.e-infra.cz to use a working endpoint.

Copy link

sourcery-ai bot commented Dec 31, 2024

Reviewer's Guide by Sourcery

This pull request fixes a type error by changing the type of the work_dir field in the DbDocument model from Path to str. It also updates the WES endpoint URL.

Class diagram showing updated DbDocument model

classDiagram
    class DbDocument {
        +RunLog run_log
        +Optional[str] task_id
        +Optional[str] user_id
        +Optional[str] work_dir
        +Optional[WesEndpoint] wes_endpoint
    }
    note for DbDocument "Changed work_dir type from Path to str"

    class RunLog {
    }

    class WesEndpoint {
        +str host
    }

    DbDocument --> RunLog
    DbDocument --> WesEndpoint
Loading

File-Level Changes

Change Details Files
Changed the type of work_dir from Path to str.
  • Modified the type annotation of the work_dir field in the DbDocument model.
  • Updated the assignment of the work_dir field to convert the Path object to a string.
pro_wes/ga4gh/wes/models.py
pro_wes/ga4gh/wes/workflow_runs.py
Updated the WES endpoint URL.
  • Changed the host value from https://csc-wes-noauth.rahtiapp.fi to https://wes-na.cloud.e-infra.cz.
pro_wes/ga4gh/wes/workflow_runs.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@JaeAeich JaeAeich requested a review from uniqueg December 31, 2024 12:17
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @JaeAeich - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The WES endpoint URL should be configurable rather than hardcoded. Consider moving this to a configuration file or environment variable.
  • Please explain why the work_dir type needed to be changed from Path to str. If there were issues with the Path type, we should understand and possibly fix the root cause.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Can you please make 2 PRs out of this? Especially with changes like changing defaults, they should have good visibility.

@JaeAeich
Copy link
Contributor Author

JaeAeich commented Jan 2, 2025

@uniqueg maybe lets leave changing the url altogether, lets keep that implicit.

@JaeAeich JaeAeich requested a review from uniqueg January 2, 2025 12:29
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Looks good, but please make sure the PR description is up to date (check whether the issues are still addressed, check that only the type change is described, make sure that the template is either filled out properly or delete it)

@JaeAeich
Copy link
Contributor Author

JaeAeich commented Jan 2, 2025

yeah it doesn't I have changes the description.

@JaeAeich JaeAeich merged commit a9fe58e into dev Jan 2, 2025
3 checks passed
@JaeAeich JaeAeich deleted the path branch January 2, 2025 13:20
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.

2 participants