Skip to content

Commit

Permalink
Fix github action run
Browse files Browse the repository at this point in the history
  • Loading branch information
youandvern committed Mar 7, 2024
1 parent 5a54ab0 commit 164aee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -37,4 +37,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
python -m pytest
23 changes: 0 additions & 23 deletions pythonize_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,6 @@
from efficalc.sections.aisc_wide_flange import WideFlange


def csv_to_python_dictionary(filepath, output_filepath):
contents = ""
contents += "{"
with open(filepath, mode="r", encoding="utf-8") as file:
reader = csv.DictReader(file)
for row in reader:
contents += f'"{row["AISC_name"]}": WideFlange('
for key, val in row.items():
try:
contents += (
f"{key}={float(val) if key in WideFlange.number_fields else f'"{val}"'}, "
)
except ValueError as e:
print(f"Cannot convert value: {val} to number for field {key} on row {row["AISC_name"]}")
raise e
contents += f"),\n"

contents += "}"

# Write the string to a Python file as a static variable
with open(output_filepath, "w", encoding="utf-8") as py_file:
py_file.write(contents)

def get_all_sizes_from_csv(filepath, output_filepath):
contents = ""
contents += "("
Expand Down

0 comments on commit 164aee5

Please sign in to comment.