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

Adding documentation and tests for the ColumnTypes type class. #144

Merged

Conversation

imarios
Copy link
Contributor

@imarios imarios commented May 31, 2017

No description provided.

@imarios imarios requested a review from kanterov May 31, 2017 19:07
@imarios
Copy link
Contributor Author

imarios commented Jun 7, 2017

Hey @kanterov this is a pretty benign change. Adds a bit more documentation and tests. Let me know if you have any comments. thanks!

implicit tail: ColumnTypes.Aux[V, TT, T]
): ColumnTypes.Aux[V, TypedColumn[V, H] :: TT, H :: T] =
new ColumnTypes[V, TypedColumn[V, H] :: TT] {type Out = H :: T}
implicit def deriveCons[T, Head, Tail <: HList, ColTypes <: HList](
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reasoning behind renaming? It falls off current coding style, as well as other OSS projects using shapeless

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @kanterov, you mean about the head and tail? Yeah, that one I guess makes sense to use the standard H and TT. Overall the main goal of the rename was to make it a bit easier to understand the code. Maybe we can revert the Head/Tail back to their standard notations and leave the ColTypes as is (since it has a well defined semantic in our case)?

* type Out = A :: B :: C :: HNil
* }}}
*/
trait ColumnTypes[T, U <: HList] {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is mostly a workaround to issue with slow implicit derivation for Comapped

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, just realized that this is a special case of using Comapped! Ok, I think I will add this comment in case someone in the future decide to revert this back to Comapped.

@codecov-io
Copy link

codecov-io commented Jun 9, 2017

Codecov Report

Merging #144 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #144   +/-   ##
=======================================
  Coverage   93.68%   93.68%           
=======================================
  Files          28       28           
  Lines         649      649           
  Branches       11       11           
=======================================
  Hits          608      608           
  Misses         41       41
Impacted Files Coverage Δ
.../src/main/scala/frameless/ops/AggregateTypes.scala 100% <100%> (ø) ⬆️
...set/src/main/scala/frameless/ops/ColumnTypes.scala 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 919cdd5...35959b8. Read the comment docs.

@imarios
Copy link
Contributor Author

imarios commented Jun 13, 2017

@kanterov I just unified the notation for ColumnsTypes and AggregateType (they were similar implementations but used different letters for their equivalent parameters). I reverted the notation back to the standard ones used by shapeless (as you suggested). Added some comments as well. Let me know if there is anything else. I will squash the three commits into one after you give a thumps up.

@imarios
Copy link
Contributor Author

imarios commented Aug 31, 2017

@kanterov hello! anything else to improve here?

@imarios imarios force-pushed the documentation_and_tests_on_columntypes branch from ab341da to 35959b8 Compare September 5, 2017 18:41
@imarios imarios merged commit 91acd29 into typelevel:master Sep 10, 2017
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.

None yet

3 participants