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

Medium-scale refactoring #408

Merged
merged 35 commits into from
Mar 29, 2020
Merged

Medium-scale refactoring #408

merged 35 commits into from
Mar 29, 2020

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Jan 11, 2020

Motivation:

  • smart_open_lib.py was cluttered
  • parsing logic was messy

Main changes:

  • smart_open.parse_uri is now a publicly available function
  • Parsers for the individual schemes, e.g. HDFS, S3 now live in the
    corresponding submodule
  • Moved compression to a separate submodule
  • Moved transport registration to a separate submodule
  • Finally dropped Py2.7 support

I haven't changed any of the unit tests, in order to demonstrate that
everything still works as expected from the outside.

Checklist

Before you create the PR, please make sure you have:

  • Picked a concise, informative and complete title
  • Clearly explained the motivation behind the PR
  • Linked to any existing issues that your PR will be solving
  • Included tests for any new functionality
  • Checked that all unit tests pass

Motivation:

- smart_open_lib.py was cluttered
- parsing logic was messy

Main changes:

- smart_open.parse_uri is now a publicly available function
- Parsers for the individual schemes, e.g. HDFS, S3 now live in the
  corresponding submodule
- Moved compression to a separate submodule

I haven't changed any of the unit tests, in order to demonstrate that
everything still works as expected from the outside.
Copy link
Owner

@piskvorky piskvorky left a comment

Choose a reason for hiding this comment

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

Great idea! Having a clear structure will be helpful for external contributors.

smart_open/s3.py Show resolved Hide resolved
extending.md Outdated Show resolved Hide resolved
Copy link
Contributor

@menshikh-iv menshikh-iv left a comment

Choose a reason for hiding this comment

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

Nice work @mpenkov!

smart_open/compression.py Outdated Show resolved Hide resolved
smart_open/compression.py Show resolved Hide resolved
extending.md Show resolved Hide resolved
smart_open/hdfs.py Outdated Show resolved Hide resolved
smart_open/s3.py Outdated Show resolved Hide resolved
@mpenkov mpenkov mentioned this pull request Jan 12, 2020
@mpenkov mpenkov modified the milestone: 1.10.0 Mar 8, 2020
@mpenkov
Copy link
Collaborator Author

mpenkov commented Mar 27, 2020

@piskvorky @menshikh-iv I've made more changes and made sure the build passes. Can you please re-review?

.travis.yml Show resolved Hide resolved
extending.md Outdated Show resolved Hide resolved
extending.md Show resolved Hide resolved

You can confirm the documentation changes by running:

python -c 'help("smart_open")'
Copy link
Contributor

Choose a reason for hiding this comment

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

link to submodule should be here, I guess?

extending.md Show resolved Hide resolved
@@ -0,0 +1,132 @@
# Extending `smart_open`

This document targets potential contributors to `smart_open`.
Copy link
Contributor

Choose a reason for hiding this comment

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

What's about actions in case if I want to add new format, but without pushing them to smart_open (for example, reader for proprietary stuff in the company, useless for open-source).

smart_open/ssh.py Outdated Show resolved Hide resolved
smart_open/doctools.py Outdated Show resolved Hide resolved
smart_open/s3.py Show resolved Hide resolved
smart_open/tests/test_bytebuffer.py Show resolved Hide resolved
@menshikh-iv
Copy link
Contributor

Amazing work @mpenkov

@mpenkov mpenkov merged commit ad40632 into piskvorky:master Mar 29, 2020
@mpenkov mpenkov deleted the uri branch March 29, 2020 13:09
isobit added a commit to isobit/smart_open that referenced this pull request Jul 20, 2020
mpenkov added a commit that referenced this pull request Aug 30, 2020
* Remove boto as a dependency

Fixes:
- #391
- #409

Related to:
- #413
- #468
- #408

* Remove old boto tests and remove boto as test dependency

* Remove mention of boto from README as tests are no longer in place

* update CHANGELOG.md

Co-authored-by: Michael Penkov <[email protected]>
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.

4 participants