From 2344b345d4a3c78ba1da273c0b3860108f78745d Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Thu, 10 Aug 2023 18:11:54 +0200 Subject: [PATCH 01/13] save the progress -- does not work yet, the path is still wrong --- .../Constants/CalculationEngine.ipynb | 2 +- ifrs17-template/Export/MapTemplate.ipynb | 273 +++++++++++++++++- ifrs17/Constants/Validations.ipynb | 2 +- 3 files changed, 274 insertions(+), 3 deletions(-) diff --git a/ifrs17-template/Constants/CalculationEngine.ipynb b/ifrs17-template/Constants/CalculationEngine.ipynb index b8a11471..7d011d96 100644 --- a/ifrs17-template/Constants/CalculationEngine.ipynb +++ b/ifrs17-template/Constants/CalculationEngine.ipynb @@ -22,7 +22,7 @@ "var projectName = \"ifrs17\";", "\nvar environmentName = \"v1.3.1\";", "\nvar notebookName = \"CalculationEngine\";", - "\nvar calculationEngine = $\"#!import \\\"../../{projectName}/{environmentName}/{notebookName}\\\"\";" + "\nvar calculationEngine = $\"#!import \\\"../../{projectName}/{notebookName}\\\"\";" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index 3eb3eeed..a8ffd63c 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -78,6 +78,46 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "public class Sharepoint{", + "\n public const string Sites = \"sites/DFVDeutscheFamilienversicherung/\"; //Sharepoint sites", + "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", + "\n public const string Root = \"Dev/\"; //Dev main directory", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var pathToExport = Sharepoint.Sites + \"ExportFilesTest\";" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var fileStorage = SharePoint.Site(pathToExport, Sharepoint.Tenant);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Export.SetDefaultFileStorage(fileStorage);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ @@ -154,7 +194,7 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog()", + "\n //.WithActivityLog()", "\n .ExecuteAsync()" ], "metadata": {}, @@ -327,6 +367,7 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", + "\n .WithFileStorage(pathToExport)", "\n .WithActivityLog()", "\n .ExecuteAsync()" ], @@ -334,6 +375,236 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "# Modifications and Debugging" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var dnp = await Export.ToExcel(\"DataNodeParameter\")", + "\n .WithSource(Workspace)", + "\n .DataNodeParameterConfiguration(dataNodeParameters)", + "\n .MainTabConfiguration(partition)", + "\n .WithActivityLog()", + "\n .ExecuteAsync();" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.GetType()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.GetType().GetProperties().Select(x => x.Name)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.Uri.GetType()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.Uri.GetType().GetProperties().Select(x => x.Name).Where((_, i) => true)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.Uri.OriginalString" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Export.ToExcel(\"DataNodeParameter\")", + "\n .WithSource(Workspace)", + "\n .DataNodeParameterConfiguration(dataNodeParameters)", + "\n .MainTabConfiguration(partition)", + "\n .WithActivityLog()", + "\n .GetType()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public class ExportSaver{", + "\n", + "\n private ExportBuilderWriter writer;", + "\n private string ExportPath;", + "\n", + "\n public ExportSaver(ExportBuilderWriter writer, string exportPath){", + "\n this.writer = writer;", + "\n this.ExportPath = exportPath;", + "\n }", + "\n", + "\n private void SaveToPath(){}", + "\n", + "\n public async Task ExecuteAsync(){", + "\n SaveToPath();", + "\n return await writer.ExecuteAsync();", + "\n }", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public static ExportSaver WithSaveTo(this ExportBuilderWriter writer, string exportPath) => new ExportSaver(writer, exportPath);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var baseUri = new Uri(\"/\");" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Uri.TryCreate(baseUri, dnp.Uri, out var absolute)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "absolute.AbsoluteUri" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var docBuilder = Export.ToExcel(\"DataNodeParameter\")", + "\n .WithSource(Workspace)", + "\n .DataNodeParameterConfiguration(dataNodeParameters)", + "\n .MainTabConfiguration(partition) as DocumentBuilder;" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var map = await docBuilder.GetMappingAsync();" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Path.GetDirectoryName(map.FileName)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public class Sharepoint{", + "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", + "\n public const string Root = \"General/\"; //Main folder", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Directory.Move(dnp.Uri.OriginalString, Sharepoint.Root)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "dnp.Uri.OriginalString" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ diff --git a/ifrs17/Constants/Validations.ipynb b/ifrs17/Constants/Validations.ipynb index 94f2d623..8e654e7d 100644 --- a/ifrs17/Constants/Validations.ipynb +++ b/ifrs17/Constants/Validations.ipynb @@ -301,4 +301,4 @@ "outputs": [] } ] -} +} \ No newline at end of file From 50e806faaaaff3da9aa4226ae257039e0ca752f5 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Fri, 11 Aug 2023 11:51:31 +0200 Subject: [PATCH 02/13] working version of exports to SP --- ifrs17-template/Constants/Sharepoint.ipynb | 42 +++ ifrs17-template/Export/MapTemplate.ipynb | 279 +----------------- .../InitSystemorphRefDataToMemory.ipynb | 1 + 3 files changed, 53 insertions(+), 269 deletions(-) create mode 100644 ifrs17-template/Constants/Sharepoint.ipynb diff --git a/ifrs17-template/Constants/Sharepoint.ipynb b/ifrs17-template/Constants/Sharepoint.ipynb new file mode 100644 index 00000000..0dddd4bc --- /dev/null +++ b/ifrs17-template/Constants/Sharepoint.ipynb @@ -0,0 +1,42 @@ +{ + "metadata": { + "authors": [], + "id": "FhSOUFpXwkCCDrVeJ6_P0g", + "kernelspec": { + "display_name": "Formula Framework", + "language": "C#", + "name": "C#" + }, + "language_info": { + "file_extension": ".cs", + "mimetype": "text/plain", + "name": "C#" + } + }, + "nbformat": 4, + "nbformat_minor": 5, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "Change these definitions to allow direct exports into your sharepoint folder." + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public class Sharepoint{", + "\n public const string Sites = \"sites/XXX\"; //Sharepoint sites", + "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", + "\n public const string Root = \"Dev/\"; //Dev main directory", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index a8ffd63c..743e56af 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -79,31 +79,9 @@ "outputs": [] }, { - "cell_type": "code", - "source": [ - "public class Sharepoint{", - "\n public const string Sites = \"sites/DFVDeutscheFamilienversicherung/\"; //Sharepoint sites", - "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", - "\n public const string Root = \"Dev/\"; //Dev main directory", - "\n}" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var pathToExport = Sharepoint.Sites + \"ExportFilesTest\";" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", + "cell_type": "markdown", "source": [ - "var fileStorage = SharePoint.Site(pathToExport, Sharepoint.Tenant);" + "Uncomment these rows to export directly to your export folder on the sharepoint." ], "metadata": {}, "execution_count": 0, @@ -112,7 +90,10 @@ { "cell_type": "code", "source": [ - "Export.SetDefaultFileStorage(fileStorage);" + "var pathToExport = \"\";", + "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", + "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", + "\n//Export.SetDefaultFileStorage(fileStorage);" ], "metadata": {}, "execution_count": 0, @@ -187,14 +168,14 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(\"DataNodes\")", + "await Export.ToExcel(pathToExport + \"DataNodes\")", "\n .WithSource(Workspace)", "\n .PortfolioConfiguration()", "\n .PortfolioConfiguration()", "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n //.WithActivityLog()", + "\n .WithActivityLog()", "\n .ExecuteAsync()" ], "metadata": {}, @@ -275,7 +256,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(\"DataNodeState\")", + "await Export.ToExcel(pathToExport + \"DataNodeState\")", "\n .WithSource(Workspace)", "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", @@ -363,256 +344,16 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(\"DataNodeParameter\")", + "await Export.ToExcel(pathToExport + \"DataNodeParameter\")", "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .WithFileStorage(pathToExport)", "\n .WithActivityLog()", "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Modifications and Debugging" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var dnp = await Export.ToExcel(\"DataNodeParameter\")", - "\n .WithSource(Workspace)", - "\n .DataNodeParameterConfiguration(dataNodeParameters)", - "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog()", - "\n .ExecuteAsync();" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.GetType()" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.GetType().GetProperties().Select(x => x.Name)" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.Uri.GetType()" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.Uri.GetType().GetProperties().Select(x => x.Name).Where((_, i) => true)" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.Uri.OriginalString" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "Export.ToExcel(\"DataNodeParameter\")", - "\n .WithSource(Workspace)", - "\n .DataNodeParameterConfiguration(dataNodeParameters)", - "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog()", - "\n .GetType()" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "public class ExportSaver{", - "\n", - "\n private ExportBuilderWriter writer;", - "\n private string ExportPath;", - "\n", - "\n public ExportSaver(ExportBuilderWriter writer, string exportPath){", - "\n this.writer = writer;", - "\n this.ExportPath = exportPath;", - "\n }", - "\n", - "\n private void SaveToPath(){}", - "\n", - "\n public async Task ExecuteAsync(){", - "\n SaveToPath();", - "\n return await writer.ExecuteAsync();", - "\n }", - "\n}" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "public static ExportSaver WithSaveTo(this ExportBuilderWriter writer, string exportPath) => new ExportSaver(writer, exportPath);" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var baseUri = new Uri(\"/\");" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "Uri.TryCreate(baseUri, dnp.Uri, out var absolute)" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "absolute.AbsoluteUri" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var docBuilder = Export.ToExcel(\"DataNodeParameter\")", - "\n .WithSource(Workspace)", - "\n .DataNodeParameterConfiguration(dataNodeParameters)", - "\n .MainTabConfiguration(partition) as DocumentBuilder;" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var map = await docBuilder.GetMappingAsync();" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "Path.GetDirectoryName(map.FileName)" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "public class Sharepoint{", - "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", - "\n public const string Root = \"General/\"; //Main folder", - "\n}" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "Directory.Move(dnp.Uri.OriginalString, Sharepoint.Root)" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "dnp.Uri.OriginalString" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index 0ecdf39c..1a9213e1 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -32,6 +32,7 @@ "cell_type": "code", "source": [ "#!import \"../Constants/CalculationEngine\"", + "\n#!import \"../Constants/Sharepoint\"", "\n#!eval calculationEngine" ], "metadata": {}, From 6a0256d02894bf3316a9fd5fbc3335a701c85e40 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Fri, 11 Aug 2023 12:31:37 +0200 Subject: [PATCH 03/13] further modifications --- ifrs17-template/Constants/Sharepoint.ipynb | 58 +++++++++++++++++++ .../InitSystemorphRefDataToMemory.ipynb | 4 +- .../Report/InteractiveReports/Accruals.ipynb | 2 +- .../InteractiveReports/Csm-Lc-LoReCo.ipynb | 2 +- .../Report/InteractiveReports/Deferrals.ipynb | 2 +- .../ExperienceAdjustment.ipynb | 2 +- .../FinancialPerformance.ipynb | 2 +- .../FulfilmentCashflow.ipynb | 2 +- .../Report/InteractiveReports/LIC.ipynb | 2 +- .../Report/InteractiveReports/LRC.ipynb | 2 +- .../InteractiveReports/LicActuarial.ipynb | 2 +- .../InteractiveReports/LrcActuarial.ipynb | 2 +- .../InteractiveReports/PresentValue.ipynb | 2 +- .../InteractiveReports/RiskAdjustment.ipynb | 2 +- .../InteractiveReports/TechnicalMargin.ipynb | 2 +- .../InteractiveReports/WrittenActual.ipynb | 2 +- 16 files changed, 73 insertions(+), 17 deletions(-) diff --git a/ifrs17-template/Constants/Sharepoint.ipynb b/ifrs17-template/Constants/Sharepoint.ipynb index 0dddd4bc..6a98784c 100644 --- a/ifrs17-template/Constants/Sharepoint.ipynb +++ b/ifrs17-template/Constants/Sharepoint.ipynb @@ -16,6 +16,43 @@ "nbformat": 4, "nbformat_minor": 5, "cells": [ + { + "cell_type": "markdown", + "source": [ + "

