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

pythonPackages.criticality-score: init at 1.0.7 #108794

Merged
merged 1 commit into from Feb 1, 2021

Conversation

wamserma
Copy link
Member

@wamserma wamserma commented Jan 8, 2021

Motivation for this change

Compute the criticality score of https://github.com/NixOS/nixpkgs.

Result:

criticality_score --repo github.com/NixOS/nixpkgs
name: nixpkgs
url: https://github.com/NixOS/nixpkgs
language: Nix
created_since: 217
updated_since: 0
contributor_count: 4790
org_count: 9
commit_frequency: 703.1
recent_releases_count: 6
updated_issues_count: 13120
closed_issues_count: 9727
comment_frequency: 2.0
dependents_count: 33204
criticality_score: 0.96204

Seems like nixpkgs is pretty important.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review pr 108794"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@wamserma
Copy link
Member Author

wamserma commented Jan 8, 2021

This PR includes #108792 which should be merged first.

@SuperSandro2000
Copy link
Member

This PR includes #108792 which should be merged first.

Next time just include it in this.

@@ -1426,6 +1426,8 @@ in {

credstash = callPackage ../development/python-modules/credstash { };

criticality_score = callPackage ../development/python-modules/criticality_score { };
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
criticality_score = callPackage ../development/python-modules/criticality_score { };
criticality-score = callPackage ../development/python-modules/criticality-score { };

Python packages need to follow the pep that converts _ to -.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the review. Updated PR.


# tests are not included in pypi distributions and would require lots of
# optional dependencies
doCheck = true;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
doCheck = true;
doCheck = true;
pythonImportsCheck = [ "criticality_score" ];

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the review. Updated PR.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108794 run on x86_64-darwin 1

17 packages built:
  • cligh
  • mathlibtools (python38Packages.mathlibtools)
  • python37Packages.PyGithub
  • python37Packages.criticality_score
  • python37Packages.howdoi
  • python37Packages.keep
  • python37Packages.mathlibtools
  • python38Packages.PyGithub
  • python38Packages.criticality_score
  • python38Packages.howdoi
  • python38Packages.keep
  • python39Packages.PyGithub
  • python39Packages.criticality_score
  • python39Packages.howdoi
  • python39Packages.keep
  • python39Packages.mathlibtools
  • sourcehut.dispatchsrht

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.criticality_score:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python37Packages.keep:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.criticality_score:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.keep:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.criticality_score:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.keep:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

@wamserma
Copy link
Member Author

This PR includes #108792 which should be merged first.

Next time just include it in this.

The bump was required to make this run, but also has some downstream packages so I split it off into an own PR.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 15, 2021

The bump was required to make this run, but also has some downstream packages so I split it off into an own PR.

Fine for me.

Can you please add disableCheck for criticality_score because there are not tests to run.

Also I merged the blocking PR.

@wamserma wamserma marked this pull request as ready for review February 1, 2021 15:43
@wamserma
Copy link
Member Author

wamserma commented Feb 1, 2021

@SuperSandro2000 Thanks, updated.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108794 run on x86_64-darwin 1

3 packages built:
  • python37Packages.criticality-score
  • python38Packages.criticality-score
  • python39Packages.criticality-score

@SuperSandro2000 SuperSandro2000 changed the title pythonPackages.criticality_score: init at 1.0.7 pythonPackages.criticality-score: init at 1.0.7 Feb 1, 2021
@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108794 run on x86_64-linux 1

3 packages built:
  • python37Packages.criticality-score
  • python38Packages.criticality-score
  • python39Packages.criticality-score

@SuperSandro2000 SuperSandro2000 merged commit dab863e into NixOS:master Feb 1, 2021
@wamserma wamserma deleted the ossf-criticality-score branch February 2, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants