Skip to content

Commit 3cbb34a

Browse files
Migrate from fishjam-dev to fishjam-cloud organization (#1)
* Migrate from fishjam-dev to fishjam-cloud organization * Fix CI * Rename membrane-clound -> fishjam-cloud * feat/cluster health report (#2) * feat: cluster health report * Refactor github workflow * Refactor github workflow --------- Co-authored-by: Kamil Kołodziej <[email protected]>
1 parent 50b2035 commit 3cbb34a

17 files changed

+370
-198
lines changed

.circleci/config.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
8+
runs-on: ubuntu-latest
9+
name: lint
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: 3.8
16+
- name: Install poetry
17+
run: pip install poetry
18+
- name: Install project dependencies
19+
run: poetry install --no-ansi --with=dev
20+
- name: Lint
21+
run: poetry run lint
22+
- name: Check format
23+
run: poetry run format_check
24+
25+
test:
26+
runs-on: ubuntu-latest
27+
name: test
28+
steps:
29+
- uses: actions/checkout@v4
30+
- run: docker compose -f docker-compose-test.yaml up test --exit-code-from test
31+
- run: docker compose -f docker-compose-test.yaml down
32+
- run: docker compose -f docker-compose-test.yaml up examples --exit-code-from examples

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "protos"]
22
path = protos
3-
url = https://github.com/fishjam-dev/protos.git
3+
url = https://github.com/fishjam-cloud/protos.git

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Fishjam Python Server SDK
22

3-
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/fishjam-dev/python-server-sdk/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/fishjam-dev/python-server-sdk/tree/main)
3+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/fishjam-cloud/python-server-sdk/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/fishjam-cloud/python-server-sdk/tree/main)
44

