Skip to content

Commit 2088d62

Browse files
#21: Changed mentions of master to main (#39)
* change mentions of master to main
1 parent 3f8df02 commit 2088d62

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ In any case, you need to verify your UDFs with integrations test inside the data
1010

1111
## Getting started
1212

13+
**Attention:** We changed the default branch to main and the master branch is deprecated.
14+
1315
### Installing via pip
1416
```
15-
pip install git+https://github.com/exasol/udf-mock-python.git@master
17+
pip install git+https://github.com/exasol/udf-mock-python.git@main
1618
```
1719

1820
### Installing via poetry
1921
Add it to your `tool.poetry.dependencies` or `tool.poetry.dev-dependencies`
2022

2123
```
2224
[tool.poetry.dev-dependencies]
23-
exasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "master" }
25+
exasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "main" }
2426
...
2527
```
2628

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ In any case, you need to verify your UDFs with integrations test inside the data
1313
Getting started
1414
---------------
1515

16+
**Attention:** We changed the default branch to main and the master branch is deprecated.
17+
1618
Installing via pip
1719
^^^^^^^^^^^^^^^^^^
1820

1921
.. code-block::
2022
21-
pip install git+https://github.com/exasol/udf-mock-python.git@master
23+
pip install git+https://github.com/exasol/udf-mock-python.git@main
2224
2325
Installing via poetry
2426
^^^^^^^^^^^^^^^^^^^^^
@@ -28,7 +30,7 @@ Add it to your ``tool.poetry.dependencies`` or ``tool.poetry.dev-dependencies``
2830
.. code-block::
2931
3032
[tool.poetry.dev-dependencies]
31-
exasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "master" }
33+
exasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "main" }
3234
...
3335
3436
How to use the Mock

githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ set -o pipefail
66
REPO_DIR=$(git rev-parse --show-toplevel)
77
GITHOOKS_PATH="$REPO_DIR/githooks"
88
pushd "$REPO_DIR"
9-
bash "$GITHOOKS_PATH/prohibit_commit_to_master.sh"
9+
bash "$GITHOOKS_PATH/prohibit_commit_to_main.sh"
1010
bash "$GITHOOKS_PATH/update_setup_py.sh"
1111
popd

githooks/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
protected_branches=( master )
2+
protected_branches=( main )
33
for i in "${protected_branches[@]}"
44
do
55

githooks/prohibit_commit_to_master.sh

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

33
branch="$(git rev-parse --abbrev-ref HEAD)"
44

