Skip to content

Commit 164aee5

Browse files
committed
Fix github action run
1 parent 5a54ab0 commit 164aee5

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11"]
19+
python-version: ["3.10", "3.11"]
2020

2121
steps:
2222
- uses: actions/checkout@v3
@@ -37,4 +37,4 @@ jobs:
3737
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3838
- name: Test with pytest
3939
run: |
40-
pytest
40+
python -m pytest

pythonize_csv.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,6 @@
33
from efficalc.sections.aisc_wide_flange import WideFlange
44

55

6-
def csv_to_python_dictionary(filepath, output_filepath):
7-
contents = ""
8-
contents += "{"
9-
with open(filepath, mode="r", encoding="utf-8") as file:
10-
reader = csv.DictReader(file)
11-
for row in reader:
12-
contents += f'"{row["AISC_name"]}": WideFlange('
13-
for key, val in row.items():
14-
try:
15-
contents += (
16-
f"{key}={float(val) if key in WideFlange.number_fields else f'"{val}"'}, "
17-
)
18-
except ValueError as e:
19-
print(f"Cannot convert value: {val} to number for field {key} on row {row["AISC_name"]}")
20-
raise e
21-
contents += f"),\n"
22-
23-
contents += "}"
24-
25-
# Write the string to a Python file as a static variable
26-
with open(output_filepath, "w", encoding="utf-8") as py_file:
27-
py_file.write(contents)
28-
296
def get_all_sizes_from_csv(filepath, output_filepath):
307
contents = ""
318
contents += "("

0 commit comments

Comments
 (0)