Skip to content

Commit 5089619

Browse files
Remove Sulu
1 parent 0a96d03 commit 5089619

File tree

14 files changed

+19
-229
lines changed

14 files changed

+19
-229
lines changed

.env.template

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Sulu API Key. Get yours at https://platform.sulu.sh/portal/consumer/dashboard
2-
# Subscribe here: https://platform.sulu.sh/apis/judge0
3-
JUDGE0_SULU_API_KEY=
4-
51
# Rapid API Key. Get yours at https://rapidapi.com/developer/apps
62
# Subscribe here: https://rapidapi.com/organization/judge0
73
JUDGE0_RAPID_API_KEY=

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
env: # Add necessary api keys as env variables.
3333
JUDGE0_ATD_API_KEY: ${{ secrets.JUDGE0_ATD_API_KEY }}
3434
JUDGE0_RAPID_API_KEY: ${{ secrets.JUDGE0_RAPID_API_KEY }}
35-
JUDGE0_SULU_API_KEY: ${{ secrets.JUDGE0_SULU_API_KEY }}
3635
JUDGE0_CE_AUTH_HEADERS: ${{ secrets.JUDGE0_CE_AUTH_HEADERS }}
3736
JUDGE0_EXTRA_CE_AUTH_HEADERS: ${{ secrets.JUDGE0_EXTRA_CE_AUTH_HEADERS }}
3837
JUDGE0_CE_ENDPOINT: ${{ secrets.JUDGE0_CE_ENDPOINT }}

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ pip install judge0
3232

3333
### Getting The API Key
3434

