Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Aircraft Design
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNICADO
Aircraft Design
Commits
c6dad9ff
Commit
c6dad9ff
authored
1 month ago
by
Maurice Zimmnau
Browse files
Options
Downloads
Patches
Plain Diff
Added helper script to evaluate the design evaluator results
parent
f0888754
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1626300
failed
1 month ago
Stage: setup
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.ci-scripts/utils/evaluate_designEvaluator_results.py
+46
-0
46 additions, 0 deletions
.ci-scripts/utils/evaluate_designEvaluator_results.py
with
46 additions
and
0 deletions
.ci-scripts/utils/evaluate_designEvaluator_results.py
0 → 100644
+
46
−
0
View file @
c6dad9ff
import
argparse
import
pandas
as
pd
from
bs4
import
BeautifulSoup
import
numpy
as
np
from
io
import
StringIO
import
sys
def
check_html_file
(
html_file
):
# Load and parse the HTML file with BeautifulSoup
with
open
(
html_file
,
'
r
'
)
as
file
:
soup
=
BeautifulSoup
(
file
,
'
lxml
'
)
# Find all tables in the HTML file (in case there are multiple)
tables
=
soup
.
find_all
(
'
table
'
)
# Select the first table (assuming there's only one)
table
=
tables
[
0
]
table
=
str
(
table
)
# Convert the HTML table to a Pandas DataFrame
df
=
pd
.
read_html
(
StringIO
(
table
))[
0
]
# Check the values in the fourth column (index 3)
has_deviation
=
False
for
index
,
value
in
enumerate
(
df
.
iloc
[:,
3
]):
if
not
pd
.
isna
(
value
)
and
value
not
in
[
'
-nan
'
,
'
nan
'
,
0
]:
first_column_value
=
df
.
iloc
[
index
,
0
]
# Get the first column value of this row
print
(
f
"
Warning: Deviation in
'
{
first_column_value
}
'
.
"
)
print
(
f
"
Deviation between server version and calculation with feature:
'
{
value
}
'"
)
has_deviation
=
True
if
has_deviation
:
sys
.
exit
(
2
)
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'
Check an HTML file for invalid values in the fourth column.
'
)
parser
.
add_argument
(
'
--file
'
,
type
=
str
,
help
=
'
Path to the HTML file
'
)
args
=
parser
.
parse_args
()
check_html_file
(
args
.
file
)
if
__name__
==
"
__main__
"
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment