Skip to content

Commit

Permalink
pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshuone6 committed Sep 19, 2022
1 parent 381aca7 commit 0054efe
Show file tree
Hide file tree
Showing 143 changed files with 5,247 additions and 1,516 deletions.
20 changes: 10 additions & 10 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
component_depth: 2
languages:
- name: python
production:
exclude:
- /docs
- /examples
- /input
- /scripts
test:
include:
- /tests
- name: python
production:
exclude:
- /docs
- /examples
- /input
- /scripts
test:
include:
- /tests
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ blank_issues_enabled: true
contact_links:
- name: I'm unsure where to go
url: https://www.pybamm.org/contact
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ body:
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
description: Add any other context or screenshots about the feature request here.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Please add a line in the relevant section of [CHANGELOG.md](https://github.com/p
- [ ] Optimization (back-end change that speeds up the code)
- [ ] Bug fix (non-breaking change which fixes an issue)


# Key checklist:

- [ ] No style issues: `$ flake8`
Expand Down
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignore:
- pybamm/parameters_cli.py
- pybamm/install_odes.py
- pybamm/install_odes.py
3 changes: 2 additions & 1 deletion .github/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- Run `scripts/update_version.py` to

- Increment version number in
- `pybamm/version.py`
- `docs/conf.py`
Expand All @@ -8,4 +9,4 @@
- Update `CHANGELOG.md` with a summary of the release

- Update jax and jaxlib to latest version in `pybamm.util` and fix any bugs that arise
- If building wheels on Windows gives a `vcpkg` related error - revert the baseline of default-registry to a stable commit in `vcpkg-configuration.json`
- If building wheels on Windows gives a `vcpkg` related error - revert the baseline of default-registry to a stable commit in `vcpkg-configuration.json`
62 changes: 31 additions & 31 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ jobs:
python-version: [3.8]

steps:
- uses: actions/checkout@v3

- name: Get current date
run: |
echo "VERSION=$(date +'v%y.%-m')" >> $GITHUB_ENV
echo "TODAY=$(date +'%d')" >> $GITHUB_ENV
- name: Fail the job if date < 20
if: env.TODAY < 20
uses: actions/github-script@v5
with:
script: core.setFailed('This workflow should be triggered only at the end of the month, or else it will create a release for the wrong month.')

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install wheel
pip install --editable .
- name: Get Changelog
run: python -c "from scripts.update_version import get_changelog; get_changelog()"

- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
body_path: CHANGELOG.md
- uses: actions/checkout@v3

- name: Get current date
run: |
echo "VERSION=$(date +'v%y.%-m')" >> $GITHUB_ENV
echo "TODAY=$(date +'%d')" >> $GITHUB_ENV
- name: Fail the job if date < 20
if: env.TODAY < 20
uses: actions/github-script@v5
with:
script: core.setFailed('This workflow should be triggered only at the end of the month, or else it will create a release for the wrong month.')

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install wheel
pip install --editable .
- name: Get Changelog
run: python -c "from scripts.update_version import get_changelog; get_changelog()"

- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
body_path: CHANGELOG.md
9 changes: 4 additions & 5 deletions .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ jobs:
git commit -am "Add new results"
git push
- name: Publish results
run:
|
asv publish
git fetch origin gh-pages:gh-pages
asv gh-pages
run: |
asv publish
git fetch origin gh-pages:gh-pages
asv gh-pages
7 changes: 2 additions & 5 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
inputs:
target:
description: 'Deployment target. Can be "pypi" or "testpypi"'
default: 'pypi'
default: "pypi"

jobs:
build_windows_wheels:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ENVIRONMENT: "PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=$cd/vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static-md VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR=\"Visual Studio 17 2022\" CMAKE_GENERATOR_PLATFORM=x64"
CIBW_ENVIRONMENT: 'PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=$cd/vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static-md VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64'
CIBW_ARCHS: "AMD64"

- name: Upload windows wheels
Expand All @@ -56,7 +56,6 @@ jobs:
path: ./wheelhouse/*.whl
if-no-files-found: error


build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -103,7 +102,6 @@ jobs:
path: ./wheelhouse/*.whl
if-no-files-found: error


build_sdist:
name: Build sdist
runs-on: ubuntu-latest
Expand All @@ -130,7 +128,6 @@ jobs:
path: ./dist/*.tar.gz
if-no-files-found: error


publish_pypi:
name: Upload package to PyPI
needs: [build_wheels, build_windows_wheels, build_sdist]
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/run_benchmarks_over_history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
workflow_dispatch:
inputs:
commit_start:
description: 'Identifier of commit from which to start'
default: 'v0.1.0'
description: "Identifier of commit from which to start"
default: "v0.1.0"
commit_end:
description: 'Identifier of commit at which to end'
default: 'develop'
description: "Identifier of commit at which to end"
default: "develop"
ncommits:
description: 'Number of commits to benchmark between commit_start and commit_end'
default: '100'
description: "Number of commits to benchmark between commit_start and commit_end"
default: "100"
jobs:
benchmarks:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,9 +80,7 @@ jobs:
git commit -am "Add new results"
git push
- name: Publish results
run:
|
asv publish
git fetch origin gh-pages:gh-pages
asv gh-pages

run: |
asv publish
git fetch origin gh-pages:gh-pages
asv gh-pages
Loading

0 comments on commit 0054efe

Please sign in to comment.