Skip to content

Commit 0591e38

Browse files
author
Johannes Hötter
committed
kern -> refinery
1 parent 84414c4 commit 0591e38

File tree

11 files changed

+31
-23
lines changed

11 files changed

+31
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,4 @@ And please don't forget to leave a ⭐ if you like the work!
234234
Distributed under the MIT License. See LICENSE.txt for more information.
235235

236236
## Contact
237-
This library is developed and maintained by [kern.ai](https://github.com/code-kern-ai). If you want to provide us with feedback or have some questions, don't hesitate to contact us. We're super happy to help ✌️
237+
This library is developed and maintained by [Kern AI](https://github.com/code-kern-ai). If you want to provide us with feedback or have some questions, don't hesitate to contact us. We're super happy to help ✌️

kern/__init__.py renamed to refinery/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from wasabi import msg
44
import pandas as pd
5-
from kern import authentication, api_calls, settings, exceptions, util
5+
from refinery import authentication, api_calls, settings, exceptions, util
66
from typing import List, Optional, Dict
77
import json
88
import os.path
@@ -11,7 +11,7 @@
1111

1212

1313
class Client:
14-
"""Client object which can be used to directly address the Kern AI API.
14+
"""Client object which can be used to directly address the Kern AI refinery API.
1515
1616
Args:
1717
user_name (str): Your username (email) for the application.
@@ -49,7 +49,7 @@ def from_secrets_file(cls, path_to_file: str, project_id: Optional[str] = None):
4949
project_id (Optional[str], optional): The link to your project. This can be found in the URL in an active project. Defaults to None. In that case, it will read the project id from the file
5050
5151
Returns:
52-
kern.Client: Client object.
52+
refinery.Client: Client object.
5353
"""
5454
with open(path_to_file, "r") as file:
5555
content = json.load(file)
@@ -138,7 +138,7 @@ def get_record_export(
138138

139139
msg.info(f"Tokenizing data with spaCy '{tokenizer_package}'.")
140140
msg.info(
141-
"This will be provided from the server in future versions of Kern refinery."
141+
"This will be provided from the server in future versions of refinery."
142142
)
143143

144144
tqdm.pandas(desc="Applying tokenization locally")
File renamed without changes.

kern/adapter/rasa.py renamed to refinery/adapter/rasa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Any, List, Optional
44
import pandas as pd
55
import yaml
6-
from kern import Client, exceptions
6+
from refinery import Client, exceptions
77
from collections import OrderedDict
88

99
# https://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data

kern/api_calls.py renamed to refinery/api_calls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import json
33
from json.decoder import JSONDecodeError
44
import pkg_resources
5-
from kern import exceptions
5+
from refinery import exceptions
66
import requests
77
from typing import Any, Dict
88

99
try:
10-
version = pkg_resources.get_distribution("kern-sdk").version
10+
version = pkg_resources.get_distribution("refinery-python").version
1111
except pkg_resources.DistributionNotFound:
1212
version = "noversion"
1313

kern/authentication.py renamed to refinery/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
from kern import settings
2+
from refinery import settings
33
import requests
44

55

kern/cli.py renamed to refinery/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from kern import Client
1+
from refinery import Client
22
import sys
33
from wasabi import msg
44

@@ -17,35 +17,35 @@ def push(file_path):
1717

1818
def help():
1919
msg.info(
20-
"With the Kern refinery SDK, you can type commands as `kern <command>`. Currently, we provide the following:"
20+
"With the refinery SDK, you can type commands as `refinery <command>`. Currently, we provide the following:"
2121
)
2222
msg.info(
23-
"- kern pull: Download the record export of the project defined in `settings.json` to your local storage."
23+
"- refinery pull: Download the record export of the project defined in `settings.json` to your local storage."
2424
)
2525
msg.info(
26-
"- kern push <path>: Upload a record file to the project defined in `settings.json` from your local storage."
26+
"- refinery push <path>: Upload a record file to the project defined in `settings.json` from your local storage."
2727
)
2828

2929

3030
def main():
3131
cli_args = sys.argv[1:]
3232
if len(cli_args) == 0:
3333
msg.fail(
34-
"Please provide some arguments when running kern. Type `kern help` for some instructions."
34+
"Please provide some arguments when running the `refinery` command. Type `refinery help` for some instructions."
3535
)
3636
else:
3737
command = cli_args[0]
3838
if command == "pull":
3939
pull()
4040
elif command == "push":
4141
if len(cli_args) != 2:
42-
msg.fail("Please provide a path to a file when running kern push.")
42+
msg.fail("Please provide a path to a file when running refinery push.")
4343
else:
4444
file_path = cli_args[1]
4545
push(file_path)
4646
elif command == "help":
4747
help()
4848
else:
4949
msg.fail(
50-
f"Could not understand command `{command}`. Type `kern help` for some instructions."
50+
f"Could not understand command `{command}`. Type `refinery help` for some instructions."
5151
)

kern/exceptions.py renamed to refinery/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class UnknownItemError(LocalError):
1111
class APIError(Exception):
1212
def __init__(self, message: Optional[str] = None):
1313
if message is None:
14-
message = "Please check the SDK documentation at https://github.com/code-kern-ai/kern-python"
14+
message = "Please check the SDK documentation at https://github.com/code-kern-ai/refinery-python"
1515
super().__init__(message)
1616

1717

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)