Skip to content

Commit 60f32ed

Browse files
Copilotgonzalocasas
andcommitted
Fix linting errors and remove IronPython CI workflow
Co-authored-by: gonzalocasas <[email protected]>
1 parent c648c88 commit 60f32ed

File tree

3 files changed

+21
-44
lines changed

3 files changed

+21
-44
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,6 @@ jobs:
2727
run: |
2828
pytest tests/unit
2929
30-
build-ironpython:
31-
name: windows-ironpython
32-
runs-on: windows-latest
33-
steps:
34-
- uses: actions/checkout@v2
35-
- name: Install dependencies
36-
shell: cmd
37-
run: |
38-
curl -o compas.tar.gz -LJO https://pypi.debian.net/compas/latest
39-
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
40-
choco install ironpython --version=2.7.8.1
41-
ipy -X:Frames -m ensurepip
42-
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
43-
44-
rem untar and rename, these cannot be installed using ironpip because they not longer have a setup.py
45-
tar -xf compas.tar.gz && for /d %%i in (compas-*) do ren "%%i" compas
46-
47-
- name: Run tests
48-
env:
49-
IRONPYTHONPATH: ./src;./compas/src
50-
run: |
51-
ipy -m pytest tests/unit
52-
5330
integration_tests:
5431
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
5532
runs-on: 'ubuntu-latest'

src/compas_eve/codecs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131

3232
class ProtobufMessageCodec(MessageCodec):
3333
"""Protocol Buffers codec for message serialization.
34-
34+
3535
This codec uses the compas_pb package to encode and decode message data
3636
using Protocol Buffers binary format.
37-
37+
3838
Note
3939
----
4040
This codec requires the ``compas_pb`` package to be installed.
@@ -52,12 +52,12 @@ def __init__(self):
5252

5353
def encode(self, data):
5454
"""Encode data to Protocol Buffers binary format.
55-
55+
5656
Parameters
5757
----------
5858
data : dict
5959
Data dictionary to encode.
60-
60+
6161
Returns
6262
-------
6363
bytes
@@ -72,12 +72,12 @@ def encode(self, data):
7272

7373
def decode(self, encoded_data):
7474
"""Decode Protocol Buffers binary data to data dictionary.
75-
75+
7676
Parameters
7777
----------
7878
encoded_data : bytes
7979
Protocol Buffers binary data to decode.
80-
80+
8181
Returns
8282
-------
8383
dict

src/compas_eve/core.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
class MessageCodec(object):
88
"""Abstract base class for message codecs.
9-
9+
1010
A codec is responsible for encoding and decoding message data
1111
to/from a specific representation format (e.g., JSON, Protocol Buffers).
1212
"""
1313

1414
def encode(self, data):
1515
"""Encode data to the codec's representation format.
16-
16+
1717
Parameters
1818
----------
1919
data : dict
2020
Data dictionary to encode.
21-
21+
2222
Returns
2323
-------
2424
bytes or str
@@ -28,12 +28,12 @@ def encode(self, data):
2828

2929
def decode(self, encoded_data):
3030
"""Decode data from the codec's representation format.
31-
31+
3232
Parameters
3333
----------
3434
encoded_data : bytes or str
3535
Encoded data to decode.
36-
36+
3737
Returns
3838
-------
3939
dict
@@ -44,19 +44,19 @@ def decode(self, encoded_data):
4444

4545
class JsonMessageCodec(MessageCodec):
4646
"""JSON codec for message serialization.
47-
47+
4848
This codec uses the COMPAS framework's JSON serialization functions
4949
to encode and decode message data.
5050
"""
5151

5252
def encode(self, data):
5353
"""Encode data to JSON string.
54-
54+
5555
Parameters
5656
----------
5757
data : dict
5858
Data dictionary to encode.
59-
59+
6060
Returns
6161
-------
6262
str
@@ -66,12 +66,12 @@ def encode(self, data):
6666

6767
def decode(self, encoded_data):
6868
"""Decode JSON string to data dictionary.
69-
69+
7070
Parameters
7171
----------
7272
encoded_data : str
7373
JSON string to decode.
74-
74+
7575
Returns
7676
-------
7777
dict
@@ -107,11 +107,11 @@ def set_default_transport(transport):
107107

108108
class Transport(object):
109109
"""Defines the base interface for different transport implementations.
110-
110+
111111
Parameters
112112
----------
113113
codec : :class:`MessageCodec`, optional
114-
The codec to use for encoding and decoding messages.
114+
The codec to use for encoding and decoding messages.
115115
If not provided, defaults to :class:`JsonMessageCodec`.
116116
"""
117117

@@ -213,13 +213,13 @@ def _message_to_data(self, message):
213213
Normally, this method expects sub-classes of Message as input.
214214
However, it can deal with regular dictionaries as well as classes
215215
implementing the COMPAS data framework.
216-
216+
217217
Parameters
218218
----------
219219
message : :class:`Message` or dict or object
220-
Message to convert. Can be a Message instance, a dict, or
220+
Message to convert. Can be a Message instance, a dict, or
221221
an object implementing __data__.
222-
222+
223223
Returns
224224
-------
225225
dict

0 commit comments

Comments
 (0)