-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors produced by formatter and linter migration
This commit is mainly the result of running `pre-commit run --all-files` with the previous changes in the formatter and linter. There is some additional manual changes to fix linebreaks.
- Loading branch information
1 parent
bf53b22
commit 11d8aad
Showing
57 changed files
with
1,350 additions
and
1,603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
name: cd | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
jobs: | ||
|
||
validate-release-tag: | ||
validate-release-tag: | ||
|
||
if: github.repository == 'aiidateam/aiida-restapi' | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'aiidateam/aiida-restapi' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Validate the tag version against the package version | ||
run: python .github/workflows/validate_release_tag.py $GITHUB_REF | ||
- name: Validate the tag version against the package version | ||
run: python .github/workflows/validate_release_tag.py $GITHUB_REF | ||
|
||
publish: | ||
publish: | ||
|
||
name: Publish to PyPI | ||
needs: [validate-release-tag] | ||
runs-on: ubuntu-latest | ||
name: Publish to PyPI | ||
needs: [validate-release-tag] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install flit | ||
run: pip install flit~=3.4 | ||
- name: Install flit | ||
run: pip install flit~=3.4 | ||
|
||
- name: Build and publish | ||
run: flit publish | ||
env: | ||
FLIT_USERNAME: __token__ | ||
FLIT_PASSWORD: ${{ secrets.pypi_token }} | ||
- name: Build and publish | ||
run: flit publish | ||
env: | ||
FLIT_USERNAME: __token__ | ||
FLIT_PASSWORD: ${{ secrets.pypi_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,73 +4,73 @@ on: [push, pull_request] | |
|
||
jobs: | ||
|
||
pre-commit: | ||
pre-commit: | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- uses: pre-commit/[email protected] | ||
- uses: pre-commit/[email protected] | ||
|
||
tests: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11'] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11'] | ||
|
||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_DB: test_db | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_DB: test_db | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e .[testing,auth] | ||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e .[testing,auth] | ||
- name: Run test suite | ||
env: | ||
- name: Run test suite | ||
env: | ||
# show timings of tests | ||
PYTEST_ADDOPTS: "--durations=0" | ||
AIIDA_WARN_v3: true | ||
run: pytest --cov aiida_restapi --cov-report=xml | ||
PYTEST_ADDOPTS: --durations=0 | ||
AIIDA_WARN_v3: true | ||
run: pytest --cov aiida_restapi --cov-report=xml | ||
|
||
- name: Upload to Codecov | ||
if: matrix.python-version == 3.8 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
name: pytests | ||
flags: pytests | ||
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
- name: Upload to Codecov | ||
if: matrix.python-version == 3.8 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
name: pytests | ||
flags: pytests | ||
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.