Skip to content

Commit

Permalink
Add scorecard and link to documentation in README (#21)
Browse files Browse the repository at this point in the history
* Adds Scorecard GitHub action.

Signed-off-by: rafa-be <[email protected]>

* Updates README to link to the public documentation.

Signed-off-by: rafa-be <[email protected]>

* Bump version number

Signed-off-by: rafa-be <[email protected]>

* Adds a Scorecard badge.

Signed-off-by: rafa-be <[email protected]>

---------

Signed-off-by: rafa-be <[email protected]>
  • Loading branch information
rafa-be authored Nov 1, 2024
1 parent 15402e3 commit 2e932b7
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 8 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '26 18 * * 0'
push:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
</p>

<p align="center">
<a href="https://citi.github.io/parfun/">
<img src="https://img.shields.io/badge/read%20our%20documentation-0f1632">
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/citi/parfun?label=license&colorA=0f1632&colorB=255be3">
<img src="https://img.shields.io/github/license/citi/parfun?label=license&colorA=0f1632&colorB=255be3">
</a>
<a href="https://pypi.org/project/parfun/">
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/parfun?colorA=0f1632&colorB=255be3">
</a>
<img src="https://api.securityscorecards.dev/projects/github.com/Citi/parfun/badge">
</p>
</div>

Expand Down Expand Up @@ -43,6 +47,7 @@ def list_pow(values: List[float], factor: float) -> List[float]:
return [v**factor for v in values]
```


## Features

* **Provides significant speedups** to existing Python functions
Expand All @@ -64,19 +69,21 @@ When running a short 0.28-second ML function on an AMD Epyc 7313 16-Cores Proces


## Quick Start
The built-in Sphinx documentation contains detailed usage instructions, implementation details, and an exhaustive
API reference.

Use the `doc` Make target to build the HTML documentation from the source code:
The official documentation is availaible at [citi.github.io/parfun/](https://citi.github.io/parfun/).

Alternatively, you can build the HTML documentation from the source code:

```bash
make doc
cd docs
pip install -r requirements.txt
make html
```

The documentation's main page can then ben found at `docs/build/html/index.html`.

Take a look at our documentation's [quickstart tutorial](./docs/build/html/tutorials/quickstart.html) to get more
examples and a deeper overview of the library.
Take a look at our documentation's [quickstart tutorial](https://citi.github.io/parfun/tutorials/quickstart.html) to get
more examples and a deeper overview of the library.


## Contributing
Expand Down
2 changes: 1 addition & 1 deletion parfun/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "7.0.4"
__version__ = "7.0.5"

0 comments on commit 2e932b7

Please sign in to comment.