Skip to content

Commit 2f7400e

Browse files
hf-kkleinKonstantinlint-action
authored
ci: Add prettier workflow + format openapi.yml (#6)
* Create prettier.yml * openapi/openapi.yml: SyntaxError: Multi-line double-quoted string needs to be sufficiently indented (16:16) * openapi/openapi.yml: SyntaxError: Multi-line double-quoted string needs to be sufficiently indented (33:20) * two more of the same kind * prettier * Fix code style issues with Prettier * add comment --------- Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de> Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
1 parent 79e40db commit 2f7400e

4 files changed

Lines changed: 322 additions & 375 deletions

File tree

.github/workflows/prettier.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Prettier
2+
on: pull_request
3+
jobs:
4+
run-linters:
5+
name: Run Prettier and Autofix
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Check out Git repository
9+
uses: actions/checkout@v3
10+
- name: Set up Node.js
11+
uses: actions/setup-node@v3
12+
with:
13+
node-version: 20
14+
- name: Install Node.js dependencies
15+
run: npm install prettier
16+
- name: Run linters
17+
uses: wearerequired/lint-action@v2
18+
with:
19+
github_token: "${{ secrets.github_token }}"
20+
eslint: false
21+
prettier: true
22+
auto_fix: true
23+
eslint_args: --ignore-path .eslintignore

.github/workflows/python-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ name: Upload Python Package
99

1010
on:
1111
release:
12-
types: [ created, edited ]
12+
types: [created, edited]
1313

1414
jobs:
1515
tests:
1616
if: startsWith(github.ref, 'refs/tags/v')
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
python-version: [ "3.12" ]
21-
os: [ ubuntu-latest ]
20+
python-version: ["3.12"]
21+
os: [ubuntu-latest]
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
@@ -38,8 +38,8 @@ jobs:
3838
runs-on: ${{ matrix.os }}
3939
strategy:
4040
matrix:
41-
python-version: [ "3.12" ]
42-
os: [ ubuntu-latest ]
41+
python-version: ["3.12"]
42+
os: [ubuntu-latest]
4343
# Specifying a GitHub environment, # Specifying a GitHub environment, which is strongly recommended by PyPI: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
4444
# you have to create an environment in your repository settings and add the environment name here
4545
environment: release

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ We also maintain a [C#/.NET Version of this data model](https://github.com/Hochf
1515
It does not provide you with an HTTP client.
1616

1717
## Installation
18+
1819
Install it from [PyPI](https://pypi.org/project/maloident)
20+
1921
```bash
2022
pip install maloident
2123
```
@@ -38,16 +40,19 @@ The request payload type for the Lieferant➡️Netzbetreiber identification req
3840
See the [tests](unittests/test_models.py) for more examples.
3941

4042
## Project Structure
43+
4144
This project is based on [`datamodel-code-generator`](https://github.com/koxudaxi/datamodel-code-generator/).
4245
Most of the classes are autogenerated from the [`openapi.yml`](openapi/openapi.yml) which can be found on [SwaggerHub](https://app.swaggerhub.com/apis/edi-energy/MaLoIdent_2024-07-03/v1.0.0).
4346

4447
Note that we fixed some errors in the official OpenAPI spec.
4548
Our changes are mentioned at the beginning of the [`openapi.yml`](openapi/openapi.yml) file.
4649

4750
After updating the `openapi.yml` file, use
51+
4852
```bash
4953
tox -e codegen
5054
```
55+
5156
to re-generate the model classes.
5257

5358
## Contribute

0 commit comments

Comments
 (0)