Skip to content

Commit

Permalink
Try codeflash (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Jul 24, 2024
1 parent 6044d99 commit f0c9229
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/codeflash-optimize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Codeflash

Check warning on line 1 in .github/workflows/codeflash-optimize.yaml

View workflow job for this annotation

GitHub Actions / linting

1:1 [document-start] missing document start "---"

on:
push:
branches:
- main
- renovate/**
pull_request:
workflow_dispatch:

jobs:
optimize:
name: Optimize new code in this PR
runs-on: ubuntu-latest
env:
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
steps:
- name: Check if PR is from Codeflash bot
id: bot_check
run: |-
echo "Checking if this PR is created by Codeflash bot..."
if [ "${{ github.event.pull_request.user.login }}" == "codeflash-ai[bot]" ]; then

Check failure on line 23 in .github/workflows/codeflash-optimize.yaml

View workflow job for this annotation

GitHub Actions / linting

23:81 [line-length] line too long (91 > 80 characters)
echo "PR created by Codeflash bot. Skipping optimization."
echo "skip_remaining_steps=yes" >> $GITHUB_OUTPUT
else
echo "skip_remaining_steps=no" >> $GITHUB_OUTPUT
echo "It's not. Proceeding with the optimization."
fi
- uses: actions/checkout@v4
if: steps.bot_check.outputs.skip_remaining_steps == 'no'
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
if: steps.bot_check.outputs.skip_remaining_steps == 'no'
uses: actions/setup-python@v5
with:
cache-dependency-path: pyproject.toml
cache: pip
python-version: 3.12

- name: Install Project Dependencies
if: steps.bot_check.outputs.skip_remaining_steps == 'no'
run: >-
python -m pip install -e .; python -m pip install codeflash
- name: Run Codeflash to optimize code
if: steps.bot_check.outputs.skip_remaining_steps == 'no'
id: optimize_code
run: codeflash
6 changes: 3 additions & 3 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ wavelets are built upon the eigenfunctions of the Slepian concentration problem
of the manifold [@Slepian1961; @Landau1961; @Landau1962]: a set of bandlimited
functions that are maximally concentrated within a given region. Wavelets are
constructed through a tiling of the Slepian harmonic line by leveraging the
existing scale-discretised framework [@Wiaux2008; @Leistedt2013]. Whilst these wavelets
were inspired by spherical datasets, like in cosmology, the wavelet construction
may be utilised for manifold or graph data.
existing scale-discretised framework [@Wiaux2008; @Leistedt2013]. Whilst these
wavelets were inspired by spherical datasets, like in cosmology, the wavelet
construction may be utilised for manifold or graph data.

To the author's knowledge, there is no public software that allows one to
compute Slepian wavelets (or a similar approach) on the sphere or general
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ ignore = [
"src/sleplet/_version.py",
]

[tool.codeflash]
ignore-paths = []
# All paths are relative to this pyproject.toml's directory.
module-root = "src"
test-framework = "pytest"
tests-root = "tests"

[tool.coverage]
report = {skip_covered = true, sort = "cover"}
run = {branch = true, parallel = true, source = [
Expand Down

0 comments on commit f0c9229

Please sign in to comment.