Skip to content

Commit

Permalink
Merge branch 'master' into unmute_result_type_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana authored Feb 8, 2024
2 parents 95e923a + d45bb24 commit 29b2f87
Show file tree
Hide file tree
Showing 56 changed files with 4,326 additions and 1,760 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
28 changes: 17 additions & 11 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ github.token }}

Expand All @@ -52,7 +52,7 @@ jobs:
echo "$GITHUB_CONTEXT"
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
docker-images: false

Expand Down Expand Up @@ -86,13 +86,13 @@ jobs:
sudo apt-get install -y nvidia-cuda-toolkit clinfo
- name: Checkout repo
uses: actions/checkout@v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

# https://github.com/marketplace/actions/setup-miniconda
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ env.python-ver }}
Expand All @@ -103,7 +103,7 @@ jobs:
- name: Install sphinx dependencies
run: |
conda install sphinx sphinx_rtd_theme
pip install sphinxcontrib-googleanalytics
pip install sphinxcontrib-googleanalytics==0.4
- name: Install dpnp dependencies
run: |
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
# https://github.com/marketplace/actions/doxygen-action
- name: Build backend docs
uses: mattnotmitt/doxygen-action@v1.9.5
uses: mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
with:
working-directory: 'dpnp/backend/doc'

Expand All @@ -146,7 +146,7 @@ jobs:
# The step is only used to build docs while pushing a PR to "master"
- name: Deploy docs
if: env.GH_EVENT_PUSH_UPSTREAM
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}
Expand All @@ -159,7 +159,7 @@ jobs:
# The step is only used to build docs while pushing to PR branch
- name: Publish pull-request docs
if: env.GH_EVENT_OPEN_PR_UPSTREAM
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}
Expand All @@ -176,7 +176,7 @@ jobs:
if: env.GH_EVENT_OPEN_PR_UPSTREAM
env:
PR_NUM: ${{ github.event.number }}
uses: mshick/add-pr-comment@v2.8.1
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
with:
message: |
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
Expand All @@ -190,10 +190,16 @@ jobs:
needs: build-and-deploy

permissions:
# Needed to remove docs for closed pull request from the repo
contents: write
# Needed to modify a comment in the pull request's issue
pull-requests: write

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

Expand All @@ -212,7 +218,7 @@ jobs:
git push tokened_docs gh-pages
- name: Modify the comment with URL to official documentation
uses: mshick/add-pr-comment@v2.8.1
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
with:
find: |
View rendered docs @.+
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout DPNP repo
uses: actions/checkout@v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
Expand All @@ -105,7 +105,7 @@ jobs:
run: conda install conda-build=3.28.4

- name: Cache conda packages
uses: actions/cache@v4
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand All @@ -120,7 +120,7 @@ jobs:
run: conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe

- name: Upload artifact
uses: actions/upload-artifact@v4.3.0
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:

steps:
- name: Download artifact
uses: actions/download-artifact@v4.1.1
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.pkg-path-in-channel }}
Expand All @@ -164,7 +164,7 @@ jobs:
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'

- name: Cache conda packages
uses: actions/cache@v4
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:

steps:
- name: Download artifact
uses: actions/download-artifact@v4.1.1
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.pkg-path-in-channel }}
Expand All @@ -274,7 +274,7 @@ jobs:
dir ${{ env.extracted-pkg-path }}
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
run: more lockfile

- name: Cache conda packages
uses: actions/cache@v4
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand Down Expand Up @@ -388,12 +388,12 @@ jobs:
steps:
- name: Download artifact
uses: actions/download-artifact@v4.1.1
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}

- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
Expand All @@ -416,7 +416,7 @@ jobs:
run:
shell: bash -el {0}
steps:
- uses: conda-incubator/setup-miniconda@v3.0.1
- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
run-post: false
channel-priority: "disabled"
Expand All @@ -427,7 +427,7 @@ jobs:
run: conda install anaconda-client

- name: Checkout repo
uses: actions/checkout@v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: IntelPython/devops-tools
fetch-depth: 0
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout repo
uses: actions/checkout@v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.1
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
with:
auto-update-conda: true
python-version: ${{ env.python-ver }}
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Build dpnp with coverage
id: build_coverage
uses: nick-fields/retry@v2.9.0
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
shell: bash
timeout_minutes: 60
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Install coverall dependencies
run: |
sudo gem install coveralls-lcov
pip install coveralls==3.2.0
pip install coveralls==3.3.1
- name: Upload coverage data to coveralls.io
run: |
Expand All @@ -102,7 +102,7 @@ jobs:
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
pip3 install --upgrade coveralls==3.3.1
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

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: '28 2 * * 1'
- cron: '28 2 * * 4'
push:
branches: [ "master" ]

# 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: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
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

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: SARIF file
path: results.sarif
retention-days: 14

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
sudo ln -s /usr/bin/clang-format-12 /usr/bin/clang-format
clang-format --version
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,11 @@ repos:
hooks:
- id: clang-format
args: ["-i"]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Conda package](https://github.com/IntelPython/dpnp/actions/workflows/conda-package.yml/badge.svg?branch=master&event=push)](https://github.com/IntelPython/dpnp/actions/workflows/conda-package.yml)
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/dpnp/badge.svg?branch=master)](https://coveralls.io/github/IntelPython/dpnp?branch=master)
[![Build Sphinx](https://github.com/IntelPython/dpnp/workflows/Build%20Sphinx/badge.svg)](https://intelpython.github.io/dpnp)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/dpnp/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/dpnp)

# DPNP - Data Parallel Extension for NumPy*
[API coverage summary](https://intelpython.github.io/dpnp/reference/comparison.html#summary)
Expand Down
Loading

0 comments on commit 29b2f87

Please sign in to comment.