great-expectations / great_expectations

Always know what to expect from your data.
https://docs.greatexpectations.io/
Apache License 2.0
9.88k stars 1.53k forks source link

Documentation using deprecated function of ruamel.yaml #4152

Closed AvdN closed 1 month ago

AvdN commented 2 years ago

https://github.com/great-expectations/great_expectations/blob/341a9a5f238dc2c05be7c2b3c3cc4e42440230c5/tests/integration/docusaurus/connecting_to_your_data/database/snowflake_python_example.py#L42

I came across the line above, through a question on stack-overflow ( https://stackoverflow.com/questions/71029745/unable-to-initialize-snowflake-data-source/71045925#71045925 ) which was tagged with ruamel.yaml ( I am the author of that package). The line uses the function ruamel.yaml.yaml and that is deprecated, the correct thing to do would be to method .dump() on a ruamel.yaml.YAML() instance together with the transform parameter:

from ruamel.yaml import YAML

yaml = YAML()
yaml.dump(datasource_config, sys.stdout, transform=context.test_yaml_config)

After answering that question I looked at the source code for great_expectations and noticed YAML() is used in the source code, but that there are many entries doing from ruamel import yaml in the docusaurus subdirs.

Fortunately you pin ruamel.yaml ( >=0.16,<0.17.18) but IMO you should update the documentation ASAP so people will no longer create new usage of deprecation.

I am willing to make a PR fixing all these, but I am not sure how to test the documentation, so I would need some assistance if that is required. I rather not make a PR for ~75 files and get it rejected.

austiezr commented 2 years ago

Hey @AvdN ! Thank you for reaching out about this; we'd love to work with you on a contribution here, but we need to have an internal conversation around legacy support here before moving forward. We'll review internally and get back to you!

jamesmyatt commented 1 year ago

Any update on this? Upper bound constraints make dependency resolution much harder and slower.

BwL1289 commented 6 months ago

also interested in an update?

AvdN commented 6 months ago

also interested in an update?

Why the question mark? Are you asking me?

This seems to be closed, I never got feedback to go ahead with a PR.

BwL1289 commented 6 months ago

@AvdN that was directed towards @austiezr. Apologies for the confusion and thanks for your contributions.

Kilo59 commented 3 months ago

@AvdN In what version is this drepecated function removed? I am wanting to relax the pinned version of ruamel.yaml

nicnic65 commented 2 months ago

Bumping this to ask the same, our dependency upgrades are being blocked by this pin on ruamel.yaml.

AvdN commented 2 months ago

It was remove in 0.18.0, upgrading should be relatively simple.

Kilo59 commented 2 months ago

@nicnic65 @BwL1289 we have slightly relaxed the ruamel pin in version 0.18.19 We may be able to relax it further for our final 1.0 release.

BwL1289 commented 2 months ago

Thank you, that is helpful.

molliemarie commented 1 month ago

Hello @AvdN. With the upcoming launch of Great Expectations Core (GX 1.0), we are closing old issues posted regarding previous versions. Moving forward, we will focus our resources on supporting and improving GX Core (version 1.0 and beyond). If you find that an issue you previously reported still exists in GX Core, we encourage you to resubmit it against the new version. With more resources dedicated to community support, we aim to tackle new issues swiftly. For specific details on what is GX-supported vs community-supported, you can reference our integration and support policy.

To get started on your transition to GX Core, check out the GX Core quickstart (click “Full example code” tab to see a code example).

You can also join our upcoming community meeting on August 28th at 9am PT (noon ET / 4pm UTC) for more updates on GX Core. Go to https://greatexpectations.io/meetup and click “follow calendar” to follow the GX community calendar.

Thank you for being part of the GX community and thank you for submitting this issue. We're excited about this new chapter and look forward to your feedback on GX Core. 🤗

molliemarie commented 1 month ago

Closing