diff --git a/corebridge/__init__.py b/corebridge/__init__.py index a8d4557..6a9beea 100644 --- a/corebridge/__init__.py +++ b/corebridge/__init__.py @@ -1 +1 @@ -__version__ = "0.3.5" +__version__ = "0.4.0" diff --git a/corebridge/core.py b/corebridge/core.py index e8c1582..79f9599 100644 --- a/corebridge/core.py +++ b/corebridge/core.py @@ -314,10 +314,12 @@ class AICoreModuleBase: # %% ../nbs/00_core.ipynb 56 @patch -def __init__(self:AICoreModuleBase, - save_dir:str, # path where the module can keep files - assets_dir:str, # path to support files (scripts, metadata, etc) - *args, **kwargs): +def __init__( + self:AICoreModuleBase, + save_dir:str, # path where the module can keep files + assets_dir:str, # path to support files (scripts, metadata, etc) + *args, **kwargs + ): self.init_time = datetime.datetime.now(datetime.UTC) self.aicorebridge_version = __version__ diff --git a/nbs/00_core.ipynb b/nbs/00_core.ipynb index 1e5c3d2..327a188 100644 --- a/nbs/00_core.ipynb +++ b/nbs/00_core.ipynb @@ -195,7 +195,7 @@ " dtype='datetime64[ns, Europe/Berlin]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -413,7 +413,7 @@ "2023-05-04 10:44:53+00:00 16.55" ] }, - "execution_count": null, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -449,7 +449,7 @@ " dtype='datetime64[ns, UTC]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -516,7 +516,7 @@ "2023-05-04 12:44:53+02:00 16.55" ] }, - "execution_count": null, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -552,7 +552,7 @@ " dtype='datetime64[ns, Europe/Amsterdam]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -616,7 +616,7 @@ " dtype='datetime64[ns, Europe/Amsterdam]', freq='s')" ] }, - "execution_count": null, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -639,7 +639,7 @@ " dtype='object')" ] }, - "execution_count": null, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -662,7 +662,7 @@ " dtype='datetime64[ns, UTC+02:00]', freq=None)" ] }, - "execution_count": null, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -682,7 +682,7 @@ "Index(['2018-04-10T07:01:01Z', '2018-04-10T07:01:02Z', '2018-04-10T07:01:03Z'], dtype='object')" ] }, - "execution_count": null, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -726,7 +726,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "111 ms ± 1.17 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" + "116 ms ± 1.28 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" ] } ], @@ -744,7 +744,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "75.3 ms ± 261 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" + "76.5 ms ± 338 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" ] } ], @@ -871,7 +871,7 @@ "2023-05-04 10:44:53+00:00 NaN" ] }, - "execution_count": null, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -914,7 +914,7 @@ " dtype='datetime64[ns, UTC]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -986,7 +986,7 @@ "2023-05-04 10:44:53+00:00 NaN" ] }, - "execution_count": null, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -1029,7 +1029,7 @@ " dtype='datetime64[ns, UTC]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -1101,7 +1101,7 @@ "2023-05-04 10:44:53+00:00 NaN" ] }, - "execution_count": null, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -1150,7 +1150,7 @@ " {'time': '2023-05-04T10:44:53Z'}]" ] }, - "execution_count": null, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -1222,7 +1222,7 @@ "2023-05-04 10:44:53+00:00 NaN" ] }, - "execution_count": null, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -1271,7 +1271,7 @@ " {'time': '2023-05-04T12:44:53.000+02:00'}]" ] }, - "execution_count": null, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -1295,7 +1295,7 @@ " dtype='datetime64[ns, UTC]', name='time', freq=None)" ] }, - "execution_count": null, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -1367,7 +1367,7 @@ "2023-05-04 10:44:53+00:00 NaN" ] }, - "execution_count": null, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -1419,7 +1419,7 @@ " 'index_names': ['time']}" ] }, - "execution_count": null, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -1461,7 +1461,7 @@ " 'index_names': ['time']}" ] }, - "execution_count": null, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -1484,7 +1484,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "72.2 µs ± 126 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n" + "73.3 µs ± 314 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n" ] } ], @@ -1683,7 +1683,7 @@ "2023-05-04 11:44:53+00:00 16.38 NaN NaN" ] }, - "execution_count": null, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -1718,10 +1718,12 @@ "source": [ "#| exports\n", "@patch\n", - "def __init__(self:AICoreModuleBase, \n", - " save_dir:str, # path where the module can keep files \n", - " assets_dir:str, # path to support files (scripts, metadata, etc)\n", - " *args, **kwargs):\n", + "def __init__(\n", + " self:AICoreModuleBase, \n", + " save_dir:str, # path where the module can keep files \n", + " assets_dir:str, # path to support files (scripts, metadata, etc)\n", + " *args, **kwargs\n", + " ):\n", " \n", " self.init_time = datetime.datetime.now(datetime.UTC)\n", " self.aicorebridge_version = __version__\n", @@ -1751,14 +1753,14 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'init_time': datetime.datetime(2025, 1, 25, 11, 39, 20, 701627, tzinfo=datetime.timezone.utc),\n", - " 'aicorebridge_version': '0.3.4',\n", + "{'init_time': datetime.datetime(2025, 1, 27, 9, 12, 35, 566628, tzinfo=datetime.timezone.utc),\n", + " 'aicorebridge_version': '0.4.0',\n", " 'init_args': (1, 2),\n", " 'init_kwargs': {'num_1': 3,\n", " 'num_2': 4,\n", @@ -1766,7 +1768,7 @@ " 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}}" ] }, - "execution_count": 46, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } diff --git a/nbs/01_aicorebridge.ipynb b/nbs/01_aicorebridge.ipynb index ed0cbc0..cc1b88a 100644 --- a/nbs/01_aicorebridge.ipynb +++ b/nbs/01_aicorebridge.ipynb @@ -182,7 +182,7 @@ "{'anumber': array([1., 1., 2.])}" ] }, - "execution_count": null, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -202,13 +202,6 @@ "## Class AICoreModule" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "`<<<<<<< HEAD`" - ] - }, { "cell_type": "code", "execution_count": null, @@ -216,18 +209,6 @@ "outputs": [], "source": [ "#| exports\n", - "class AICoreModule(AICoreModuleBase): pass" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#| exports\n", - "@patch\n", - "def __init__(self:AICoreModule, \n", "class AICoreModule(AICoreModuleBase):\n", " def __init__(self, \n", " processor:typing.Callable, # data processing function\n", @@ -240,16 +221,9 @@ "\n" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "`=======`" - ] - }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -281,7 +255,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -309,7 +282,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -413,7 +385,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -430,7 +401,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -467,7 +437,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -500,7 +469,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -520,7 +488,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -556,7 +523,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 19, "metadata": {}, "outputs": [ { @@ -617,7 +583,6 @@ "2023-05-04 10:44:53+00:00 2 16.55" ] }, - "execution_count": null, "execution_count": 19, "metadata": {}, "output_type": "execute_result" @@ -631,7 +596,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 20, "metadata": {}, "outputs": [ { @@ -640,7 +604,6 @@ "{'anumber': array([2., 2., 2.])}" ] }, - "execution_count": null, "execution_count": 20, "metadata": {}, "output_type": "execute_result" @@ -654,7 +617,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 21, "metadata": {}, "outputs": [ { @@ -672,7 +634,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 22, "metadata": {}, "outputs": [ { @@ -681,7 +642,6 @@ "array([2., 2., 2.])" ] }, - "execution_count": null, "execution_count": 22, "metadata": {}, "output_type": "execute_result" @@ -694,7 +654,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 23, "metadata": {}, "outputs": [ { @@ -703,7 +662,6 @@ "array([2., 2., 2.])" ] }, - "execution_count": null, "execution_count": 23, "metadata": {}, "output_type": "execute_result" @@ -719,7 +677,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 24, "metadata": {}, "outputs": [ { @@ -728,7 +685,6 @@ "1.5" ] }, - "execution_count": null, "execution_count": 24, "metadata": {}, "output_type": "execute_result" @@ -744,7 +700,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 25, "metadata": {}, "outputs": [ { @@ -753,7 +708,6 @@ "float | numpy.ndarray" ] }, - "execution_count": null, "execution_count": 25, "metadata": {}, "output_type": "execute_result" @@ -766,7 +720,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 26, "metadata": {}, "outputs": [ { @@ -775,7 +728,6 @@ "array([2., 2., 2.])" ] }, - "execution_count": null, "execution_count": 26, "metadata": {}, "output_type": "execute_result" @@ -788,7 +740,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 27, "metadata": {}, "outputs": [ { @@ -797,7 +748,6 @@ "array([2., 2., 2.])" ] }, - "execution_count": null, "execution_count": 27, "metadata": {}, "output_type": "execute_result" @@ -817,7 +767,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 28, "metadata": {}, "outputs": [], "source": [ @@ -835,7 +784,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -845,7 +793,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -856,7 +803,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -887,7 +834,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 33, "metadata": {}, "outputs": [], "source": [ @@ -899,7 +845,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -915,7 +861,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -936,10 +882,8 @@ "]\n", "Result Message\n", " [\n", - " \"Startup time: 2025-01-23T10:13:17.095714+00:00\",\n", - " \"Corebridge version: 0.3.5\",\n", - " \"Startup time: 2025-01-25T13:25:32.840039+00:00\",\n", - " \"Corebridge version: 0.3.4\",\n", + " \"Startup time: 2025-01-27T09:12:44.044308+00:00\",\n", + " \"Corebridge version: 0.4.0\",\n", " \"test_function((data: pandas.core.frame.DataFrame, anumber: float | numpy.ndarray = 0))\",\n", " \"init_args: (1, 2), init_kwargs: {'num_1': 3, 'num_2': 4, 'assets_dir': None, 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}\",\n", " \"lastSeen: False, recordformat: records, timezone: Europe/Amsterdam\",\n", @@ -976,7 +920,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 36, "metadata": {}, "outputs": [ { @@ -985,7 +928,6 @@ "pandas.core.frame.DataFrame" ] }, - "execution_count": null, "execution_count": 36, "metadata": {}, "output_type": "execute_result" @@ -998,7 +940,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 37, "metadata": {}, "outputs": [ { @@ -1017,7 +958,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 38, "metadata": {}, "outputs": [ { @@ -1043,7 +983,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1057,7 +997,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1077,7 +1017,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1097,7 +1037,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1106,7 +1046,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1115,8 +1055,8 @@ "text": [ "Result Message\n", " [\n", - " \"Startup time: 2025-01-25T13:25:32.880264+00:00\",\n", - " \"Corebridge version: 0.3.4\",\n", + " \"Startup time: 2025-01-27T09:12:44.105198+00:00\",\n", + " \"Corebridge version: 0.4.0\",\n", " \"test_simple_function((anumber: float, another: float))\",\n", " \"init_args: (1, 2), init_kwargs: {'num_1': 3, 'num_2': 4, 'assets_dir': None, 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}\",\n", " \"lastSeen: False, recordformat: records, timezone: Europe/Amsterdam\",\n", @@ -1148,7 +1088,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1158,14 +1098,13 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 45, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Loading corebridge.aicorebridge 0.3.5 from /home/fenke/repos/corebridge/corebridge/aicorebridge.py\n" + "Loading corebridge.aicorebridge 0.4.0 from /home/fenke/repos/corebridge/corebridge/aicorebridge.py\n" ] } ], @@ -1177,7 +1116,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 46, "metadata": {}, "outputs": [], "source": [ @@ -1197,7 +1135,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 47, "metadata": {}, "outputs": [ { @@ -1218,10 +1155,8 @@ "]\n", "Result Message\n", " [\n", - " \"Startup time: 2025-01-23T10:13:17.160497+00:00\",\n", - " \"Corebridge version: 0.3.5\",\n", - " \"Startup time: 2025-01-25T13:25:32.929729+00:00\",\n", - " \"Corebridge version: 0.3.4\",\n", + " \"Startup time: 2025-01-27T09:12:44.153261+00:00\",\n", + " \"Corebridge version: 0.4.0\",\n", " \"test_function((data: pandas.core.frame.DataFrame, anumber: float | numpy.ndarray = 0))\",\n", " \"init_args: (1, 2), init_kwargs: {'num_1': 3, 'num_2': 4, 'assets_dir': None, 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}\",\n", " \"lastSeen: False, recordformat: records, timezone: Europe/Amsterdam\",\n", @@ -1257,16 +1192,13 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 48, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'init_time': datetime.datetime(2025, 1, 23, 10, 13, 17, 160497, tzinfo=datetime.timezone.utc),\n", - " 'aicorebridge_version': '0.3.5',\n", - "{'init_time': datetime.datetime(2025, 1, 25, 13, 25, 32, 929729, tzinfo=datetime.timezone.utc),\n", - " 'aicorebridge_version': '0.3.4',\n", + "{'init_time': datetime.datetime(2025, 1, 27, 9, 12, 44, 153261, tzinfo=datetime.timezone.utc),\n", + " 'aicorebridge_version': '0.4.0',\n", " 'init_args': (1, 2),\n", " 'init_kwargs': {'num_1': 3,\n", " 'num_2': 4,\n", @@ -1281,7 +1213,6 @@ " 'call_params': ['anumber']}" ] }, - "execution_count": null, "execution_count": 48, "metadata": {}, "output_type": "execute_result" @@ -1314,12 +1245,11 @@ "]\n", "Result Message\n", " [\n", - " \"Startup time: 2025-01-23T10:13:41.421420+00:00\",\n", - " \"Corebridge version: 0.3.5\",\n", + " \"Startup time: 2025-01-27T09:12:44.217102+00:00\",\n", + " \"Corebridge version: 0.4.0\",\n", " \"test_function((data: pandas.core.frame.DataFrame, anumber: float | numpy.ndarray = 0))\",\n", " \"init_args: (1, 2), init_kwargs: {'num_1': 3, 'num_2': 4, 'assets_dir': None, 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}\",\n", " \"lastSeen: False, recordformat: records, timezone: UTC\",\n", - " \"calldata shape: (2, 1)\",\n", " \"anumber: 2.0\",\n", " \"result shape: (2, 1)\",\n", " \"return-data shape: (2, 1)\"\n", @@ -1380,7 +1310,6 @@ { "cell_type": "code", "execution_count": null, - "execution_count": 49, "metadata": {}, "outputs": [], "source": [ @@ -1394,10 +1323,6 @@ "display_name": "corebridge.venv", "language": "python", "name": "corebridge.venv" - }, - "language_info": { - "name": "python", - "version": "3.11.10" } }, "nbformat": 4, diff --git a/nbs/02_rscriptbridge.ipynb b/nbs/02_rscriptbridge.ipynb index 2177715..e80d350 100644 --- a/nbs/02_rscriptbridge.ipynb +++ b/nbs/02_rscriptbridge.ipynb @@ -5574,13 +5574,9 @@ ], "metadata": { "kernelspec": { - "display_name": ".devenv-corebridge", + "display_name": "python3", "language": "python", "name": "python3" - }, - "language_info": { - "name": "python", - "version": "3.11.10" } }, "nbformat": 4, diff --git a/nbs/index.ipynb b/nbs/index.ipynb index cf6df19..437ae55 100644 --- a/nbs/index.ipynb +++ b/nbs/index.ipynb @@ -220,10 +220,6 @@ "display_name": "corebridge.venv", "language": "python", "name": "corebridge.venv" - }, - "language_info": { - "name": "python", - "version": "3.11.10" } }, "nbformat": 4, diff --git a/settings.ini b/settings.ini index 11c07cd..8ede0de 100644 --- a/settings.ini +++ b/settings.ini @@ -5,7 +5,7 @@ ### Python library ### repo = corebridge lib_name = %(repo)s -version = 0.3.5 +version = 0.4.0 min_python = 3.10 license = apache2 black_formatting = False