Skip to content

Commit 7b4261c

Browse files
committed
Update copier
1 parent 94ef033 commit 7b4261c

9 files changed

+130
-199
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v2.0.1
2+
_commit: v2.0.3
33
_src_path: gh:lincc-frameworks/python-project-template
44
author_email: [email protected]
55
author_name: LINCC Frameworks

.github/ISSUE_TEMPLATE/1-bug_report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ assignees: ''
1313
Please check the following:
1414

1515
- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
16-
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
17-
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
16+
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
17+
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

.github/workflows/asv-main.yml

+45-78
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This workflow will run benchmarks with airspeed velocity (asv),
22
# store the new results in the "benchmarks" branch and publish them
33
# to a dashboard on GH Pages.
4-
54
name: Run ASV benchmarks for main
65

76
on:
@@ -10,92 +9,60 @@ on:
109

1110
env:
1211
PYTHON_VERSION: "3.10"
13-
WORKING_DIR: ${{ github.workspace }}/benchmarks
12+
ASV_VERSION: "0.6.4"
13+
WORKING_DIR: ${{github.workspace}}/benchmarks
1414

1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
16+
group: ${{github.workflow}}-${{github.ref}}
1717
cancel-in-progress: true
1818

1919
jobs:
20-
21-
setup-python:
22-
runs-on: ubuntu-latest
23-
24-
steps:
25-
- name: Cache Python ${{ env.PYTHON_VERSION }}
26-
uses: actions/cache@v4
27-
with:
28-
path: ~/.cache/pip
29-
key: python-${{ env.PYTHON_VERSION }}
30-
31-
- name: Set up Python ${{ env.PYTHON_VERSION }}
32-
uses: actions/setup-python@v5
33-
with:
34-
python-version: "${{ env.PYTHON_VERSION }}"
35-
3620
asv-main:
3721
runs-on: ubuntu-latest
38-
needs: setup-python
39-
4022
permissions:
4123
contents: write
42-
4324
defaults:
4425
run:
45-
working-directory: ${{ env.WORKING_DIR }}
46-
26+
working-directory: ${{env.WORKING_DIR}}
4727
steps:
48-
- name: Checkout main branch of the repository
49-
uses: actions/checkout@v4
50-
with:
51-
fetch-depth: 0
52-
53-
- name: Cache Python ${{ env.PYTHON_VERSION }}
54-
uses: actions/cache@v4
55-
with:
56-
path: ~/.cache/pip
57-
key: python-${{ env.PYTHON_VERSION }}
58-
59-
- name: Install dependencies
60-
run: |
61-
sudo apt-get update
62-
python -m pip install --upgrade pip
63-
pip install asv==0.6.1 virtualenv tabulate
64-
65-
- name: Configure git
66-
run: |
67-
git config user.name "github-actions[bot]"
68-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
69-
70-
- name: Create ASV machine config file
71-
run: asv machine --machine gh-runner --yes
72-
73-
- name: Fetch previous results from the "benchmarks" branch
74-
run: |
75-
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
76-
git merge origin/benchmarks \
77-
--allow-unrelated-histories \
78-
--no-commit
79-
mv ../_results .
80-
fi
81-
82-
- name: Run ASV for the main branch
83-
run: asv run ALL --skip-existing --verbose || true
84-
85-
- name: Submit new results to the "benchmarks" branch
86-
uses: JamesIves/github-pages-deploy-action@v4
87-
with:
88-
branch: benchmarks
89-
folder: ${{ env.WORKING_DIR }}/_results
90-
target-folder: _results
91-
92-
- name: Generate dashboard HTML
93-
run: |
94-
asv show
95-
asv publish
96-
97-
- name: Deploy to Github pages
98-
uses: JamesIves/github-pages-deploy-action@v4
99-
with:
100-
branch: gh-pages
101-
folder: ${{ env.WORKING_DIR }}/_html
28+
- name: Set up Python ${{env.PYTHON_VERSION}}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{env.PYTHON_VERSION}}
32+
- name: Checkout main branch of the repository
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
- name: Install dependencies
37+
run: pip install "asv[virtualenv]==${{env.ASV_VERSION}}"
38+
- name: Configure git
39+
run: |
40+
git config user.name "github-actions[bot]"
41+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+
- name: Create ASV machine config file
43+
run: asv machine --machine gh-runner --yes
44+
- name: Fetch previous results from the "benchmarks" branch
45+
run: |
46+
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
47+
git merge origin/benchmarks \
48+
--allow-unrelated-histories \
49+
--no-commit
50+
mv ../_results .
51+
fi
52+
- name: Run ASV for the main branch
53+
run: asv run ALL --skip-existing --verbose || true
54+
- name: Submit new results to the "benchmarks" branch
55+
uses: JamesIves/github-pages-deploy-action@v4
56+
with:
57+
branch: benchmarks
58+
folder: ${{env.WORKING_DIR}}/_results
59+
target-folder: _results
60+
- name: Generate dashboard HTML
61+
run: |
62+
asv show
63+
asv publish
64+
- name: Deploy to Github pages
65+
uses: JamesIves/github-pages-deploy-action@v4
66+
with:
67+
branch: gh-pages
68+
folder: ${{env.WORKING_DIR}}/_html

