Skip to content

Commit

Permalink
Merge pull request #688 from cockroacher/contributions
Browse files Browse the repository at this point in the history
Add `--credits` Option to Display Contributors and Dependencies
  • Loading branch information
cockroacher authored Nov 1, 2024
2 parents c1535d5 + b35c615 commit 6b31493
Show file tree
Hide file tree
Showing 15 changed files with 1,382 additions and 257 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/update-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
advisories
- name: Verifing Software(s)
run: python update_software.py -d ${{ secrets.GITHUB_TOKEN }}
- name: Update CREDITS.md
run: python default.py --uc
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
Expand All @@ -70,10 +72,12 @@ jobs:
- software-full.json
- defaults/software-rules.json
- defaults/settings.json
- CREDITS.md
assignees: 7h3Rabbit
reviewers: 7h3Rabbit
add-paths: |
software-sources.json
software-full.json
defaults/software-rules.json
defaults/settings.json
CREDITS.md
82 changes: 82 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Credits
Following shows projects and contributors for webperf-core and its dependencies.
Many thanks to all of you! :D

Contributors:
- [7h3Rabbit](https://github.com/7h3Rabbit)
- [cockroacher](https://github.com/cockroacher)
- [marcusosterberg](https://github.com/marcusosterberg)
- [flowertwig-org](https://github.com/flowertwig-org)
- [dependabot[bot]](https://github.com/apps/dependabot)
- [krompaco](https://github.com/krompaco)
- [linulas](https://github.com/linulas)
- [perlan](https://github.com/perlan)
- [puggan](https://github.com/puggan)

## [lighthouse](https://www.npmjs.com/package/lighthouse)
Usage: Used in Google Lighthouse based Tests
License: APACHE-2.0

## [pa11y](https://www.npmjs.com/package/pa11y)
Usage: Used in Accessibility (Pa11y) Test
License: LGPL-3.0

## [sitespeed.io](https://www.npmjs.com/package/sitespeed.io)
Usage: Used in the background in most cases where we need to visit website as browser
License: MIT

## [vnu-jar](https://www.npmjs.com/package/vnu-jar)
Usage: Used in HTML and CSS Validation Test
License: MIT

## [yellowlabtools](https://www.npmjs.com/package/yellowlabtools)
Usage: Used in Quality on frontend (Yellow Lab Tools) Test
License: GPL-2.0

## [beautifulsoup4](https://pypi.org/project/beautifulsoup4/)
Usage: Used to parse HTML content
## [lxml](https://pypi.org/project/lxml/)
Usage: Used to parse XML content
## [requests](https://pypi.org/project/requests/)
Usage: Used to request content not normally requested by users, like robots.txt
## [urllib3](https://pypi.org/project/urllib3/)
Usage: Used to parse url
## [dnspython](https://pypi.org/project/dnspython/)
Usage: Used to get and parse DNS content
## [certifi](https://pypi.org/project/certifi/)
## [selenium](https://pypi.org/project/selenium/)
## [IP2Location](https://pypi.org/project/IP2Location/)
Usage: Used to get a proximate location related to IP/IP-range
## [Pillow](https://pypi.org/project/Pillow/)
## [OpenCV-Python](https://pypi.org/project/OpenCV-Python/)
## [Numpy](https://pypi.org/project/Numpy/)
## [cryptography](https://pypi.org/project/cryptography/)
## [pylint](https://pypi.org/project/pylint/)
## [packaging](https://pypi.org/project/packaging/)
Usage: Used to understand and compare software versions
## External Information Source(s):
### HTML Validation Test Sources:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements

### CSS Validation Test Sources:
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

### Software Test Sources:
- https://api.github.com/repos/{owner}/{repo}
- https://api.github.com/repos/{owner}/{repo}/contributors
- https://api.github.com/repos/{owner}/{repo}/{source}/{versions_dict[version][id]}/labels
- https://api.github.com/repos/{owner}/{repo}/{source}?state=closed&per_page=100
- https://cdn.datatables.net/releases.html
- https://httpd.apache.org/security/vulnerabilities_24.html
- https://learn.microsoft.com/en-us/lifecycle/products/internet-information-services-iis
- https://nginx.org/en/security_advisories.html
- https://nuget.optimizely.com/package/?id=EPiServer.Find
- https://openssl-library.org/news/vulnerabilities/
- https://openssl-library.org/policies/releasestrat/index.html
- https://spdx.org/licenses/
- https://svn.apache.org/viewvc/httpd/httpd/tags/
- https://wordpress.org/plugins/{name}/advanced/
- https://www.cvedetails.com/vulnerability-list.php?vendor_id=26&product_id=3427&page=1
- https://www.php.net/eol.php
- https://www.php.net/releases/

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,10 @@ Why not look at third parties.



# Credits

We could not do this without all help from contributors and other projects we use.

[Read more about them under credits](./CREDITS.md)


49 changes: 49 additions & 0 deletions credits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Credits
Following shows projects and contributors for webperf-core and its dependencies.
Many thanks to all of you! :D

## [lighthouse](https://www.npmjs.com/package/lighthouse)
Usage: Used in Google Lighthouse based Tests
License: Apache-2.0

## [pa11y](https://www.npmjs.com/package/pa11y)
Usage: Used in Accessibility (Pa11y) Test
License: LGPL-3.0-only

## [sitespeed.io](https://www.npmjs.com/package/sitespeed.io)
Usage: Used in the background in most cases where we need to visit website as browser
License: mit

## [vnu-jar](https://www.npmjs.com/package/vnu-jar)
Usage: Used in HTML and CSS Validation Test
License: mit

## [yellowlabtools](https://www.npmjs.com/package/yellowlabtools)
Usage: Used in Quality on frontend (Yellow Lab Tools) Test
License: GPL-2.0

## External Information Source(s):
### CSS Validation Test Sources:
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

### HTML Validation Test Sources:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements

### Software Test Sources:
- https://api.github.com/repos/{owner}/{repo}
- https://api.github.com/repos/{owner}/{repo}/{source}/{versions_dict[version][id]}/labels
- https://api.github.com/repos/{owner}/{repo}/{source}?state=closed&per_page=100
- https://cdn.datatables.net/releases.html
- https://httpd.apache.org/security/vulnerabilities_24.html
- https://learn.microsoft.com/en-us/lifecycle/products/internet-information-services-iis
- https://nginx.org/en/security_advisories.html
- https://nuget.optimizely.com/package/?id=EPiServer.Find
- https://openssl-library.org/news/vulnerabilities/
- https://openssl-library.org/policies/releasestrat/index.html
- https://spdx.org/licenses/
- https://svn.apache.org/viewvc/httpd/httpd/tags/
- https://wordpress.org/plugins/{name}/advanced/
- https://www.cvedetails.com/vulnerability-list.php?vendor_id=26&product_id=3427&page=1
- https://www.php.net/eol.php
- https://www.php.net/releases/

28 changes: 27 additions & 1 deletion default.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from engines.gov import write_tests as gov_write_tests
from engines.sql import write_tests as sql_write_tests
from engines.markdown_engine import write_tests as markdown_write_tests
from helpers.credits_helper import get_credits, update_credits_markdown
from helpers.setting_helper import config_mapping, get_config, set_config, set_config_from_cmd
from tests.utils import clean_cache_files
from utils import TEST_FUNCS, TEST_ALL, restart_failures_log, test_sites
Expand Down Expand Up @@ -173,6 +174,27 @@ class CommandLineOptions: # pylint: disable=too-many-instance-attributes,missing
def __init__(self):
self.language = False

def update_credits(self, _):
"""
Updated credits.md and prints out the webperf_core credits and exits the program.
This function uses the provided language function to print out webperf_core credits.
After printing the help text, it ends the program.
"""
update_credits_markdown(self.language)
sys.exit()

def show_credits(self, _):
"""
Prints out the webperf_core credits and exits the program.
This function uses the provided language function to print out webperf_core credits.
After printing the help text, it ends the program.
"""
creds = get_credits(self.language)
print(creds)
sys.exit()

def show_help(self, _):
"""
Prints out the command usage help text and exits the program.
Expand Down Expand Up @@ -485,6 +507,8 @@ def handle_option(self, opt, arg):
("--it", "--input-take"): self.set_input_take,
("-o", "--output"): self.set_output_filename,
("-r", "--review", "--report"): self.enable_reviews,
("-c", "--credits", "--contributors"): self.show_credits,
("--uc", "--update-credits"): self.update_credits,
("-s", "--setting"): self.set_setting,
("-ss", "--save-setting"): self.save_setting
}
Expand Down Expand Up @@ -521,10 +545,12 @@ def main(argv):
options.load_language(get_config('general.language'))

try:
opts, _ = getopt.getopt(argv, "hu:t:i:o:rA:D:L:s:", [
opts, _ = getopt.getopt(argv, "hu:t:i:o:rA:D:L:s:c", [
"help", "url=", "test=", "input=", "output=",
"review", "report", "addUrl=", "deleteUrl=",
"language=", "input-skip=", "input-take=",
"credits", "contributors",
"uc" ,"update-credits",
"is=", "it=", "setting=", "save-setting="])
except getopt.GetoptError:
print(main.__doc__)
Expand Down
Loading

0 comments on commit 6b31493

Please sign in to comment.