35-
Get your API key from [Sulu](https://platform.sulu.sh/apis/judge0), [Rapid](https://rapidapi.com/organization/judge0), or [ATD](https://www.allthingsdev.co/publisher/profile/Herman%20Zvonimir%20Do%C5%A1ilovi%C4%87).
35+
Get your API key from [Rapid](https://rapidapi.com/organization/judge0), or [ATD](https://www.allthingsdev.co/publisher/profile/Herman%20Zvonimir%20Do%C5%A1ilovi%C4%87).
3636

3737
#### Notes
3838

39-
* [**Recommended**] Choose Sulu if you need pay-as-you-go (pey-per-use) pricing.
40-
* Choose Rapid or ATD if you need a quota-based (volume-based) plan.
41-
* Judge0 has two flavors: Judge0 CE and Judge0 Extra CE, and their difference is just in the languages they support. When choosing Sulu, your API key will work for both flavors, but for Rapid and ATD you will need to explicitly subscribe to both flavors if you want to use both.
39+
* Judge0 has two flavors: Judge0 CE and Judge0 Extra CE, and their difference is just in the languages they support. When choosing Rapid and ATD you will need to explicitly subscribe to both flavors if you want to use both.
4240

4341
### Using Your API Key
4442

@@ -48,21 +46,20 @@ Explicitly create a client object with your API key and pass it to Judge0 Python
4846

4947
```python
5048
import judge0
51-
client = judge0.SuluJudge0CE(api_key="xxx")
49+
client = judge0.RapidJudge0CE(api_key="xxx")
5250
result = judge0.run(client=client, source_code="print('hello, world')")
5351
print(result.stdout)
5452
```
5553

5654
Other options include:
5755
- `judge0.RapidJudge0CE`
5856
- `judge0.ATDJudge0CE`
59-
- `judge0.SuluJudge0ExtraCE`
6057
- `judge0.RapidJudge0ExtraCE`
6158
- `judge0.ATDJudge0ExtraCE`
6259

6360
#### Option 2: Implicit Client Object
6461

65-
Put your API key in one of the following environment variables, respectable to the provider that issued you the API key: `JUDGE0_SULU_API_KEY`, `JUDGE0_RAPID_API_KEY`, or `JUDGE0_ATD_API_KEY`.
62+
Put your API key in one of the following environment variables, respectable to the provider that issued you the API key: `JUDGE0_RAPID_API_KEY`, or `JUDGE0_ATD_API_KEY`.
6663

6764
Judge0 Python SDK will automatically detect the environment variable and use it to create a client object that will be used for all API calls if you do not explicitly pass a client object.
6865

docs/source/api/clients.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,3 @@ Clients Module
3535

3636
.. autoclass:: judge0.clients.RapidJudge0ExtraCE
3737
:show-inheritance:
38-
39-
.. autoclass:: judge0.clients.Sulu
40-
:show-inheritance:
41-
42-
.. autoclass:: judge0.clients.SuluJudge0CE
43-
:show-inheritance:
44-
45-
.. autoclass:: judge0.clients.SuluJudge0ExtraCE
46-
:show-inheritance:

docs/source/contributors_guide/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Testing
5252

5353
.. warning::
5454
If you are implementing features or fixing bugs, you are expected to have
55-
all of the three API keys (ATD, Sulu, and RapidAPI) setup and set in you
56-
environment variables - ``JUDGE0_SULU_API_KEY``, ``JUDGE0_RAPID_API_KEY``,
55+
all API keys (RapidAPI and ATD) setup and set in you
56+
environment variables - ``JUDGE0_RAPID_API_KEY``,
5757
and ``JUDGE0_ATD_API_KEY``.
5858

5959
Every bug fix or new feature should have tests for it. The tests are located in

examples/sulu_clients.py

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

examples/sulu_submission.py

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

examples/sulu_submissions.py

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

src/judge0/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
Rapid,
2626
RapidJudge0CE,
2727
RapidJudge0ExtraCE,
28-
Sulu,
29-
SuluJudge0CE,
30-
SuluJudge0ExtraCE,
3128
)
3229
from .filesystem import File, Filesystem
3330
from .retry import MaxRetries, MaxWaitTime, RegularPeriodRetry
@@ -55,9 +52,6 @@
5552
"RegularPeriodRetry",
5653
"Status",
5754
"Submission",
58-
"Sulu",
59-
"SuluJudge0CE",
60-
"SuluJudge0ExtraCE",
6155
"TestCase",
6256
"async_execute",
6357
"async_run",
@@ -111,7 +105,7 @@ def _get_implicit_client(flavor: Flavor) -> Client:
111105
return client
112106

113107

114-
def _get_preview_client(flavor: Flavor) -> Union[SuluJudge0CE, SuluJudge0ExtraCE]:
108+
def _get_preview_client(flavor: Flavor) -> Union[Judge0CloudCE, Judge0CloudExtraCE]:
115109
logger.warning(
116110
"You are using a preview version of the client which is not recommended"
117111
" for production.\n"

src/judge0/clients.py

Lines changed: 4 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class Client:
2323
----------
2424
API_KEY_ENV : str
2525
Environment variable where judge0-python should look for API key for
26-
the client. Set to default values for ATD, RapidAPI, and Sulu clients.
26+
the client. Set to default values for RapidAPI and ATD clients.
2727
"""
2828

2929
# Environment variable where judge0-python should look for API key for
30-
# the client. Set to default values for ATD, RapidAPI, and Sulu clients.
30+
# the client. Set to default values for RapidAPI and ATD clients.
3131
API_KEY_ENV: ClassVar[str] = None
3232

3333
def __init__(
@@ -649,72 +649,6 @@ def __init__(self, api_key, **kwargs):
649649
)
650650

651651

652-
class Sulu(Client):
653-
"""Base class for all Sulu clients.
654-
655-
Parameters
656-
----------
657-
endpoint : str
658-
Default request endpoint.
659-
api_key : str, optional
660-
Sulu API key.
661-
**kwargs : dict
662-
Additional keyword arguments for the base Client.
663-
"""
664-
665-
API_KEY_ENV: ClassVar[str] = "JUDGE0_SULU_API_KEY"
666-
667-
def __init__(self, endpoint, api_key=None, **kwargs):
668-
self.api_key = api_key
669-
super().__init__(
670-
endpoint,
671-
{"Authorization": f"Bearer {api_key}"} if api_key else None,
672-
**kwargs,
673-
)
674-
675-
676-
class SuluJudge0CE(Sulu):
677-
"""Sulu client for CE flavor.
678-
679-
Parameters
680-
----------
681-
api_key : str, optional
682-
Sulu API key.
683-
**kwargs : dict
684-
Additional keyword arguments for the base Client.
685-
"""
686-
687-
DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-ce.p.sulu.sh"
688-
HOME_URL: ClassVar[str] = "https://sparkhub.sulu.sh/apis/judge0/judge0-ce/readme"
689-
690-
def __init__(self, api_key=None, **kwargs):
691-
super().__init__(
692-
self.DEFAULT_ENDPOINT,
693-
api_key,
694-
**kwargs,
695-
)
696-
697-
698-
class SuluJudge0ExtraCE(Sulu):
699-
"""Sulu client for Extra CE flavor.
700-
701-
Parameters
702-
----------
703-
api_key : str
704-
Sulu API key.
705-
**kwargs : dict
706-
Additional keyword arguments for the base Client.
707-
"""
708-
709-
DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-extra-ce.p.sulu.sh"
710-
HOME_URL: ClassVar[str] = (
711-
"https://sparkhub.sulu.sh/apis/judge0/judge0-extra-ce/readme"
712-
)
713-
714-
def __init__(self, api_key=None, **kwargs):
715-
super().__init__(self.DEFAULT_ENDPOINT, api_key, **kwargs)
716-
717-
718652
class Judge0Cloud(Client):
719653
"""Base class for all Judge0 Cloud clients.
720654
@@ -787,5 +721,5 @@ def __init__(self, auth_headers=None, **kwargs):
787721
super().__init__(self.DEFAULT_ENDPOINT, auth_headers, **kwargs)
788722

789723

790-
CE = (Judge0CloudCE, SuluJudge0CE, RapidJudge0CE, ATDJudge0CE)
791-
EXTRA_CE = (Judge0CloudExtraCE, SuluJudge0ExtraCE, RapidJudge0ExtraCE, ATDJudge0ExtraCE)
724+
CE = (Judge0CloudCE, RapidJudge0CE, ATDJudge0CE)
725+
EXTRA_CE = (Judge0CloudExtraCE, RapidJudge0ExtraCE, ATDJudge0ExtraCE)

0 commit comments

Comments
 (0)