.github/workflows/asv-nightly.yml

+52-73
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This workflow will run daily at 06:45.
22
# It will run benchmarks with airspeed velocity (asv)
33
# and compare performance with the previous nightly build.
4-
54
name: Run benchmarks nightly job
65

76
on:
@@ -11,83 +10,63 @@ on:
1110

1211
env:
1312
PYTHON_VERSION: "3.10"
14-
WORKING_DIR: ${{ github.workspace }}/benchmarks
13+
ASV_VERSION: "0.6.4"
14+
WORKING_DIR: ${{github.workspace}}/benchmarks
1515
NIGHTLY_HASH_FILE: nightly-hash
1616

1717
jobs:
18-
1918
asv-nightly:
2019
runs-on: ubuntu-latest
21-
2220
defaults:
2321
run:
24-
working-directory: ${{ env.WORKING_DIR }}
25-
22+
working-directory: ${{env.WORKING_DIR}}
2623
steps:
27-
- name: Checkout main branch of the repository
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
32-
- name: Cache Python ${{ env.PYTHON_VERSION }}
33-
uses: actions/cache@v4
34-
with:
35-
path: ~/.cache/pip
36-
key: python-${{ env.PYTHON_VERSION }}
37-
38-
- name: Set up Python ${{ env.PYTHON_VERSION }}
39-
uses: actions/setup-python@v5
40-
with:
41-
python-version: "${{ env.PYTHON_VERSION }}"
42-
43-
- name: Install dependencies
44-
run: |
45-
sudo apt-get update
46-
python -m pip install --upgrade pip
47-
pip install asv==0.6.1 virtualenv
48-
49-
- name: Configure git
50-
run: |
51-
git config user.name "github-actions[bot]"
52-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
53-
54-
- name: Create ASV machine config file
55-
run: asv machine --machine gh-runner --yes
56-
57-
- name: Fetch previous results from the "benchmarks" branch
58-
run: |
59-
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
60-
git merge origin/benchmarks \
61-
--allow-unrelated-histories \
62-
--no-commit
63-
mv ../_results .
64-
fi
65-
66-
- name: Get nightly dates under comparison
67-
id: nightly-dates
68-
run: |
69-
echo "yesterday=$(date -d yesterday +'%Y-%m-%d')" >> $GITHUB_OUTPUT
70-
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
71-
72-
- name: Use last nightly commit hash from cache
73-
uses: actions/cache@v4
74-
with:
75-
path: ${{ env.WORKING_DIR }}
76-
key: nightly-results-${{ steps.nightly-dates.outputs.yesterday }}
77-
78-
- name: Run comparison of main against last nightly build
79-
run: |
80-
HASH_FILE=${{ env.NIGHTLY_HASH_FILE }}
81-
CURRENT_HASH=${{ github.sha }}
82-
if [ -f $HASH_FILE ]; then
83-
PREV_HASH=$(cat $HASH_FILE)
84-
asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
85-
asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
86-
fi
87-
echo $CURRENT_HASH > $HASH_FILE
88-
89-
- name: Update last nightly hash in cache
90-
uses: actions/cache@v4
91-
with:
92-
path: ${{ env.WORKING_DIR }}
93-
key: nightly-results-${{ steps.nightly-dates.outputs.today }}
24+
- name: Set up Python ${{env.PYTHON_VERSION}}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{env.PYTHON_VERSION}}
28+
- name: Checkout main branch of the repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
- name: Install dependencies
33+
run: pip install "asv[virtualenv]==${{env.ASV_VERSION}}"
34+
- name: Configure git
35+
run: |
36+
git config user.name "github-actions[bot]"
37+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+
- name: Create ASV machine config file
39+
run: asv machine --machine gh-runner --yes
40+
- name: Fetch previous results from the "benchmarks" branch
41+
run: |
42+
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
43+
git merge origin/benchmarks \
44+
--allow-unrelated-histories \
45+
--no-commit
46+
mv ../_results .
47+
fi
48+
- name: Get nightly dates under comparison
49+
id: nightly-dates
50+
run: |
51+
echo "yesterday=$(date -d yesterday +'%Y-%m-%d')" >> $GITHUB_OUTPUT
52+
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
53+
- name: Use last nightly commit hash from cache
54+
uses: actions/cache@v4
55+
with:
56+
path: ${{env.WORKING_DIR}}
57+
key: nightly-results-${{steps.nightly-dates.outputs.yesterday}}
58+
- name: Run comparison of main against last nightly build
59+
run: |
60+
HASH_FILE=${{env.NIGHTLY_HASH_FILE}}
61+
CURRENT_HASH=${{github.sha}}
62+
if [ -f $HASH_FILE ]; then
63+
PREV_HASH=$(cat $HASH_FILE)
64+
asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
65+
asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
66+
fi
67+
echo $CURRENT_HASH > $HASH_FILE
68+
- name: Update last nightly hash in cache
69+
uses: actions/cache@v4
70+
with:
71+
path: ${{env.WORKING_DIR}}
72+
key: nightly-results-${{steps.nightly-dates.outputs.today}}

0 commit comments

Comments
 (0)