-
Notifications
You must be signed in to change notification settings - Fork 847
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
Enable "#![warn(missing_docs)]" #37
Comments
Comment from Owen Nelson(theomn) @ 2019-03-10T01:53:37.792+0000: Adding the attribute to arrow, datafusion, and parquet yields around 183 errors currently. I may take a little effort to cover the gap that exists right now. As a newcomer to the project, I'm looking for ways to explore the codebase and I'd welcome the chance to take a stab at this, however being so unfamiliar with the internals I may need to refer to the docs on one of the other lang's implementations. I may need to refer to the other implementations anyway just to keep the phrasing consistent. It could take some time. Any objections to me digging into this? Additionally, would we prefer to set missing docs to warnings rather than errors now that CI will treat warnings as errors as of ARROW-2409? Comment from Paddy Horan(paddyhoran) @ 2019-03-11T02:08:31.146+0000: Hey, Feel free to dig into this. I opened the issue as eventually I would like us to have this enabled. But my plan was always to come back and open smaller documentation related issues that would build up to adding this feature. One of the first PR's I did was to update the docs of the `datatypes` module so feel free to take it module by module as you learn the code base. +1 for warnings instead of errors now that you tackled ARROW-2409. Feel free to reach out if you have questions. |
@alamb I'm looking at this to help clear the backlog. We have How would you like me to proceed? |
We can link #112 with this one as well. |
It sounds like we should turn on the pragma -- the challenge is likely that you'll have to add lots of documentation to get it to pass I would think |
Not a problem. If that's what it takes to clear the issues. |
One good thing that's happening is that I'm also finding some of the trivial, but overlooked code-pieces. For example: fn write(&mut self, buf: &[u8]) -> Result<usize> {
let string = match String::from_utf8(buf) { // Should've been `str::from_utf8`, avoids allocation
Ok(x) => x,
Err(e) => {
return Err(Error::new(ErrorKind::InvalidData, e));
}
};
self.data.push_str(&string); // With `str::from_utf8`, a reference won't be necessary
Ok(string.len())
} I'm also changing these as they're not too much work and are trivial changes. I hope that's okay? |
Of course, thank you -- this will be great |
If it is possible, it would be great to make the PR easy to review if it:
Maybe breaking into several smaller PRs would also be good |
That's what I'm planning too. Every time I'm done with one (or two) workspace member(s), I'll raise a PR and link that here too. And no, I'll make sure to not mix any breaking API changes (if at all, coz that diverts the focus) with this. |
- add pragma `#![warn(missing_docs)]` to `arrow`, `arrow-arith`, `arrow-avro` - add docs to the same to remove lint warnings
- add pragma `#![warn(missing_docs)]` to `arrow`, `arrow-arith`, `arrow-avro` - add docs to the same to remove lint warnings
- add pragma `#![warn(missing_docs)]` to `arrow`, `arrow-arith`, `arrow-avro` - add docs to the same to remove lint warnings
- add pragma `#![warn(missing_docs)]` to `arrow`, `arrow-arith`, `arrow-avro` - add docs to the same to remove lint warnings
I have a question. There are instances when I see a utility function, called nowhere else but the file it's in, has Should I do so? Or make it private but add the docs still; or just add the docs? For instance look at this: /// Create a visual representation of columns
pub fn pretty_format_columns(
col_name: &str,
results: &[ArrayRef],
) -> Result<impl Display, ArrowError> {
let options = FormatOptions::default().with_display_error(true);
pretty_format_columns_with_options(col_name, results, &options)
}
pub fn pretty_format_columns_with_options(
col_name: &str,
results: &[ArrayRef],
options: &FormatOptions,
) -> Result<impl Display, ArrowError> {
create_column(col_name, results, options)
} This is the only call for |
In my opinion
|
- add pragma `#![warn(missing_docs)]` to `arrow-buffer`, `arrow-cast`, `arrow-csv` - add docs to the same to remove lint warnings
- add pragma `#![warn(missing_docs)]` to `arrow-buffer`, `arrow-cast`, `arrow-csv` - add docs to the same to remove lint warnings
* chore: add docs, part of #37 - add pragma `#![warn(missing_docs)]` to `arrow`, `arrow-arith`, `arrow-avro` - add docs to the same to remove lint warnings * chore: add docs, part of #37 - add pragma `#![warn(missing_docs)]` to `arrow-buffer`, `arrow-cast`, `arrow-csv` - add docs to the same to remove lint warnings * chore: update docs, resolve PR comments
- add pragma `#![warn(missing_docs)]` to the following - `arrow-array` - `arrow-cast` - `arrow-csv` - `arrow-data` - `arrow-json` - `arrow-ord` - `arrow-pyarrow-integration-testing` - `arrow-row` - `arrow-schema` - `arrow-select` - `arrow-string` - `arrow` - `parquet_derive` - add docs to those that generated lint warnings - Remove `bitflags` workaround in `arrow-schema` At some point, a change in `bitflags v2.3.0` had started generating lint warnings in `arrow-schema`, This was handled using a [workaround](apache#4233) [Issue](bitflags/bitflags#356) `bitflags v2.3.1` fixed the issue hence the workaround is no longer needed.
- add pragma `#![warn(missing_docs)]` to the following - `arrow-array` - `arrow-cast` - `arrow-csv` - `arrow-data` - `arrow-json` - `arrow-ord` - `arrow-pyarrow-integration-testing` - `arrow-row` - `arrow-schema` - `arrow-select` - `arrow-string` - `arrow` - `parquet_derive` - add docs to those that generated lint warnings - Remove `bitflags` workaround in `arrow-schema` At some point, a change in `bitflags v2.3.0` had started generating lint warnings in `arrow-schema`, This was handled using a [workaround](apache#4233) [Issue](bitflags/bitflags#356) `bitflags v2.3.1` fixed the issue hence the workaround is no longer needed.
* chore: add docs, part of #37 - add pragma `#![warn(missing_docs)]` to the following - `arrow-array` - `arrow-cast` - `arrow-csv` - `arrow-data` - `arrow-json` - `arrow-ord` - `arrow-pyarrow-integration-testing` - `arrow-row` - `arrow-schema` - `arrow-select` - `arrow-string` - `arrow` - `parquet_derive` - add docs to those that generated lint warnings - Remove `bitflags` workaround in `arrow-schema` At some point, a change in `bitflags v2.3.0` had started generating lint warnings in `arrow-schema`, This was handled using a [workaround](#4233) [Issue](bitflags/bitflags#356) `bitflags v2.3.1` fixed the issue hence the workaround is no longer needed. * fix: resolve comments on PR #6433
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-integration-test` - `arrow-integration-testing`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-integration-test` - `arrow-integration-testing`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-integration-test` - `arrow-integration-testing`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-integration-test` - `arrow-integration-testing`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-ipc` - `arrow-integration-test` - `arrow-integration-testing` - `object_store`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-ipc` - `arrow-integration-test` - `arrow-integration-testing` - `object_store`
- add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-ipc` - `arrow-integration-test` - `arrow-integration-testing` - `object_store` - also document the caveat with using level 10 GZIP compression in parquet. See apache#6282.
* chore: add docs, part of #37 - add pragma `#![warn(missing_docs)]` to the following - `arrow-flight` - `arrow-ipc` - `arrow-integration-test` - `arrow-integration-testing` - `object_store` - also document the caveat with using level 10 GZIP compression in parquet. See #6282. * chore: resolve PR comments from #6453
@alamb I see the following enum in pub enum Level {
Page,
Column,
} P.S.: Removing this didn't cause any issue at all. Test cases passed as well. |
I think we should mark it deprecated and plan to remove it for the next breaking release |
- add pragma `#![warn(missing_docs)]` to `parquet` This is the final component in the effort to make Arrow fully-documented. The entire project now generates warning for missing docs, if any. - arrow: replace `tonic`'s deprecated `compile_with_config` with suggested method - new deprecation: The following types were not used anywhere and were possibly strays. They've been marked as deprecated and will be removed in future versions. - `parquet::data_types::SliceAsBytesDataType` - `parquet::column::writer::Level`
- add pragma `#![warn(missing_docs)]` to `parquet` This is the final component in the effort to make Arrow fully-documented. The entire project now generates warning for missing docs, if any. - arrow: replace `tonic`'s deprecated `compile_with_config` with suggested method - new deprecation: The following types were not used anywhere and were possibly strays. They've been marked as deprecated and will be removed in future versions. - `parquet::data_types::SliceAsBytesDataType` - `parquet::column::writer::Level`
- add pragma `#![warn(missing_docs)]` to `parquet` This is the final component in the effort to make Arrow fully-documented. The entire project now generates warning for missing docs, if any. - `arrow-flight`: replace `tonic`'s deprecated `compile_with_config` with suggested method - new deprecation: The following types were not used anywhere and were possibly strays. They've been marked as deprecated and will be removed in future versions. - `parquet::data_types::SliceAsBytesDataType` - `parquet::column::writer::Level`
- add pragma `#![warn(missing_docs)]` to `parquet` This is the final component in the effort to make Arrow fully-documented. The entire project now generates warning for missing docs, if any. - `arrow-flight`: replace `tonic`'s deprecated `compile_with_config` with suggested method - new deprecation: The following types were not used anywhere and were possibly strays. They've been marked as deprecated and will be removed in future versions. - `parquet::data_types::SliceAsBytesDataType` - `parquet::column::writer::Level`
Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-4683
We are moving fast with the Rust implementation and the docs can be ignored at times. We are starting to get to the point where the project is useful and we should ensure that the docs are up to scratch to avoid hurting adoption.
The text was updated successfully, but these errors were encountered: