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

issue-108, unnecessary comments and code were removed #121

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

DoodgeMatvey
Copy link
Contributor

Closes #108

@DoodgeMatvey DoodgeMatvey self-assigned this Sep 16, 2024
@DoodgeMatvey DoodgeMatvey force-pushed the issue-108 branch 3 times, most recently from 1908210 to 0e48469 Compare September 17, 2024 00:39
@testisnullus
Copy link
Contributor

@rukai Should we also include #8 in this PR?

@cjrolo
Copy link
Collaborator

cjrolo commented Sep 17, 2024

Some TODO's have broad implications, let them stay in place OR create a issue for each one of them seems a better option.

@testisnullus
Copy link
Contributor

Ok, let's keep the TODOs, I am going to review them and create separate issues for the important ones

@cjrolo
Copy link
Collaborator

cjrolo commented Sep 19, 2024

@testisnullus can you check the conflicts and resolve them?

Thanks!

@DoodgeMatvey
Copy link
Contributor Author

DoodgeMatvey commented Sep 19, 2024

@testisnullus can you check the conflicts and resolve them?

Thanks!

I checked and resolved them

tools/src/bin/dwt_finder.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@cjrolo cjrolo left a comment

Choose a reason for hiding this comment

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

Let's remove:

  • prometheus-remote (It is too broken to make sense)
  • tools/dwt_finder.rs (It was a test tool)
  • tools/flac_reader_tester.rs (It was a test tool)
  • tools/mid_channel_computing.rs (It was a test tool)
  • optimizer (It was related to prometheus and the WAV format)

I will continue the review but let's do these things in the meanwhile.

@cjrolo
Copy link
Collaborator

cjrolo commented Nov 11, 2024

Also this is removing a lot of comments. I would focus on removing unused code paths/structures and less on comments. They are a protection for our (and others) future selfs.

@DoodgeMatvey
Copy link
Contributor Author

DoodgeMatvey commented Nov 11, 2024

Also this is removing a lot of comments. I would focus on removing unused code paths/structures and less on comments. They are a protection for our (and others) future selfs.

There are a lot of comments like

  • /// Function to perform compression and make a decision based on the results.
    Func name compress_and_decide()
  • // Initialize the compressor let c = Constant::new(data.len(), stats.min, stats.bitdepth); // Convert to bytes CompressorResult::new(c.to_bytes(), 0.0)
  • /// Stored frequencies
    pub frequencies: Vec<FrequencyPoint>,
  • ///Optimize
    pub fn optimize(data: &[f64]) -> Vec<i64> {
  • /// "Compress"
    pub fn compress(&mut self, data: &[f64]) {

Almost all comments that were removed looked like these. In such cases code is self-documented. Should I recover them?

@cjrolo
Copy link
Collaborator

cjrolo commented Nov 11, 2024

The self explanatory can go.

Thanks

@cjrolo
Copy link
Collaborator

cjrolo commented Nov 11, 2024

Cargo.toml needs to be updated and the non-used projects removed.

@DoodgeMatvey
Copy link
Contributor Author

Let's remove:

  • prometheus-remote (It is too broken to make sense)
  • tools/dwt_finder.rs (It was a test tool)
  • tools/flac_reader_tester.rs (It was a test tool)
  • tools/mid_channel_computing.rs (It was a test tool)
  • optimizer (It was related to prometheus and the WAV format)

I will continue the review but let's do these things in the meanwhile.

Removed

@DoodgeMatvey
Copy link
Contributor Author

Cargo.toml needs to be updated and the non-used projects removed.

Yes, updated

@DoodgeMatvey DoodgeMatvey requested review from cjrolo and rukai November 11, 2024 18:56
@DoodgeMatvey DoodgeMatvey force-pushed the issue-108 branch 3 times, most recently from 348e8e5 to a427eba Compare November 11, 2024 21:16
@DoodgeMatvey
Copy link
Contributor Author

The self explanatory can go.

Thanks

I left only meaningful comments and deleted unnecessary ones.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we check if this whole file can go? This is from the early implementations and we no longer have a definition of metric (or tags) inside the compressor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked, and removed because it wasn't used anywhere

Copy link
Collaborator

@cjrolo cjrolo left a comment

Choose a reason for hiding this comment

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

There is a couple of comments, but they can be address later.

Thanks for this PR is a massive cleanup effort that needed to be done!

@testisnullus
Copy link
Contributor

testisnullus commented Nov 12, 2024

LGTM! @cjrolo Let's merge this PR before I start to refactor a code to rename the tool to ATSC (#126) completely.

Copy link
Collaborator

@worryg0d worryg0d left a comment

Choose a reason for hiding this comment

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

The preprocessor folder looks redundant since it contains only empty mod.rs.

brro-compressor/src/compare.rs Outdated Show resolved Hide resolved
brro-compressor/src/lib.rs Show resolved Hide resolved
@DoodgeMatvey DoodgeMatvey force-pushed the issue-108 branch 2 times, most recently from 1610173 to da6d7a8 Compare November 12, 2024 21:56
@cjrolo cjrolo merged commit 87dcb2c into main Nov 12, 2024
2 checks passed
@cjrolo cjrolo deleted the issue-108 branch November 12, 2024 23:56
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.

Remove unused code
5 participants