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

Normalize and prune top-level APIs #208

Merged
merged 1 commit into from
May 18, 2020

Conversation

sethmlarson
Copy link
Contributor

  • Added es_ prefix to top-level APIs that aren't to do with Pandas compatibility.
  • Deprecated and renamed [DataFrame, Series].info_es() to es_info().
  • Renamed eland.Index.index_field to eland.Index.es_index_field
  • Renamed eland.[DataFrame, Series]._to_pandas() to to_pandas()
    • Rationale: This API should be public as it's more convenient than calling eland_to_pandas(). Will need to add a circuit breaker to prevent users from unknowingly dumping their ES index to memory.
  • Changed query_compiler constructors for DataFrame and Series into a private interface (_query_compiler).
  • Deprecated eland.read_es() in favor of eland.DataFrame()
    • Rationale: "read" gives the idea that we're moving data around, but creating an eland.DataFrame() doesn't load any data by default.
  • Deprecated eland.read_csv() in favor of eland.csv_to_eland()
    • Rationale: Mirrors eland.pandas_to_eland() where data is inserted into ES and a DataFrame is returned.
  • Moved ETL functionality to its own module etl.py and left utils.py to be utilities for the module rather than users.
  • Added type-checking eland/etl.py

Copy link
Contributor

@stevedodson stevedodson left a comment

Choose a reason for hiding this comment

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

LGTM - great cleanup!

@sethmlarson sethmlarson force-pushed the es-prefix branch 2 times, most recently from 6464e2e to afb4f60 Compare May 18, 2020 18:50
@sethmlarson sethmlarson merged commit 1378544 into elastic:master May 18, 2020
@sethmlarson sethmlarson deleted the es-prefix branch May 18, 2020 19:55
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