5-
Python server SDK for the [Fishjam Media Server](https://github.com/fishjam-dev/fishjam).
5+
Python server SDK for the [Fishjam Media Server](https://github.com/fishjam-cloud/fishjam).
66

7-
Read the docs [here](https://fishjam-dev.github.io/python-server-sdk)
7+
Read the docs [here](https://fishjam-cloud.github.io/python-server-sdk)
88

99
## Installation
1010

@@ -55,7 +55,7 @@ All methods in `RoomApi` may raise one of the exceptions deriving from `fishjam.
5555

5656
Notifier allows for receiving real-time updates from the Fishjam Server.
5757

58-
You can read more about notifications in the [Fishjam Docs](https://fishjam-dev.github.io/fishjam-docs/next/getting_started/notifications).
58+
You can read more about notifications in the [Fishjam Docs](https://fishjam-cloud.github.io/fishjam-docs/next/getting_started/notifications).
5959

6060
Create `Notifier` instance
6161
```python
@@ -141,6 +141,13 @@ You can check linter by running
141141
poetry run lint
142142
```
143143

144+
## Documentation
145+
Documentation is generated via openapi-python-client.
146+
147+
To update documentation you need to:
148+
- in `poetry_scripts.py` change branch from which openapi.yaml should be downloaded
149+
- run `poetry run update-client`
150+
144151
## Copyright and License
145152

146153
Copyright 2023, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=fishjam)

docker-compose-test.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
version: "3"
2-
31
services:
42
fishjam:
5-
image: "ghcr.io/fishjam-dev/fishjam:${TAG:-edge}"
3+
image: "ghcr.io/fishjam-cloud/fishjam:${TAG:-edge}"
64
container_name: fishjam
75
restart: on-failure
86
healthcheck:

fishjam/_openapi_client/models/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from .component_options_file import ComponentOptionsFile
99
from .component_options_hls import ComponentOptionsHLS
1010
from .component_options_hls_subscribe_mode import ComponentOptionsHLSSubscribeMode
11+
from .component_options_hlss3_credentials import ComponentOptionsHLSS3Credentials
1112
from .component_options_recording import ComponentOptionsRecording
13+
from .component_options_recording_s3_credentials import (
14+
ComponentOptionsRecordingS3Credentials,
15+
)
1216
from .component_options_recording_subscribe_mode import (
1317
ComponentOptionsRecordingSubscribeMode,
1418
)
@@ -33,9 +37,9 @@
3337
from .dial_config import DialConfig
3438
from .error import Error
3539
from .health_report import HealthReport
36-
from .health_report_distribution import HealthReportDistribution
37-
from .health_report_status import HealthReportStatus
3840
from .healthcheck_response import HealthcheckResponse
41+
from .node_status import NodeStatus
42+
from .node_status_status import NodeStatusStatus
3943
from .peer import Peer
4044
from .peer_details_response import PeerDetailsResponse
4145
from .peer_details_response_data import PeerDetailsResponseData
@@ -63,8 +67,10 @@
6367
"ComponentHLS",
6468
"ComponentOptionsFile",
6569
"ComponentOptionsHLS",
70+
"ComponentOptionsHLSS3Credentials",
6671
"ComponentOptionsHLSSubscribeMode",
6772
"ComponentOptionsRecording",
73+
"ComponentOptionsRecordingS3Credentials",
6874
"ComponentOptionsRecordingSubscribeMode",
6975
"ComponentOptionsRTSP",
7076
"ComponentOptionsSIP",
@@ -84,8 +90,8 @@
8490
"Error",
8591
"HealthcheckResponse",
8692
"HealthReport",
87-
"HealthReportDistribution",
88-
"HealthReportStatus",
93+
"NodeStatus",
94+
"NodeStatusStatus",
8995
"Peer",
9096
"PeerDetailsResponse",
9197
"PeerDetailsResponseData",

fishjam/_openapi_client/models/component_options_hls.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
from ..types import UNSET, Unset
1010

1111
if TYPE_CHECKING:
12-
from ..models.s3_credentials import S3Credentials
12+
from ..models.component_options_hlss3_credentials import (
13+
ComponentOptionsHLSS3Credentials,
14+
)
1315

1416

1517
T = TypeVar("T", bound="ComponentOptionsHLS")
@@ -23,7 +25,7 @@ class ComponentOptionsHLS:
2325
"""Whether the component should use LL-HLS"""
2426
persistent: Union[Unset, bool] = False
2527
"""Whether the video is stored after end of stream"""
26-
s3: Union[Unset, None, "S3Credentials"] = UNSET
28+
s3: Union[Unset, None, "ComponentOptionsHLSS3Credentials"] = UNSET
2729
"""An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are provided"""
2830
subscribe_mode: Union[
2931
Unset, ComponentOptionsHLSSubscribeMode
@@ -67,21 +69,23 @@ def to_dict(self) -> Dict[str, Any]:
6769
@classmethod
6870
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
6971
"""@private"""
70-
from ..models.s3_credentials import S3Credentials
72+
from ..models.component_options_hlss3_credentials import (
73+
ComponentOptionsHLSS3Credentials,
74+
)
7175

7276
d = src_dict.copy()
7377
low_latency = d.pop("lowLatency", UNSET)
7478

7579
persistent = d.pop("persistent", UNSET)
7680

7781
_s3 = d.pop("s3", UNSET)
78-
s3: Union[Unset, None, S3Credentials]
82+
s3: Union[Unset, None, ComponentOptionsHLSS3Credentials]
7983
if _s3 is None:
8084
s3 = None
8185
elif isinstance(_s3, Unset):
8286
s3 = UNSET
8387
else:
84-
s3 = S3Credentials.from_dict(_s3)
88+
s3 = ComponentOptionsHLSS3Credentials.from_dict(_s3)
8589

8690
_subscribe_mode = d.pop("subscribeMode", UNSET)
8791
subscribe_mode: Union[Unset, ComponentOptionsHLSSubscribeMode]
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
from typing import Any, Dict, List, Type, TypeVar
2+
3+
from attrs import define as _attrs_define
4+
from attrs import field as _attrs_field
5+
6+
T = TypeVar("T", bound="ComponentOptionsHLSS3Credentials")
7+
8+
9+
@_attrs_define
10+
class ComponentOptionsHLSS3Credentials:
11+
"""An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are
12+
provided
13+
14+
"""
15+
16+
access_key_id: str
17+
"""An AWS access key identifier, linked to your AWS account."""
18+
bucket: str
19+
"""The name of the S3 bucket where your data will be stored."""
20+
region: str
21+
"""The AWS region where your bucket is located."""
22+
secret_access_key: str
23+
"""The secret key that is linked to the Access Key ID."""
24+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
25+
"""@private"""
26+
27+
def to_dict(self) -> Dict[str, Any]:
28+
"""@private"""
29+
access_key_id = self.access_key_id
30+
bucket = self.bucket
31+
region = self.region
32+
secret_access_key = self.secret_access_key
33+
34+
field_dict: Dict[str, Any] = {}
35+
field_dict.update(self.additional_properties)
36+
field_dict.update(
37+
{
38+
"accessKeyId": access_key_id,
39+
"bucket": bucket,
40+
"region": region,
41+
"secretAccessKey": secret_access_key,
42+
}
43+
)
44+
45+
return field_dict
46+
47+
@classmethod
48+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
49+
"""@private"""
50+
d = src_dict.copy()
51+
access_key_id = d.pop("accessKeyId")
52+
53+
bucket = d.pop("bucket")
54+
55+
region = d.pop("region")
56+
57+
secret_access_key = d.pop("secretAccessKey")
58+
59+
component_options_hlss3_credentials = cls(
60+
access_key_id=access_key_id,
61+
bucket=bucket,
62+
region=region,
63+
secret_access_key=secret_access_key,
64+
)
65+
66+
component_options_hlss3_credentials.additional_properties = d
67+
return component_options_hlss3_credentials
68+
69+
@property
70+
def additional_keys(self) -> List[str]:
71+
"""@private"""
72+
return list(self.additional_properties.keys())
73+
74+
def __getitem__(self, key: str) -> Any:
75+
return self.additional_properties[key]
76+
77+
def __setitem__(self, key: str, value: Any) -> None:
78+
self.additional_properties[key] = value
79+
80+
def __delitem__(self, key: str) -> None:
81+
del self.additional_properties[key]
82+
83+
def __contains__(self, key: str) -> bool:
84+
return key in self.additional_properties

fishjam/_openapi_client/models/component_options_recording.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
from ..types import UNSET, Unset
1010

1111
if TYPE_CHECKING:
12-
from ..models.s3_credentials import S3Credentials
12+
from ..models.component_options_recording_s3_credentials import (
13+
ComponentOptionsRecordingS3Credentials,
14+
)
1315

1416

1517
T = TypeVar("T", bound="ComponentOptionsRecording")
@@ -19,7 +21,7 @@
1921
class ComponentOptionsRecording:
2022
"""Options specific to the Recording component"""
2123

22-
credentials: Union[Unset, None, "S3Credentials"] = UNSET
24+
credentials: Union[Unset, None, "ComponentOptionsRecordingS3Credentials"] = UNSET
2325
"""An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are provided"""
2426
path_prefix: Union[Unset, None, str] = UNSET
2527
"""Path prefix under which all recording are stored"""
@@ -56,17 +58,19 @@ def to_dict(self) -> Dict[str, Any]:
5658
@classmethod
5759
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
5860
"""@private"""
59-
from ..models.s3_credentials import S3Credentials
61+
from ..models.component_options_recording_s3_credentials import (
62+
ComponentOptionsRecordingS3Credentials,
63+
)
6064

6165
d = src_dict.copy()
6266
_credentials = d.pop("credentials", UNSET)
63-
credentials: Union[Unset, None, S3Credentials]
67+
credentials: Union[Unset, None, ComponentOptionsRecordingS3Credentials]
6468
if _credentials is None:
6569
credentials = None
6670
elif isinstance(_credentials, Unset):
6771
credentials = UNSET
6872
else:
69-
credentials = S3Credentials.from_dict(_credentials)
73+
credentials = ComponentOptionsRecordingS3Credentials.from_dict(_credentials)
7074

7175
path_prefix = d.pop("pathPrefix", UNSET)
7276

0 commit comments

Comments
 (0)