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

hotfix invoking the Node tags method #317

Merged
merged 1 commit into from Feb 21, 2024

Conversation

haoxins
Copy link
Contributor

@haoxins haoxins commented Jan 26, 2024

Sorry for introducing this in #302

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

@haoxins
Copy link
Contributor Author

haoxins commented Jan 26, 2024

BTW, it seems that we don't use @property annotation in this package?
I prefer the way of using @property.

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91afe1b) 77.83% compared to head (e0e974a) 77.84%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #317   +/-   ##
=======================================
  Coverage   77.83%   77.84%           
=======================================
  Files          18       18           
  Lines        2423     2424    +1     
=======================================
+ Hits         1886     1887    +1     
  Misses        537      537           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

wey-gu
wey-gu previously approved these changes Jan 27, 2024
Copy link
Contributor

@wey-gu wey-gu left a comment

Choose a reason for hiding this comment

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

Thanks!
We may add test cases to cover it later :)

@wey-gu
Copy link
Contributor

wey-gu commented Jan 27, 2024

BTW, it seems that we don't use @property annotation in this package?

I prefer the way of using @property.

Yes, this project was not initiated by pythonista, let's polish it together, feel free to drop PR on doing so!

@haoxins
Copy link
Contributor Author

haoxins commented Jan 27, 2024

BTW, it seems that we don't use @property annotation in this package?
I prefer the way of using @property.

Yes, this project was not initiated by pythonista, let's polish it together, feel free to drop PR on doing so!

done

@haoxins haoxins requested a review from wey-gu January 27, 2024 04:54
@wey-gu
Copy link
Contributor

wey-gu commented Jan 29, 2024

Sorry, after revisiting for a while, I think it's better not change .tags from a function into a @property.

  • It's an API break change
  • Relationship.edge_name and a bunch of other functions are in similar situations, we should either change them all or left all unchanged to maintain consistency of the design

My suggestions would be:

  • leave those getter functions function(without @property)
  • optionally introduce _foo @Property like Node._tags, Relationship._edge_name etc.
  • Use @property for getters in next major version(that such break change is accepted) and to avoid breaking our user code.

What do you think @haoxins , please?

@haoxins
Copy link
Contributor Author

haoxins commented Jan 29, 2024

Sorry, after revisiting for a while, I think it's better not change .tags from a function into a @property.

  • It's an API break change
  • Relationship.edge_name and a bunch of other functions are in similar situations, we should either change or left unchanged to maintain consistency of the design

My suggestions would be:

  • leave those getter functions function(without @property)
  • optionally introduce _foo @Property like Node._tags, Relationship._edge_name etc.
  • Use @property for getters in next major version(that such break change is accepted) and to avoid breaking our user code.

What do you think @haoxins , please?

I had the same concerns before I pushed the commit.

I will just revert the commit for this PR


I want to do more naming changes in the future, will give a list in a Github issue.

@haoxins
Copy link
Contributor Author

haoxins commented Jan 29, 2024

Use @Property for getters in next major version(that such break change is accepted) and to avoid breaking our user code.

Yes, this project was not initiated by pythonista, let's polish it together, feel free to drop PR on doing so!

I think we can start a Github issue to track the changes that make this package more Pythonic.

@wey-gu
Copy link
Contributor

wey-gu commented Jan 29, 2024

Use @Property for getters in next major version(that such break change is accepted) and to avoid breaking our user code.

Yes, this project was not initiated by pythonista, let's polish it together, feel free to drop PR on doing so!

I think we can start a Github issue to track the changes that make this package more Pythonic.

Yes, let's do it!!!

@wey-gu
Copy link
Contributor

wey-gu commented Jan 29, 2024

Sorry, after revisiting for a while, I think it's better not change .tags from a function into a @property.

  • It's an API break change
  • Relationship.edge_name and a bunch of other functions are in similar situations, we should either change or left unchanged to maintain consistency of the design

My suggestions would be:

  • leave those getter functions function(without @property)
  • optionally introduce _foo @Property like Node._tags, Relationship._edge_name etc.
  • Use @property for getters in next major version(that such break change is accepted) and to avoid breaking our user code.

What do you think @haoxins , please?

I had the same concerns before I pushed the commit.

I will just revert the commit for this PR

I want to do more naming changes in the future, will give a list in a Github issue.

Please drop the main list issue as RFC ♥️.

@haoxins
Copy link
Contributor Author

haoxins commented Jan 31, 2024

cc @Nicole00

@haoxins
Copy link
Contributor Author

haoxins commented Feb 2, 2024

@Nicole00 take a look?

@wey-gu wey-gu requested a review from Nicole00 February 3, 2024 17:09
@Nicole00 Nicole00 merged commit 251c253 into vesoft-inc:master Feb 21, 2024
11 checks passed
@haoxins haoxins deleted the hotfix-getter branch February 21, 2024 06:09
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

4 participants