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

Releasing v: 0.2 #57

Merged
merged 10 commits into from
Oct 24, 2023
Merged

Releasing v: 0.2 #57

merged 10 commits into from
Oct 24, 2023

Conversation

cjrolo
Copy link
Collaborator

@cjrolo cjrolo commented Oct 23, 2023

Releasing 0.2

  • Functional CLI compressor/decompressor for WAV files.
  • Clean(er) repo
  • Updated (not fully) docs.

@cjrolo cjrolo marked this pull request as ready for review October 23, 2023 17:43
@cjrolo
Copy link
Collaborator Author

cjrolo commented Oct 23, 2023

Integrated the Planner.
Tested basic functionality for compression/decompression, all works.
Still a lot of small issues here and there, but I think it is a good thing to release and to mark some decent progress made by the team.

@cjrolo cjrolo requested review from rukai and conorbros October 23, 2023 17:46
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
/// Uncompresses the input file/directory
#[arg(short, action)]
uncompress: bool,

/// Verbose output, dumps everysample in the input file (for compression) and in the ouput file (for decompression)
#[arg(long, action)]
verbose: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should emit these as a debug!() or trace!() level logs instead.
That way the user can configure the log level to their needs and we avoid introducing multiple logging systems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moving this comment into a new PR with a discussion around this. I would also prefer that route, but, traditional UNIX CLI tools always have a flag for verbosity, that is why I created this one.
My idea is that Logs are more of a developer thing, we enable a certain level of logs to check the internals of the code. A user might want to have a flag to have more insight into the functioning of the tool.
Another option is: Can we fuse the flag with the logging levels?

Copy link
Contributor

Choose a reason for hiding this comment

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

You could certainly set the flag to enable a specific log level.

@@ -22,6 +22,23 @@ pub fn calculate_error(vec1: &[f64], vec2: &Vec<f64>) -> Option<f64> {
Some(squared_error / min_length as f64)
}

/// Computes the Normalized Mean Square Error between 2 signals
pub fn nmsqe(original: &[f64], generated: &[f64]) -> Option<f64> {
if original.len() != generated.len() {
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is an error case maybe we should return an Err instead of None here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now that you touch this topic, I think we should panic here. Error calculation is fundamental for getting the compressor settings right. Failing to calculate an error is not recoverable (Which samples should we drop? How did we even get different sizes to start with?).

Copy link
Contributor

Choose a reason for hiding this comment

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

Panicking sounds good to me!

Copy link
Contributor

Choose a reason for hiding this comment

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

I would leave as an error if there is any possible input to brro that could trigger this case. Otherwise if it's purely internal then panic away.

brro-compressor/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@rukai rukai left a comment

Choose a reason for hiding this comment

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

Nice!

@cjrolo cjrolo merged commit 948d271 into main Oct 24, 2023
2 checks passed
@cjrolo cjrolo deleted the release_v_0_2 branch October 24, 2023 18:52
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