From c7205b44e1613eb84bd145a82e58befa8e3a50a7 Mon Sep 17 00:00:00 2001
From: Benedikt Seeger <benedikt.seeger@ptb.de>
Date: Thu, 25 Apr 2024 13:22:05 +0200
Subject: [PATCH] changed to dsiUnit pacakge from pip instead of local one

---
 .gitignore       | 4 ++++
 dockerfile       | 8 ++++----
 main.py          | 5 ++---
 requirements.txt | 5 +++--
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index f7275bb..b607d6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
 venv/
+
+.idea/
+
+.vscode/
diff --git a/dockerfile b/dockerfile
index 0fb91db..e2e4f68 100644
--- a/dockerfile
+++ b/dockerfile
@@ -3,15 +3,15 @@ FROM python:3.11
 # WORKDIR /usr/src/app
 ENV GIT_SSL_NO_VERIFY=1
 # Set the environment variable for the HTTP proxy
-ENV http_proxy="http://webproxy.bs.ptb.de:8080"
-ENV https_proxy="http://webproxy.bs.ptb.de:8080"
+#ENV http_proxy="http://webproxy.bs.ptb.de:8080"
+#ENV https_proxy="http://webproxy.bs.ptb.de:8080"
 
 # Set the environment variable for the NO_PROXY
 # This ensures that the proxy is not used for ptb.de
-ENV no_proxy="ptb.de"
+#ENV no_proxy="ptb.de"
 
 # Install any needed packages specified in requirements.txt
-RUN git clone https://dockerPull:Fu7bxBnYeyhq8Xz8seHS@gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend
+RUN git clone https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend.git
 
 #RUN pip install --proxy=webproxy.bs.ptb.de:8080 --no-cache-dir -r dsi-parser-frontend/requirements.txt
 
diff --git a/main.py b/main.py
index 1bed85b..bda33e5 100644
--- a/main.py
+++ b/main.py
@@ -7,7 +7,7 @@ import itertools
 import math
 import bokehCssPTB
 from urllib.parse import quote
-from dsiParser import dsiParser,format_special_scale_factor
+from dsiUnits import dsiUnit
 from bokeh.plotting import curdoc,figure
 from bokeh.layouts import column, row
 from bokeh.models import FileInput, Div, CustomJS, Button, TabPanel, Tabs, Dropdown, TextInput, Button, MathText, Label, Arrow, NormalHead,CheckboxGroup
@@ -63,8 +63,7 @@ class dsiparserInput():
     def parseInput(self):
         self.results.children = []
         input = self.dsiInput.value
-        p = dsiParser()
-        resultTree = p.parse(input)
+        resultTree = dsiUnit(input)
 
         parsingMessages = []
         if resultTree.valid:
diff --git a/requirements.txt b/requirements.txt
index eb910b8..3d806be 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
 bokeh~=3.3.2
--e git+https://dockerPull:-jVp9LBaxeKp9HKAe9dw@gitlab1.ptb.de/digitaldynamicmeasurement/bokehCssPtb.git#egg=bokehCssPTB
--e git+https://dockerPull:pYngV-zkWjSXmve9yEpx@gitlab1.ptb.de/digitaldynamicmeasurement/python_dsi_latex_converter.git@release#egg=dsiParser
+#-e git+https://dockerPull:-jVp9LBaxeKp9HKAe9dw@gitlab1.ptb.de/digitaldynamicmeasurement/bokehCssPtb.git#egg=bokehCssPTB
+-e git+https://gitlab1.ptb.de/digitaldynamicmeasurement/bokehCssPtb.git#egg=bokehCssPTB
+dsiUnits~=2.2.1
-- 
GitLab