5-
if [ "$branch" = "master" ]; then
6-
echo "You can't commit directly to master branch"
5+
if [ "$branch" = "main" ]; then
6+
echo "You can't commit directly to main branch"
77
exit 1
88
fi

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'name': 'exasol-udf-mock-python',
1515
'version': '0.1.0',
1616
'description': 'Mocking framework for Exasol Python UDFs',
17-
'long_description': '# UDF Mock for Python\n\nThis projects provides a mock runner for Python3 UDFs which allows you\nto test your UDFs locally without a database.\n\n**Note:** This project is in a very early development phase.\nPlease, be aware that the behavior of the mock runner doesn\'t perfectly\nreflect the behaviors of the UDFs inside the database and that the interface still can change.\nIn any case, you need to verify your UDFs with integrations test inside the database.\n\n## Getting started\n\n### Installing via pip\n```\npip install git+https://github.com/exasol/udf-mock-python.git@master\n```\n\n### Installing via poetry\nAdd it to your `tool.poetry.dependencies` or `tool.poetry.dev-dependencies`\n\n```\n[tool.poetry.dev-dependencies]\nexasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "master" }\n...\n```\n\n### How to use the Mock\n\nThe mock runner runs your python UDF in a python environment in which\nno external variables, functions or classes are visble.\nThis means in practice, you can only use things you defined inside your\nUDF and what gets provided by the UDF frameworks,\nsuch as exa.meta and the context for the run function.\nThis includes imports, variables, functions, classes and so on.\n\nYou define a UDF in this framework within in a wrapper function.\nThis wrapper function then contains all necessary imports, functions,\nvariables and classes.\nYou then handover the wrapper function to the `UDFMockExecutor`\nwhich runs the UDF inside if the isolated python environment.\nThe following example shows, how you use this framework:\nThe following example shows the general setup for a test with the Mock:\n\n```\ndef udf_wrapper():\n\n def run(ctx):\n return ctx.t1+1, ctx.t2+1.1, ctx.t3+"1"\n\nexecutor = UDFMockExecutor()\nmeta = MockMetaData(\n script_code_wrapper_function=udf_wrapper,\n input_type="SCALAR",\n input_columns=[Column("t1", int, "INTEGER"),\n Column("t2", float, "FLOAT"),\n Column("t3", str, "VARCHAR(20000)")],\n output_type="RETURNS",\n output_columns=[Column("t1", int, "INTEGER"),\n Column("t2", float, "FLOAT"),\n Column("t3", str, "VARCHAR(20000)")]\n)\nexa = MockExaEnvironment(meta)\nresult = executor.run([Group([(1,1.0,"1"), (5,5.0,"5"), (6,6.0,"6")])], exa)\n```\n\n**Checkout the [tests](tests) for more information about, how to use the Mock.**\n\n## Limitations or missing features\n\nSome of the following limitations are fundamental, other are missing\nfeature and might get removed by later releases:\n\n- Data type checks for outputs are more strict as in real UDFs\n- No support for Import or Export Specification or Virtual Schema adapter\n- No support for dynamic input and output parameters\n- No support for exa.import_script\n- No BucketFS\n- Execution is not isolated in a container\n - Can access and manipulate the file system of the system running the Mock\n - UDF inside of the database only can write /tmp to tmp and\n only see the file system of the script-language container and the mounted bucketfs\n - Can use all python package available in the system running the Mock\n - If you use package which are currently not available in the script-language containers,\n you need create your own container for testing inside of the database\n - Does not emulate the ressource limitations which get a applied in the database\n- Only one instance of the UDF gets executed\n- No support for Python2, because Python2 is officially End of Life\n',
17+
'long_description': '# UDF Mock for Python\n\nThis projects provides a mock runner for Python3 UDFs which allows you\nto test your UDFs locally without a database.\n\n**Note:** This project is in a very early development phase.\nPlease, be aware that the behavior of the mock runner doesn\'t perfectly\nreflect the behaviors of the UDFs inside the database and that the interface still can change.\nIn any case, you need to verify your UDFs with integrations test inside the database.\n\n## Getting started\n\n**Attention:** We changed the default branch to main and the master branch is deprecated.\n\n### Installing via pip\n```\npip install git+https://github.com/exasol/udf-mock-python.git@main\n```\n\n### Installing via poetry\nAdd it to your `tool.poetry.dependencies` or `tool.poetry.dev-dependencies`\n\n```\n[tool.poetry.dev-dependencies]\nexasol-udf-mock-python = { git = "https://github.com/exasol/udf-mock-python.git", branch = "main" }\n...\n```\n\n### How to use the Mock\n\nThe mock runner runs your python UDF in a python environment in which\nno external variables, functions or classes are visble.\nThis means in practice, you can only use things you defined inside your\nUDF and what gets provided by the UDF frameworks,\nsuch as exa.meta and the context for the run function.\nThis includes imports, variables, functions, classes and so on.\n\nYou define a UDF in this framework within in a wrapper function.\nThis wrapper function then contains all necessary imports, functions,\nvariables and classes.\nYou then handover the wrapper function to the `UDFMockExecutor`\nwhich runs the UDF inside if the isolated python environment.\nThe following example shows, how you use this framework:\nThe following example shows the general setup for a test with the Mock:\n\n```\ndef udf_wrapper():\n\n def run(ctx):\n return ctx.t1+1, ctx.t2+1.1, ctx.t3+"1"\n\nexecutor = UDFMockExecutor()\nmeta = MockMetaData(\n script_code_wrapper_function=udf_wrapper,\n input_type="SCALAR",\n input_columns=[Column("t1", int, "INTEGER"),\n Column("t2", float, "FLOAT"),\n Column("t3", str, "VARCHAR(20000)")],\n output_type="RETURNS",\n output_columns=[Column("t1", int, "INTEGER"),\n Column("t2", float, "FLOAT"),\n Column("t3", str, "VARCHAR(20000)")]\n)\nexa = MockExaEnvironment(meta)\nresult = executor.run([Group([(1,1.0,"1"), (5,5.0,"5"), (6,6.0,"6")])], exa)\n```\n\n**Checkout the [tests](tests) for more information about, how to use the Mock.**\n\n## Limitations or missing features\n\nSome of the following limitations are fundamental, other are missing\nfeature and might get removed by later releases:\n\n- Data type checks for outputs are more strict as in real UDFs\n- No support for Import or Export Specification or Virtual Schema adapter\n- No support for dynamic input and output parameters\n- No support for exa.import_script\n- No BucketFS\n- Execution is not isolated in a container\n - Can access and manipulate the file system of the system running the Mock\n - UDF inside of the database only can write /tmp to tmp and\n only see the file system of the script-language container and the mounted bucketfs\n - Can use all python package available in the system running the Mock\n - If you use package which are currently not available in the script-language containers,\n you need create your own container for testing inside of the database\n - Does not emulate the ressource limitations which get a applied in the database\n- Only one instance of the UDF gets executed\n- No support for Python2, because Python2 is officially End of Life\n',
1818
'author': 'Torsten Kilias',
1919
'author_email': 'torsten.kilias@exasol.com',
2020
'maintainer': None,

0 commit comments

Comments
 (0)