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

Harmonize naming of discipline test classes in cats-kernel-laws. #1960

Merged
merged 4 commits into from
Oct 16, 2017

Conversation

denisrosset
Copy link
Contributor

The naming scheme of the discipline test classes is inconsistent: SemigroupLawTests but CommutativeSemigroupTests, etc...

This is due to a name clash in the tests subproject. However, having consistent naming in cats-kernel-laws should take precedence, as we can always fix the imports by renaming them.

This is done in this PR.

@kailuowang
Copy link
Contributor

Thanks for fixing this.
@LukaJCB this is actually the way I meant to propose originally, you took the other direction but I didn't feel strong enough about it to drag the PR further.

kailuowang
kailuowang previously approved these changes Oct 10, 2017
@peterneyens
Copy link
Collaborator

Thanks @denisrosset.
Should we actually rename them everywhere, instead of the import renames?

@denisrosset
Copy link
Contributor Author

denisrosset commented Oct 11, 2017

Hi @peterneyens,

I'm going to move spire, and by extension algebra to the type of law descriptions used by cats. As cats-kernel-laws is going to be imported by these libraries, it is better to have a consistent naming scheme, while the tests package of cats is not going to be exported for external use.

As I'm not very much involved with cats, I have no opinion of what should be done outside of the cats-kernel project!

Note: the build failed because I forgot to rename some imports (and it was not caught by the tests on my machine). Should be corrected.

@kailuowang
Copy link
Contributor

I thought about renaming all discipline.XXXXTests to XXXXLawTests, but it's kind of redundant with the laws in the package name. Another approach is to rename all the tests.XXXXXTests to something else, maybe tests.XXXXXAuxTests or something. BTW, we lack a consistent naming scheme for tests in cats.tests anyway, so maybe this can be addressed together with an effort of making them consistent.

For this PR, it's merely to bring the tests in kernel.laws consistent within and with cats.laws, so I incline to merge this as is and address the conflict between laws.discpline.XXXTests and tests.XXXTests in a separate PR. What do you think @peterneyens ?

@denisrosset
Copy link
Contributor Author

Why not use e.g. tests,MonoidSuite instead of MonoidAuxTests or MonoidTests?

@codecov-io
Copy link

codecov-io commented Oct 12, 2017

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1960   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         273      273           
  Lines        4541     4541           
  Branches      119      119           
=======================================
  Hits         4363     4363           
  Misses        178      178
Impacted Files Coverage Δ
.../scala/cats/kernel/laws/discipline/BandTests.scala 100% <ø> (ø) ⬆️
...ernel/laws/discipline/CommutativeMonoidTests.scala 100% <ø> (ø) ⬆️
...el/laws/discipline/CommutativeSemigroupTests.scala 100% <ø> (ø) ⬆️
.../scala/cats/kernel/laws/discipline/HashTests.scala 100% <ø> (ø) ⬆️
...kernel/laws/discipline/CommutativeGroupTests.scala 100% <ø> (ø) ⬆️
...a/cats/kernel/laws/discipline/SemigroupTests.scala 100% <100%> (ø)
...in/scala/cats/kernel/laws/discipline/EqTests.scala 100% <100%> (ø)
...cala/cats/kernel/laws/discipline/MonoidTests.scala 100% <100%> (ø)
...ats/kernel/laws/discipline/PartialOrderTests.scala 100% <100%> (ø)
...scala/cats/kernel/laws/discipline/GroupTests.scala 100% <100%> (ø)
... and 1 more

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 c121f4f...dac196d. Read the comment docs.

kailuowang
kailuowang previously approved these changes Oct 12, 2017
LukaJCB
LukaJCB previously approved these changes Oct 12, 2017
@kailuowang kailuowang dismissed stale reviews from LukaJCB and themself via dac196d October 15, 2017 15:49
@kailuowang kailuowang added this to the 1.0.0-RC1 milestone Oct 15, 2017
@kailuowang kailuowang merged commit 167d5b4 into typelevel:master Oct 16, 2017
AlejandroME added a commit to AlejandroME/cats that referenced this pull request Oct 16, 2017
- Renames tests in `cats.tests` package with the "Suite" suffix,
according to typelevel#1960 and typelevel#1965.
kailuowang pushed a commit that referenced this pull request Oct 19, 2017
* Unifies tests naming standard

- Renames tests in `cats.tests` package with the "Suite" suffix,
according to #1960 and #1965.

* Removes laws import aliases

* Deletes more import alias

- The previous commit resolved some conflicting files. Also, test
classes in `cats.jvm` and `cats.free` packages were renamed to use
the `XXXXSuite` naming convention.
- Deleted some import aliases to `cats.kernel.laws.discipline` classes
kailuowang pushed a commit to kailuowang/cats that referenced this pull request Oct 23, 2017
* Unifies tests naming standard

- Renames tests in `cats.tests` package with the "Suite" suffix,
according to typelevel#1960 and typelevel#1965.

* Removes laws import aliases

* Deletes more import alias

- The previous commit resolved some conflicting files. Also, test
classes in `cats.jvm` and `cats.free` packages were renamed to use
the `XXXXSuite` naming convention.
- Deleted some import aliases to `cats.kernel.laws.discipline` classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants