iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
reader: finally, add new Store class for the estimations 673b7daa8213807d0217089b3317674595156f6d I am 2022-12-03 17:46:22
f_models.SNorm: hotfix 5f364d1770e18d18fb810760b6207c905b551762 I am 2022-12-02 21:33:48
f_models: rewrite SNorm in lazy way. Old SNorm class renamed to SNormClassic 3b6805b2a1d0bce88960bc016bbe74bb5274810b I am 2022-12-02 21:11:37
simplex: implement CircumCenter class 0a1a67122854cfb331f696163f22cfc67331f3e8 I am 2022-12-01 01:40:38
voronoi.ContactVoronoi: add explore_couple() method 72f4dffa5e8e7ee3165df4648f6a35d75d6678a3 I am 2022-11-29 11:59:07
voronoi: almost finished 00b697466c226212aeb1ea76a717cf3db48c3187 I am 2022-11-28 16:28:48
voronoi: WIP 29c59822f96df4efd6d1c6555a6fa083a869a2c8 I am 2022-11-28 11:14:50
voronoi: WIP, clean up 8e776235f7603a9bc7f3d8254976224a81bb153e I am 2022-11-27 19:56:34
voronoi: WIP 41e506eacb502853a1cf70023e7b276539579af7 I am 2022-11-27 13:03:08
convex_hull: optimize orth basis generation 4ebfde2955aa792fb31075bf9ac8af718ae07b29 I am 2022-11-26 15:35:21
voronoi: WIP 8f7f3bca7c4333ab579e057438c8c64208d1f60e I am 2022-11-26 11:22:55
voronoi: remove the code already moved to wireframe module fe57b4b699e8689d35afb510f704019152566f09 I am 2022-11-25 09:25:55
qt_gui.qt_pairwise.ContactWidget: show Qhull request at most once. db6af332a70786759692175384f4b7e779b4caca I am 2022-11-16 13:26:04
wireframe.LinearSolver: polytope handle hotfix bc48de3193ce9be482cc4dd068a26f48ea1e0203 I am 2022-11-16 13:24:41
qt_gui.qt_pairwise.ContactWidget: add LP methods 8dbd480ca80aabe1c7e0e689780767b78c86c1d1 I am 2022-11-16 11:33:32
wireframe: implement two LP solvers 8aecd55104ce85ccccf872ebef0052a5937415b5 I am 2022-11-16 11:32:31
qt_gui.qt_pairwise.ContactWidget: add Gabriel adjacency 86eaf302b176612fad072a2248e2c724d32be755 I am 2022-11-16 06:17:53
wireframe: implement Gabriel adjacency f0a74b4f28cec6c2ddc68d6811e0a812fc829d63 I am 2022-11-16 06:16:58
qt_gui.qt_pairwise.ContactWidget: reflect updated wireframe b00a9be23d92d999e0020426a7a5caa1206c5862 I am 2022-11-16 03:56:57
wireframe: implement LocalizedHull class 95c19144c5144461db241df1b2bd20d8950c8d57 I am 2022-11-16 03:55:59
Commit 673b7daa8213807d0217089b3317674595156f6d - reader: finally, add new Store class for the estimations
Author: I am
Author date (UTC): 2022-12-03 17:46
Committer name: I am
Committer date (UTC): 2022-12-03 17:46
Parent(s): 5f364d1770e18d18fb810760b6207c905b551762
Signer:
Signing key:
Signing status: N
Tree: e38bf948756fde5e38329587d3fd519e37ea2194
File Lines added Lines deleted
wellmet/reader.py 66 0
File wellmet/reader.py changed (mode: 100644) (index 5c8f8cc..eba49da)
... ... import numpy as np
4 4 from .samplebox import SampleBox from .samplebox import SampleBox
5 5 from .f_models import Ingot from .f_models import Ingot
6 6
7
8 class ExportError(BaseException):
9 pass
10
11
12 class Store(list):
13 """
14 stateful object to keep consistency of using append()
15 # reader bude pokažde otevirat/zavirat soubor, což není úplně ideální,
16 # ale zás,
17 # předpokladá se, že každej vzorek musí být schvalen vědeckou radou
18 # csv umožňuje dozápis
19 """
20
21 #č pro formu. Když už dědíme až od seznamu!
22 __slots__ = ('filename', 'namedtuple')
23
24 def __new__(cls):
25 raise Exception("Please, use Store.create() constructor")
26
27 @classmethod
28 def create(cls, filename, namedtuple):
29 # piece of black magic
30 self = super().__new__(cls)
31
32 try:
33 with open(filename + '.csv', 'r', newline='', encoding='utf-8') as f:
34 reader = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC)
35 #č první řadek - jmeno n-tice
36 first_row = next(reader)
37 if namedtuple.__name__ != first_row[0]:
38 raise ExportError("%s of target csv is different from %s passed"%\
39 (namedtuple.__name__, first_row[0]))
40 if namedtuple._fields != tuple(next(reader)):
41 raise ExportError("Target csv have inconsictent data")
42
43 #č aby pandas nám vytvořil pěkné krasné hlavičky
44 #č a seznam seznamů sežral,
45 #č první položka musí být namedtuple.
46 list.append(self, namedtuple(*next(reader)))
47
48 list.extend(self, reader)
49
50 except FileNotFoundError:
51 pass
52
53 self.filename = filename
54 self.namedtuple = namedtuple
55
56 return self
57
58
59 def append(self, estimation):
60 if not isinstance(estimation, self.namedtuple):
61 raise ExportError("Data are of incorrect type")
62 with open(self.filename + '.csv', 'a', newline='', encoding='utf-8') as csvfile:
63 csv_writer = csv.writer(csvfile, quoting=csv.QUOTE_NONNUMERIC)
64 if csvfile.tell() == 0:
65 csv_writer.writerow([estimation.__class__.__name__])
66 csv_writer.writerow(estimation._fields)
67 csv_writer.writerow(estimation)
68
69 super().append(estimation)
70
71
72
7 73 #č Mám hrozné vzpomínky z ladění csv-čka. #č Mám hrozné vzpomínky z ladění csv-čka.
8 74 #č Pamatuji si, jak po opakované opravě chyby exportu #č Pamatuji si, jak po opakované opravě chyby exportu
9 75 #č jsem vztekl a posunul celou tu funkcionalitu do tohoto modulu. #č jsem vztekl a posunul celou tu funkcionalitu do tohoto modulu.
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main