Skip to content

Commit d735c49

Browse files
author
Diptorup Deb
authored
Merge pull request #1429 from IntelPython/release0.23
Merge 0.23rc1 into gold/2021
2 parents 70bc8f2 + 223df44 commit d735c49

File tree

277 files changed

+8361
-12920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+8361
-12920
lines changed

.flake8

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ exclude =
1919
.git,
2020
__pycache__,
2121
_version.py,
22-
versioneer.py,
2322
lowerer.py,
2423
parfor.py
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: "Setup Miniconda"
2+
description: "Wrapper around conda-incubator/setup-miniconda to cache lock files."
3+
inputs:
4+
python-version:
5+
description: "Refer conda-incubator/setup-miniconda."
6+
required: false
7+
default: ""
8+
activate-environment:
9+
description: "Refer conda-incubator/setup-miniconda."
10+
required: false
11+
default: "test"
12+
environment-file:
13+
description: "Refer conda-incubator/setup-miniconda."
14+
required: false
15+
default: ""
16+
channels:
17+
description: "Refer conda-incubator/setup-miniconda."
18+
required: false
19+
default: ""
20+
channel-priority:
21+
description: "Refer conda-incubator/setup-miniconda, default changed to 'disabled'."
22+
required: false
23+
default: "disabled"
24+
run-post:
25+
description: "Refer conda-incubator/setup-miniconda, default changed to 'false'."
26+
required: false
27+
default: "false"
28+
cache-number:
29+
description: "Increase this value to reset cache if env file has not changed."
30+
required: false
31+
default: "-3"
32+
dependencies:
33+
description: "List of packages separated by ; to use in environment file."
34+
required: false
35+
default: ""
36+
runs:
37+
using: "composite"
38+
steps:
39+
- name: Get Date
40+
id: get-date
41+
shell: bash
42+
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
43+
44+
- name: Generate channels hash
45+
id: channels-hash
46+
shell: bash
47+
run: echo "hash=$(echo '${{inputs.channels}}' | sha1sum | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
48+
49+
- name: Write dependencies
50+
if: inputs.dependencies != ''
51+
shell: bash
52+
run: |
53+
printf "dependencies:;${{inputs.dependencies}}" | sed 's/;/\n - /g' > \
54+
${{inputs.environment-file}}
55+
56+
- name: Cache Conda env
57+
uses: actions/cache@v4
58+
with:
59+
# TODO: use channels as part of the key
60+
path: ${{inputs.environment-file}}.lock
61+
key: setup-miniconda-${{ runner.os }}-${{ runner.arch }}-${{
62+
inputs.python-version }}-${{
63+
steps.get-date.outputs.today }}-${{
64+
steps.channels-hash.hash }}-${{
65+
hashFiles(inputs.environment-file) }}-${{
66+
inputs.cache-number }}
67+
id: cache
68+
69+
- name: Setup miniconda
70+
if: steps.cache.outputs.cache-hit != 'true'
71+
uses: conda-incubator/setup-miniconda@v3
72+
with:
73+
python-version: ${{ inputs.python-version }}
74+
activate-environment: ${{inputs.activate-environment}}
75+
channels: ${{ inputs.channels }}
76+
channel-priority: ${{ inputs.channel-priority }}
77+
environment-file: ${{ inputs.environment-file }}
78+
run-post: ${{ inputs.run-post }}
79+
80+
- name: Save environment resolution
81+
if: steps.cache.outputs.cache-hit != 'true'
82+
shell: bash -l {0}
83+
run: conda list --explicit > ${{inputs.activate-environment}}.lock
84+
85+
- name: Setup conda
86+
if: steps.cache.outputs.cache-hit == 'true'
87+
uses: conda-incubator/setup-miniconda@v3
88+
with:
89+
activate-environment: ${{inputs.activate-environment}}
90+
channels: ${{ inputs.channels }}
91+
environment-file: ${{inputs.activate-environment}}.lock
92+
run-post: ${{ inputs.run-post }}
93+
94+
- name: Disable defaults
95+
shell: bash -l {0}
96+
run: conda config --remove channels defaults

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/black.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
push:
1010
branches: [main]
1111

12+
permissions: read-all
13+
1214
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1315
jobs:
1416
# This workflow contains a single job called "black"
@@ -19,9 +21,9 @@ jobs:
1921
# Steps represent a sequence of tasks that will be executed as part of the job
2022
steps:
2123
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2325
# Set up a Python environment for use in actions
24-
- uses: actions/setup-python@v2
26+
- uses: actions/setup-python@v5
2527

2628
# Run black code formatter
2729
- uses: psf/black@stable

0 commit comments

Comments
 (0)