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 --latest flag #67

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Add --latest flag #67

merged 2 commits into from
Sep 24, 2024

Conversation

ambareesh1510
Copy link
Contributor

Added the following:

  • tlparse --latest to parse the most recently modified log in the working directory
  • tlparse [PATH] --latest to parse the most recently modified log in the specified directory

Implements #43

src/cli.rs Outdated
@@ -10,7 +10,11 @@ use tlparse::{parse_path, ParseConfig};
#[command(author, version, about, long_about = None)]
#[command(propagate_version = true)]
pub struct Cli {
path: PathBuf,
#[arg(required_unless_present = "latest")]
path: Option<PathBuf>,
Copy link
Owner

Choose a reason for hiding this comment

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

Minor request: instead of making path optional, could you just keep it required (so no default to current directory; this is rarely what you want anyway since TORCH_TRACE makes you specify an output directory for logs)

Copy link
Owner

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

I haven't tested but sure let's see if it works

@ezyang ezyang merged commit 83f03d2 into ezyang:main Sep 24, 2024
13 checks passed
ezyang added a commit that referenced this pull request Sep 24, 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.

2 participants