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

Add options to yield multiple packages #115

Closed
jpmckinney opened this issue Dec 31, 2019 · 2 comments
Closed

Add options to yield multiple packages #115

jpmckinney opened this issue Dec 31, 2019 · 2 comments

Comments

@jpmckinney
Copy link
Member

jpmckinney commented Dec 31, 2019

Follow-up to #83

Yielding a single package can lead to all memory being consumed.

We can do something similar to split-record-packages to yield a package once it reaches a given number of records. This applies to all commands that yields a single package.

@jpmckinney jpmckinney changed the title compile: Add option to yield multiple packages Add option to yield multiple packages Jan 4, 2020
@jpmckinney
Copy link
Member Author

jpmckinney commented Jan 6, 2020

Yielding a single package can lead to all memory being consumed.

Fixed in #115.

We can do something similar to split-record-packages to yield a package once it reaches a given number of records. This applies to all commands that yields a single package.

--size option added to:

  • package-records
  • package-releases

Not yet added to:

For compile, we can run:

cat files | ocdskit compile --package | ocdskit echo --root-path records.item | ocdskit package-records --size 1000

To avoid the echo step, we can change the --package option of the compile command to be an --into choice between 'package' and 'records', e.g.

cat files | ocdskit compile --into records | ocdskit package-records --size 1000

Since this would require a change to the API (to prevent incoherent options like --package --records and return_package=True, return_records=True), we'll postpone until there's demand.

@jpmckinney jpmckinney changed the title Add option to yield multiple packages Add options to yield multiple packages Jan 6, 2020
@jpmckinney
Copy link
Member Author

Opened follow-up issue #122, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant