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

feat: add ability to change max file size #51

Merged
merged 5 commits into from
Nov 6, 2024
Merged

Conversation

sineptic
Copy link
Contributor

No description provided.

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@fioncat
Copy link
Owner

fioncat commented Oct 30, 2024

Hey, thanks for your PR. I'm wondering if it would be more appropriate to add this to the command line arguments (like --max-file-size) or the config file. This is because other config options in otree do not use environment variables, so it might be a bit abrupt to use environment variable here.

@sineptic
Copy link
Contributor Author

sineptic commented Oct 30, 2024

I choose environment variable because;

  • You xan set it automatally (for example in fish/bash config) like in otree config
  • You can set it manually for 1 file like arg

@fioncat
Copy link
Owner

fioncat commented Oct 30, 2024

Yes, then maybe we can add this to both arg and config? Because I don't want users to configure otree in two places (bash/fish config and otree.toml), which can easily lead to omissions.

max file size moved from environment variable.
@sineptic
Copy link
Contributor Author

I don't know how default config was generated, so I add new option manually

Copy link
Owner

@fioncat fioncat left a comment

Choose a reason for hiding this comment

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

Thank you! One last thing, after some consideration, it seems more appropriate to call it max_data_size, as there is still a limitation even without reading data from a file.

You can directly apply my suggestions.

config/default.toml Outdated Show resolved Hide resolved
src/cmd.rs Outdated Show resolved Hide resolved
src/config/mod.rs Outdated Show resolved Hide resolved
src/config/mod.rs Outdated Show resolved Hide resolved
src/config/mod.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@sineptic
Copy link
Contributor Author

how I can use otee without specifying file?

@fioncat
Copy link
Owner

fioncat commented Oct 31, 2024

Use pipe:

xxxx | otree -t yaml

src/main.rs Outdated Show resolved Hide resolved
Copy link
Owner

@fioncat fioncat left a comment

Choose a reason for hiding this comment

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

LGTM

@fioncat
Copy link
Owner

fioncat commented Nov 4, 2024

@ccoVeille Hey, do you have further suggestions?

@sineptic
Copy link
Contributor Author

sineptic commented Nov 4, 2024

no, I just want to explore some dataset(large dataset)

src/main.rs Outdated Show resolved Hide resolved
@fioncat fioncat merged commit 4258546 into fioncat:main Nov 6, 2024
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.

3 participants