Skip to content

Commit ab3c2d7

Browse files
committed
fixed relative imports, added all routes, updated README
1 parent 9028dae commit ab3c2d7

17 files changed

Lines changed: 41 additions & 14 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
# Ignore backups
33
**/*_safe/*
4+
safe_*
45

56
# Ignore compiled
67
**/*.pyc

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# Numerical-Analysis-
22

33
### Installation
4-
`pip install -r requirements.txt` to get started
4+
`pip install -r requirements.txt` to get started
5+
To run the app, run `make.bat` if you're on Windows, `make` otherwise (equivalent to `python app.py` ?).
6+
7+
### TODO:
8+
+ relative reference introduced in subprojects, they work standalone and integrated in app.py
9+
+ change `/` -> `/precision` for example is not `localhost:5000/precision`, but `localhost:5000/tema1/precision`
10+
+ same for files loaded from txt
11+
+ patched - modules loaded in subprojects are now loaded relative
12+
+ make an index for `front.py` (or make an `SPA` with ng1)

Tema1/__init__.py

Whitespace-only changes.

Tema1/tema_GUI.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import tema as tm
1+
#import tema as tm
2+
from . import tema as tm
23

34
from flask import Flask
45
from flask import render_template

Tema2/__init__.py

Whitespace-only changes.

Tema2/tema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import util
1+
# import util
2+
from . import util
23
from sympy import Matrix
34

45

Tema2/tema_GUI.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from tema import LDL_Decomposition
1+
#from tema import LDL_Decomposition
2+
from .tema import LDL_Decomposition
23
from sympy import Matrix
34

45
from flask import Flask

Tema3/__init__.py

Whitespace-only changes.

Tema3/hw3_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import time
22
from datetime import timedelta
3-
from Sparse import Sparse
4-
from cn_parser import Parser
3+
# from Sparse import Sparse
4+
# from cn_parser import Parser
5+
from .Sparse import Sparse
6+
from .cn_parser import Parser
57

68

79
class Test:

Tema3/hw4_solver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from cn_parser import Parser
1+
# from cn_parser import Parser
2+
from .cn_parser import Parser
23
import math
34
from decimal import Decimal
45

0 commit comments

Comments
 (0)