Sharepoint Settings

" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Imports" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#!import \"../Constants/CalculationEngine\"", + "\n#!eval calculationEngine" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Settings " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ @@ -37,6 +74,27 @@ "metadata": {}, "execution_count": 0, "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "Please uncomment the following piece of code to configure the Sharepoint definitions and export all the files directly to a sharepoint folder of your preference." + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var pathToExport = \"\";", + "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", + "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", + "\n//Export.SetDefaultFileStorage(fileStorage);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index 1a9213e1..f79ef2d8 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -31,9 +31,7 @@ { "cell_type": "code", "source": [ - "#!import \"../Constants/CalculationEngine\"", - "\n#!import \"../Constants/Sharepoint\"", - "\n#!eval calculationEngine" + "#!import \"../Constants/Sharepoint\"" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/Accruals.ipynb b/ifrs17-template/Report/InteractiveReports/Accruals.ipynb index 7c253ae2..c3837167 100644 --- a/ifrs17-template/Report/InteractiveReports/Accruals.ipynb +++ b/ifrs17-template/Report/InteractiveReports/Accruals.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"Accruals\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"Accruals\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/Csm-Lc-LoReCo.ipynb b/ifrs17-template/Report/InteractiveReports/Csm-Lc-LoReCo.ipynb index c7725e94..e44f6d50 100644 --- a/ifrs17-template/Report/InteractiveReports/Csm-Lc-LoReCo.ipynb +++ b/ifrs17-template/Report/InteractiveReports/Csm-Lc-LoReCo.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"CsmLcLorecoReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"CsmLcLorecoReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/Deferrals.ipynb b/ifrs17-template/Report/InteractiveReports/Deferrals.ipynb index 101e8172..38300b7b 100644 --- a/ifrs17-template/Report/InteractiveReports/Deferrals.ipynb +++ b/ifrs17-template/Report/InteractiveReports/Deferrals.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"DeferralsReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"DeferralsReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/ExperienceAdjustment.ipynb b/ifrs17-template/Report/InteractiveReports/ExperienceAdjustment.ipynb index b93dab83..3df43157 100644 --- a/ifrs17-template/Report/InteractiveReports/ExperienceAdjustment.ipynb +++ b/ifrs17-template/Report/InteractiveReports/ExperienceAdjustment.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"ExpAdjReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"ExpAdjReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/FinancialPerformance.ipynb b/ifrs17-template/Report/InteractiveReports/FinancialPerformance.ipynb index c176dff5..5c02869d 100644 --- a/ifrs17-template/Report/InteractiveReports/FinancialPerformance.ipynb +++ b/ifrs17-template/Report/InteractiveReports/FinancialPerformance.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"FpReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"FpReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/FulfilmentCashflow.ipynb b/ifrs17-template/Report/InteractiveReports/FulfilmentCashflow.ipynb index 4811cdd6..351d993b 100644 --- a/ifrs17-template/Report/InteractiveReports/FulfilmentCashflow.ipynb +++ b/ifrs17-template/Report/InteractiveReports/FulfilmentCashflow.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"FcfReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"FcfReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LIC.ipynb b/ifrs17-template/Report/InteractiveReports/LIC.ipynb index dd4a1c74..2fa6a63a 100644 --- a/ifrs17-template/Report/InteractiveReports/LIC.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LIC.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"LicReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"LicReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LRC.ipynb b/ifrs17-template/Report/InteractiveReports/LRC.ipynb index 64039671..ee749220 100644 --- a/ifrs17-template/Report/InteractiveReports/LRC.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LRC.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"LrcReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"LrcReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LicActuarial.ipynb b/ifrs17-template/Report/InteractiveReports/LicActuarial.ipynb index 1a794500..64c982fd 100644 --- a/ifrs17-template/Report/InteractiveReports/LicActuarial.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LicActuarial.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"LicActualReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"LicActualReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LrcActuarial.ipynb b/ifrs17-template/Report/InteractiveReports/LrcActuarial.ipynb index 2eb300db..b2ee1ad5 100644 --- a/ifrs17-template/Report/InteractiveReports/LrcActuarial.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LrcActuarial.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"LrcActualReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"LrcActualReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/PresentValue.ipynb b/ifrs17-template/Report/InteractiveReports/PresentValue.ipynb index 8695c9e8..9beb6a88 100644 --- a/ifrs17-template/Report/InteractiveReports/PresentValue.ipynb +++ b/ifrs17-template/Report/InteractiveReports/PresentValue.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"PvReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"PvReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/RiskAdjustment.ipynb b/ifrs17-template/Report/InteractiveReports/RiskAdjustment.ipynb index 8b34e0dc..c93a6c72 100644 --- a/ifrs17-template/Report/InteractiveReports/RiskAdjustment.ipynb +++ b/ifrs17-template/Report/InteractiveReports/RiskAdjustment.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"RiskAdjReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"RiskAdjReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/TechnicalMargin.ipynb b/ifrs17-template/Report/InteractiveReports/TechnicalMargin.ipynb index c97b5168..a0c9c475 100644 --- a/ifrs17-template/Report/InteractiveReports/TechnicalMargin.ipynb +++ b/ifrs17-template/Report/InteractiveReports/TechnicalMargin.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"TmReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"TmReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/WrittenActual.ipynb b/ifrs17-template/Report/InteractiveReports/WrittenActual.ipynb index 41c56af7..54f7c9b2 100644 --- a/ifrs17-template/Report/InteractiveReports/WrittenActual.ipynb +++ b/ifrs17-template/Report/InteractiveReports/WrittenActual.ipynb @@ -82,7 +82,7 @@ { "cell_type": "code", "source": [ - "await ifrs17Interactive.ExportToExcelAsync(\"WrittenReport\", addDateTime : true)" + "await ifrs17Interactive.ExportToExcelAsync(pathToExport + \"WrittenReport\", addDateTime : true)" ], "metadata": {}, "execution_count": 0, From 51e6ea44d16fa6a5f23b8cfdbbbe97718fdd474f Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Fri, 11 Aug 2023 13:20:24 +0200 Subject: [PATCH 04/13] map template test modified --- ifrs17-template/Test/MapTemplateAndImportTest.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb index 11d9254c..2bb2e6f5 100644 --- a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb +++ b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb @@ -213,7 +213,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(filename)", + "await Export.ToExcel(pathToExport + filename)", "\n .WithSource(Workspace)", "\n .PortfolioConfiguration()", "\n .PortfolioConfiguration()", @@ -314,7 +314,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(filename)", + "await Export.ToExcel(pathToExport + filename)", "\n .WithSource(Workspace)", "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", @@ -408,7 +408,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(filename)", + "await Export.ToExcel(pathToExport + filename)", "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", From 19cc9b95661f66e6dc19a8016c52596de83ae5f7 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Fri, 11 Aug 2023 13:31:19 +0200 Subject: [PATCH 05/13] tests modified --- ifrs17-template/Test/Data/ExportIfrsVariable.ipynb | 2 +- ifrs17-template/Test/Data/ExportReportVariables.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb index 3b21f958..3524cf7c 100644 --- a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb +++ b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb @@ -267,7 +267,7 @@ "cell_type": "code", "source": [ "var filename = benchmarkFileNamePrefix + \"_\" + args.ReportingNode +\"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario + \"_\" + estimateType + (string.IsNullOrWhiteSpace(benchmarkFileNameSuffix) ? string.Empty : \"_\" + benchmarkFileNameSuffix);", - "\nawait Export.ToCsv(filename)", + "\nawait Export.ToCsv(pathToExport + filename)", "\n .WithTable(tableConfig => tableConfig", "\n .AtBeginning()", "\n .WithName(Main)", diff --git a/ifrs17-template/Test/Data/ExportReportVariables.ipynb b/ifrs17-template/Test/Data/ExportReportVariables.ipynb index 3a365b26..a2773152 100644 --- a/ifrs17-template/Test/Data/ExportReportVariables.ipynb +++ b/ifrs17-template/Test/Data/ExportReportVariables.ipynb @@ -183,7 +183,7 @@ { "cell_type": "code", "source": [ - "await Export.ToCsv(bmFileName)", + "await Export.ToCsv(pathToExport + bmFileName)", "\n .WithTable(tableConfig => tableConfig.WithSource(source => scopesData.AsQueryable()))", "\n .WithSource(Workspace)", "\n .ExecuteAsync()" From 34fdd0950f7d474ecafdf872edb3fb3a500d06d6 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Fri, 11 Aug 2023 15:54:11 +0200 Subject: [PATCH 06/13] incorporate feedback --- ifrs17-template/Constants/Sharepoint.ipynb | 49 ------------------- ifrs17-template/Export/MapTemplate.ipynb | 21 +++++++- .../InitSystemorphRefDataToMemory.ipynb | 3 +- .../Report/InteractiveReports/LoadData.ipynb | 22 +++++++++ .../Test/Data/ExportIfrsVariable.ipynb | 2 +- .../Test/Data/ExportReportVariables.ipynb | 2 +- .../Test/MapTemplateAndImportTest.ipynb | 6 +-- 7 files changed, 49 insertions(+), 56 deletions(-) diff --git a/ifrs17-template/Constants/Sharepoint.ipynb b/ifrs17-template/Constants/Sharepoint.ipynb index 6a98784c..b40e4d6d 100644 --- a/ifrs17-template/Constants/Sharepoint.ipynb +++ b/ifrs17-template/Constants/Sharepoint.ipynb @@ -25,34 +25,6 @@ "execution_count": 0, "outputs": [] }, - { - "cell_type": "markdown", - "source": [ - "# Imports" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "#!import \"../Constants/CalculationEngine\"", - "\n#!eval calculationEngine" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Settings " - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, { "cell_type": "markdown", "source": [ @@ -74,27 +46,6 @@ "metadata": {}, "execution_count": 0, "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "Please uncomment the following piece of code to configure the Sharepoint definitions and export all the files directly to a sharepoint folder of your preference." - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var pathToExport = \"\";", - "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", - "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", - "\n//Export.SetDefaultFileStorage(fileStorage);" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index 743e56af..73fa3244 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -81,7 +81,16 @@ { "cell_type": "markdown", "source": [ - "Uncomment these rows to export directly to your export folder on the sharepoint." + "# Sharepoint file storage" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code." ], "metadata": {}, "execution_count": 0, @@ -91,6 +100,7 @@ "cell_type": "code", "source": [ "var pathToExport = \"\";", + "\n//#!import \"../Constants/Sharepoint\"", "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", "\n//Export.SetDefaultFileStorage(fileStorage);" @@ -354,6 +364,15 @@ "metadata": {}, "execution_count": 0, "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index f79ef2d8..0ecdf39c 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -31,7 +31,8 @@ { "cell_type": "code", "source": [ - "#!import \"../Constants/Sharepoint\"" + "#!import \"../Constants/CalculationEngine\"", + "\n#!eval calculationEngine" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LoadData.ipynb b/ifrs17-template/Report/InteractiveReports/LoadData.ipynb index 0b97f90a..5b9d0224 100644 --- a/ifrs17-template/Report/InteractiveReports/LoadData.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LoadData.ipynb @@ -60,6 +60,28 @@ "metadata": {}, "execution_count": 0, "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code." + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var pathToExport = \"\";", + "\n//#!import \"../../Constants/Sharepoint\"", + "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", + "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", + "\n//Export.SetDefaultFileStorage(fileStorage);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb index 3524cf7c..3b21f958 100644 --- a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb +++ b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb @@ -267,7 +267,7 @@ "cell_type": "code", "source": [ "var filename = benchmarkFileNamePrefix + \"_\" + args.ReportingNode +\"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario + \"_\" + estimateType + (string.IsNullOrWhiteSpace(benchmarkFileNameSuffix) ? string.Empty : \"_\" + benchmarkFileNameSuffix);", - "\nawait Export.ToCsv(pathToExport + filename)", + "\nawait Export.ToCsv(filename)", "\n .WithTable(tableConfig => tableConfig", "\n .AtBeginning()", "\n .WithName(Main)", diff --git a/ifrs17-template/Test/Data/ExportReportVariables.ipynb b/ifrs17-template/Test/Data/ExportReportVariables.ipynb index a2773152..3a365b26 100644 --- a/ifrs17-template/Test/Data/ExportReportVariables.ipynb +++ b/ifrs17-template/Test/Data/ExportReportVariables.ipynb @@ -183,7 +183,7 @@ { "cell_type": "code", "source": [ - "await Export.ToCsv(pathToExport + bmFileName)", + "await Export.ToCsv(bmFileName)", "\n .WithTable(tableConfig => tableConfig.WithSource(source => scopesData.AsQueryable()))", "\n .WithSource(Workspace)", "\n .ExecuteAsync()" diff --git a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb index 2bb2e6f5..11d9254c 100644 --- a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb +++ b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb @@ -213,7 +213,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(pathToExport + filename)", + "await Export.ToExcel(filename)", "\n .WithSource(Workspace)", "\n .PortfolioConfiguration()", "\n .PortfolioConfiguration()", @@ -314,7 +314,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(pathToExport + filename)", + "await Export.ToExcel(filename)", "\n .WithSource(Workspace)", "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", @@ -408,7 +408,7 @@ { "cell_type": "code", "source": [ - "await Export.ToExcel(pathToExport + filename)", + "await Export.ToExcel(filename)", "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", From 39d9c3ebbbbb1c46e76c045eeec9d149967c16d9 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Mon, 14 Aug 2023 11:28:29 +0200 Subject: [PATCH 07/13] refactoring --- ifrs17-template/Export/ExportSettings.ipynb | 51 +++++++++++++++++++ ifrs17-template/Export/MapTemplate.ipynb | 34 +------------ .../Report/InteractiveReports/LoadData.ipynb | 25 +-------- 3 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 ifrs17-template/Export/ExportSettings.ipynb diff --git a/ifrs17-template/Export/ExportSettings.ipynb b/ifrs17-template/Export/ExportSettings.ipynb new file mode 100644 index 00000000..3cea84e1 --- /dev/null +++ b/ifrs17-template/Export/ExportSettings.ipynb @@ -0,0 +1,51 @@ +{ + "metadata": { + "authors": [], + "id": "SW5aARBVpEi8-8zKI1xJoQ", + "kernelspec": { + "display_name": "Formula Framework", + "language": "C#", + "name": "C#" + }, + "language_info": { + "file_extension": ".cs", + "mimetype": "text/plain", + "name": "C#" + } + }, + "nbformat": 4, + "nbformat_minor": 5, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code." + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var pathToExport = \"\";", + "\n//#!import \"../Constants/Sharepoint\"", + "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", + "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", + "\n//Export.SetDefaultFileStorage(fileStorage);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index 73fa3244..5b45aa42 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -72,38 +72,8 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"../Import/CloseImportTemplate\"" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Sharepoint file storage" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code." - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var pathToExport = \"\";", - "\n//#!import \"../Constants/Sharepoint\"", - "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", - "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", - "\n//Export.SetDefaultFileStorage(fileStorage);" + "#!eval-notebook \"../Import/CloseImportTemplate\"", + "\n#!eval-notebook \"ExportSettings\"" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Report/InteractiveReports/LoadData.ipynb b/ifrs17-template/Report/InteractiveReports/LoadData.ipynb index 5b9d0224..22241f1e 100644 --- a/ifrs17-template/Report/InteractiveReports/LoadData.ipynb +++ b/ifrs17-template/Report/InteractiveReports/LoadData.ipynb @@ -45,7 +45,8 @@ { "cell_type": "code", "source": [ - "#!import \"../../Import/CloseImportTemplate\"" + "#!import \"../../Import/CloseImportTemplate\"", + "\n#!import \"../../Export/ExportSettings\"" ], "metadata": {}, "execution_count": 0, @@ -60,28 +61,6 @@ "metadata": {}, "execution_count": 0, "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code." - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "var pathToExport = \"\";", - "\n//#!import \"../../Constants/Sharepoint\"", - "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", - "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", - "\n//Export.SetDefaultFileStorage(fileStorage);" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] } ] } \ No newline at end of file From de44f72998a72239e7ba4ce49be97e72383d8068 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Tue, 15 Aug 2023 18:28:30 +0200 Subject: [PATCH 08/13] address review comments : Sharepoint NB --- ifrs17-template/Constants/Sharepoint.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ifrs17-template/Constants/Sharepoint.ipynb b/ifrs17-template/Constants/Sharepoint.ipynb index b40e4d6d..c132c371 100644 --- a/ifrs17-template/Constants/Sharepoint.ipynb +++ b/ifrs17-template/Constants/Sharepoint.ipynb @@ -28,7 +28,7 @@ { "cell_type": "markdown", "source": [ - "Change these definitions to allow direct exports into your sharepoint folder." + "This notebook allows to enter the details to connect the IFRS 17 calculation engine to your personal sharepoint. This allows the calculation engine to import data directly from your sharepoint and to export reports and other financial documents directly to your sharepoint." ], "metadata": {}, "execution_count": 0, @@ -41,6 +41,7 @@ "\n public const string Sites = \"sites/XXX\"; //Sharepoint sites", "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", "\n public const string Root = \"Dev/\"; //Dev main directory", + "\n public const string PathToExport = Root + \"ExportFilesTest/\" //Target export directory ", "\n}" ], "metadata": {}, From 90d050afb3f83eab1c4edda6c9a19809d24446dd Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Tue, 15 Aug 2023 18:36:25 +0200 Subject: [PATCH 09/13] export settings fixed --- ifrs17-template/Export/ExportSettings.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifrs17-template/Export/ExportSettings.ipynb b/ifrs17-template/Export/ExportSettings.ipynb index 3cea84e1..747db88e 100644 --- a/ifrs17-template/Export/ExportSettings.ipynb +++ b/ifrs17-template/Export/ExportSettings.ipynb @@ -31,7 +31,7 @@ "var pathToExport = \"\";", "\n//#!import \"../Constants/Sharepoint\"", "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", - "\n//var pathToExport = Sharepoint.Root + \"ExportFilesTest/\"; // Provide here the path to you default export folder", + "\n//var pathToExport = Sharepoint.PathToExport", "\n//Export.SetDefaultFileStorage(fileStorage);" ], "metadata": {}, From 0963a0714c235a19cd12e76a8a5e810c7646a7d3 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Tue, 15 Aug 2023 19:23:44 +0200 Subject: [PATCH 10/13] allow import from sharepoint --- ifrs17-template/Constants/Sharepoint.ipynb | 1 + .../Initialization/ImportSettings.ipynb | 33 +++++++++++++++++ .../InitSystemorphRefDataToMemory.ipynb | 35 ++++++++++++------- 3 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 ifrs17-template/Initialization/ImportSettings.ipynb diff --git a/ifrs17-template/Constants/Sharepoint.ipynb b/ifrs17-template/Constants/Sharepoint.ipynb index c132c371..91ef6588 100644 --- a/ifrs17-template/Constants/Sharepoint.ipynb +++ b/ifrs17-template/Constants/Sharepoint.ipynb @@ -42,6 +42,7 @@ "\n public const string Tenant = \"systemorph.sharepoint.com\"; //Sharepoint tenant", "\n public const string Root = \"Dev/\"; //Dev main directory", "\n public const string PathToExport = Root + \"ExportFilesTest/\" //Target export directory ", + "\n public const string PathToImport = Root + \"ImportFiles/\"", "\n}" ], "metadata": {}, diff --git a/ifrs17-template/Initialization/ImportSettings.ipynb b/ifrs17-template/Initialization/ImportSettings.ipynb new file mode 100644 index 00000000..3b414129 --- /dev/null +++ b/ifrs17-template/Initialization/ImportSettings.ipynb @@ -0,0 +1,33 @@ +{ + "metadata": { + "authors": [], + "id": "qm1URhtQPEmdOMumfNuQaQ", + "kernelspec": { + "display_name": "Formula Framework", + "language": "C#", + "name": "C#" + }, + "language_info": { + "file_extension": ".cs", + "mimetype": "text/plain", + "name": "C#" + } + }, + "nbformat": 4, + "nbformat_minor": 5, + "cells": [ + { + "cell_type": "code", + "source": [ + "var pathToImport = \"../Files/\";", + "\n//#!import \"../Constants/Sharepoint\"", + "\n//var fileStorage = SharePoint.Site(Sharepoint.Sites, Sharepoint.Tenant);", + "\n//var pathToImport = Sharepoint.PathToImport", + "\n//Import.SetDefaultFileStorage(fileStorage);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index 0ecdf39c..365c2704 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -38,6 +38,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "#!import \"ImportSettings\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ @@ -96,7 +105,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Dimensions.csv\")", + "await Import.FromFile(pathToImport + \"Dimensions.csv\")", "\n .WithType()", "\n .WithType()", "\n .WithType()", @@ -127,7 +136,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Dimensions.csv\")", + "await Import.FromFile(pathToImport + \"Dimensions.csv\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -140,7 +149,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", + "await Import.FromFile(pathToImport + \"ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -162,42 +171,42 @@ { "cell_type": "code", "source": [ - "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", + "var log = await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync();", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -211,7 +220,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", + "await Import.FromFile(pathToImport + \"Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -224,7 +233,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", + "await Import.FromFile(pathToImport + \"Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -237,7 +246,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", + "await Import.FromFile(pathToImport + \"Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", From c5b2cda1fe6cb15bb47e181a242e074a2979da06 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Wed, 16 Aug 2023 08:57:20 +0200 Subject: [PATCH 11/13] init base to memory --- .../InitSystemorphBaseToMemory.ipynb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index ecb28355..f43c59ff 100644 --- a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -85,7 +85,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodes_FR.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodes_FR.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -98,7 +98,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_FR_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeStates_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -111,7 +111,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_FR_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeParameters_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -133,7 +133,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodes_ES.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodes_ES.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -146,7 +146,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_ES_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeStates_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -159,7 +159,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_ES_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeParameters_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -181,7 +181,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -194,7 +194,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -207,7 +207,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", From 430a4c8ff4dfd008c7701e9ec29970c4f4030b84 Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Wed, 16 Aug 2023 11:56:36 +0200 Subject: [PATCH 12/13] changed all the imports appropriately, --- .../InitSystemorphToDatabase.ipynb | 53 +++++++++++-------- .../InitSystemorphToMemory.ipynb | 26 ++++----- 2 files changed, 44 insertions(+), 35 deletions(-) diff --git a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb index b54f5f1c..39ccd301 100644 --- a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb @@ -34,6 +34,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "#!import \"ImportSettings\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ @@ -73,7 +82,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Dimensions.csv\")", + "await Import.FromFile(pathToImport + \"Dimensions.csv\")", "\n .WithType()", "\n .WithType()", "\n .WithType()", @@ -105,7 +114,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", + "await Import.FromFile(pathToImport + \"ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -127,42 +136,42 @@ { "cell_type": "code", "source": [ - "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", + "var log = await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync();", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport + \"Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync()", "\n );", - "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", + "\nlog.Merge(await Import.FromFile(pathToImport \"Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -177,7 +186,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", + "await Import.FromFile(pathToImport + \"Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -190,7 +199,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", + "await Import.FromFile(pathToImport + \"Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -203,7 +212,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", + "await Import.FromFile(pathToImport +\"Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -225,7 +234,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -238,7 +247,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -251,7 +260,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -273,7 +282,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -286,7 +295,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -299,7 +308,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -312,7 +321,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -325,7 +334,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -338,7 +347,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -351,7 +360,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", diff --git a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb index aa4bd390..4d70a9cc 100644 --- a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb @@ -75,7 +75,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Openings_FR_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Openings_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -88,7 +88,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_FR_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -101,7 +101,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_FR_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -123,7 +123,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Openings_ES_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Openings_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -136,7 +136,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_ES_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -149,7 +149,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_ES_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -171,7 +171,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -184,7 +184,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -197,7 +197,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -210,7 +210,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -223,7 +223,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -236,7 +236,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -249,7 +249,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", + "await Import.FromFile(pathToImport + \"TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", From 93e4d07cbcfa0e3d102822035c1154e596321f4f Mon Sep 17 00:00:00 2001 From: Andrey Katz Date: Wed, 16 Aug 2023 12:02:38 +0200 Subject: [PATCH 13/13] short verbal explanation added --- ifrs17-template/Initialization/ImportSettings.ipynb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ifrs17-template/Initialization/ImportSettings.ipynb b/ifrs17-template/Initialization/ImportSettings.ipynb index 3b414129..f61fe1c4 100644 --- a/ifrs17-template/Initialization/ImportSettings.ipynb +++ b/ifrs17-template/Initialization/ImportSettings.ipynb @@ -16,6 +16,15 @@ "nbformat": 4, "nbformat_minor": 5, "cells": [ + { + "cell_type": "markdown", + "source": [ + "In order to allow direct export of the files into the sharepoint folder of choice, please comment out the first row of the following code and uncomment the rest of the code. In order to ensure that the import proceeds without errors, please make sure that you sharepoint import folder has a structure, similar to the one of the Files folder in our template. " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [