File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change 16
16
strategy :
17
17
fail-fast : false
18
18
matrix :
19
- python-version : ["3.9", "3. 10", "3.11"]
19
+ python-version : ["3.10", "3.11"]
20
20
21
21
steps :
22
22
- uses : actions/checkout@v3
37
37
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38
38
- name : Test with pytest
39
39
run : |
40
- pytest
40
+ python -m pytest
Original file line number Diff line number Diff line change 3
3
from efficalc .sections .aisc_wide_flange import WideFlange
4
4
5
5
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
-
29
6
def get_all_sizes_from_csv (filepath , output_filepath ):
30
7
contents = ""
31
8
contents += "("
You can’t perform that action at this time.
0 commit comments