Skip to content

Implement Color Contrast Ratio + Unit Tests #2023

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

Closed
wants to merge 1 commit into from
Closed

Implement Color Contrast Ratio + Unit Tests #2023

wants to merge 1 commit into from

Conversation

SethFalco
Copy link
Contributor

@SethFalco SethFalco commented Nov 5, 2020

Describe your change:

This implements the procedure documented on the W3 website to calculate the contrast ratio between two colors.
https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-procedure

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

References

I'm closing #1794 and opening this one instead.
#1794 was my original pull request which went to the master branch, this instead goes to the development branch and adds unit tests.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@SethFalco
Copy link
Contributor Author

It looks to me that the test causing the build failure is one which is not added by this PR.

com.designpatterns.creational.singleton.SingletonTest > testSingleton() FAILED
    java.lang.NullPointerException at SingletonTest.java:36

@stale
Copy link

stale bot commented Feb 13, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 13, 2021
@SethFalco
Copy link
Contributor Author

Does a comment count as activity?

@stale stale bot removed the stale label Feb 13, 2021
@ayaankhan98
Copy link
Member

Hey please make PR to master branch.

@SethFalco
Copy link
Contributor Author

Hey please make PR to master branch.

But it says on README it says that we should go to Development to make contributions?
If this is PRs are meant to go to master, may I ask what that note is for then?

NOTE: A Development branch is made for this repo where we're trying to migrate the existing project to a Java project structure. You can switch to Development branch for contributions. Please refer this issue for more info.

@ayaankhan98
Copy link
Member

Hey please make PR to master branch.

But it says on README it says that we should go to Development to make contributions?
If this is PRs are meant to go to master, may I ask what that note is for then?

NOTE: A Development branch is made for this repo where we're trying to migrate the existing project to a Java project structure. You can switch to Development branch for contributions. Please refer this issue for more info.

yes sure, earlier it was decided to transform this repository in a java project structure but this approach is not suitable for the purpose which this repository serves, The sole purpose of The Algorithms organisation is to serve as an educational orgranisation in field of Algorithms and Data Structure. If project strcture arrangement files become dependent on one another, which is not good for the purpose of this repository. We want each and every file to be independent from other files so that it will not confuse begginers and they will eaisly be able to run each file independently.

@ayaankhan98
Copy link
Member

Hey please make PR to master branch.

But it says on README it says that we should go to Development to make contributions?
If this is PRs are meant to go to master, may I ask what that note is for then?

NOTE: A Development branch is made for this repo where we're trying to migrate the existing project to a Java project structure. You can switch to Development branch for contributions. Please refer this issue for more info.

we are in process of removing that NOTE from README.md issue #2116

@SethFalco
Copy link
Contributor Author

we are in process of removing that NOTE from README.md issue #2116

Understood, I've reopened my original PR #1794 then.
Thanks for the heads-up!

@ayaankhan98
Copy link
Member

we are in process of removing that NOTE from README.md issue #2116

Understood, I've reopened my original PR #1794 then.
Thanks for the heads-up!

Thanks for your consideration @SethFalco

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.

2 participants