Skip to content

Commit 4588222

Browse files
committed
chore: added a contribute readme
1 parent ad6e3ae commit 4588222

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CONTRIBUTE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Contributing to the APEx Dispatch API
2+
3+
## Registration of a new platform implementation
4+
5+
To add a new platform implementation, you will need to create a new class that inherits from the `BasePlatform` class located at [`app/platforms/base.py`](app/platforms/base.py). In this new class, you will need to implement all the abstract methods defined in the [`BasePlatform`](app/platforms/base.py) class. This will ensure that your new platform implementation adheres to the expected interface and functionality.
6+
7+
To register the new implementation, it is important to add the following directive right above the class definition:
8+
9+
```python
10+
from app.platforms.dispatcher import register_platform
11+
from app.schemas.enum import ProcessTypeEnum
12+
13+
@register_platform(ProcessTypeEnum.OGC_API_PROCESS)
14+
```
15+
16+
The processing type is the unique identifier for the platform implementation. It is used to distinguish between different platform implementations in the system. This value is used by the different request endpoints to determine which platform implementation to use for processing the request. To add a new platform implementation, you will need to define a new `ProcessTypeEnum` value in the [`app/schemas/enum.py`](app/schemas/enum.py) file. This value should be unique and descriptive of the platform you are implementing.
17+
18+
Once you have completed the above steps, the new platform implementation will be registered automatically and made available for use in the APEx Dispatch API. You can then proceed to implement the specific functionality required for your platform.

0 commit comments

Comments
 (0)