mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-19 03:24:50 -04:00
Enable ruff import sorting
This commit is contained in:
parent
706c856500
commit
4595e2cfb6
22 changed files with 70 additions and 55 deletions
13
.ruff.toml
13
.ruff.toml
|
@ -9,12 +9,10 @@ line-length=250
|
|||
|
||||
[lint]
|
||||
select = [
|
||||
"F", # various basic rules
|
||||
"E101", # indentation contains mixed spaces and tabs
|
||||
"E4", # imports
|
||||
"E7", # various improvements
|
||||
"E9", # error
|
||||
"W", # various warnings
|
||||
"F", # various basic rules (pyflakes)
|
||||
"E", # errors (pycodestyle)
|
||||
"W", # warnings (pycodestyle)
|
||||
"I", # Import related rules (isort)
|
||||
"UP", # Upgraded version available in newer Python
|
||||
"EXE", # Executable file shebangs
|
||||
"Q003", # Avoidable escaped quotes
|
||||
|
@ -23,10 +21,11 @@ select = [
|
|||
]
|
||||
|
||||
ignore = [
|
||||
"E501", # line too long
|
||||
"E701", "E702", # multiple statements on one line
|
||||
"E722", # do not use bare 'except'
|
||||
"E741", # ambiguous variable name
|
||||
"RUF005", # iterable unpacking in list
|
||||
"W291", # trailing whitespace
|
||||
"W293", # blank line contains whitespace
|
||||
"RUF005", # iterable unpacking in list
|
||||
]
|
||||
|
|
|
@ -29,9 +29,10 @@
|
|||
###########################################################################################
|
||||
|
||||
|
||||
import csv
|
||||
import os
|
||||
import re
|
||||
import csv
|
||||
|
||||
# list of architectures to run.
|
||||
arch_list = [
|
||||
"rv32i_zicsr",
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
# Run embench on a variety of architectures and collate results
|
||||
|
||||
import os
|
||||
from datetime import datetime
|
||||
import re
|
||||
import collections
|
||||
import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
archs = ["rv32i_zicsr", "rv32im_zicsr", "rv32imc_zicsr", "rv32imc_zba_zbb_zbc_zbs_zicsr", "rv32imafdc_zba_zbb_zbc_zbs_zicsr"]
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
# Daniel Torres 2022
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import json
|
||||
|
||||
import plotly.graph_objects as go
|
||||
from plotly.subplots import make_subplots
|
||||
|
||||
|
|
|
@ -41,11 +41,12 @@
|
|||
# Add -d or --dist to report the distribution of loads, stores, and atomic ops.
|
||||
# These distributions may not add up to 100; this is because of flushes or invalidations.
|
||||
|
||||
import math
|
||||
import argparse
|
||||
import math
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class CacheLine:
|
||||
def __init__(self):
|
||||
self.tag = 0
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
|
||||
|
||||
import argparse
|
||||
import multiprocessing
|
||||
import os
|
||||
import sys
|
||||
import multiprocessing
|
||||
from multiprocessing import Pool, TimeoutError as MPTimeoutError
|
||||
from multiprocessing import Pool
|
||||
from multiprocessing import TimeoutError as MPTimeoutError
|
||||
|
||||
TIMEOUT_DUR = 60 # 1` minute
|
||||
|
||||
class bcolors:
|
||||
|
|
|
@ -66,17 +66,18 @@ Conclusion:
|
|||
In summary, this Python script facilitates the automation of nightly regression builds, providing comprehensive reporting and email notification capabilities to ensure effective communication and monitoring of regression test results.
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from datetime import datetime
|
||||
import time
|
||||
import re
|
||||
import markdown
|
||||
import subprocess
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
import markdown
|
||||
|
||||
|
||||
class FolderManager:
|
||||
"""A class for managing folders and repository cloning."""
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
## and limitations under the License.
|
||||
################################################################################################
|
||||
|
||||
import argparse
|
||||
import math
|
||||
import os
|
||||
import sys
|
||||
import matplotlib.pyplot as plt
|
||||
import math
|
||||
import numpy as np
|
||||
import argparse
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
RefDataBP = [('twobitCModel6', 'twobitCModel', 64, 128, 10.0060297551637), ('twobitCModel8', 'twobitCModel', 256, 512, 8.4320392215602), ('twobitCModel10', 'twobitCModel', 1024, 2048, 7.29493318805151),
|
||||
('twobitCModel12', 'twobitCModel', 4096, 8192, 6.84739616147794), ('twobitCModel14', 'twobitCModel', 16384, 32768, 5.68432926870082), ('twobitCModel16', 'twobitCModel', 65536, 131072, 5.68432926870082),
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
# output.
|
||||
#
|
||||
##################################
|
||||
import sys
|
||||
import shutil
|
||||
import os
|
||||
import argparse
|
||||
import multiprocessing
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
from multiprocessing import Pool, TimeoutError as MPTimeoutError
|
||||
from multiprocessing import Pool
|
||||
from multiprocessing import TimeoutError as MPTimeoutError
|
||||
|
||||
# Globals
|
||||
WALLY = os.environ.get('WALLY')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import shutil
|
||||
import os
|
||||
import shutil
|
||||
|
||||
# if WALLY is defined, then get it
|
||||
WALLY_HOME = os.getenv("WALLY")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def usage():
|
||||
print("Usage: ./renumber.py <input xdc file> <output xdc file>")
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
## either express or implied. See the License for the specific language governing permissions
|
||||
## and limitations under the License.
|
||||
################################################################################################
|
||||
import os
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# NOTE: make sure testbench.sv has the ICache and DCache loggers enabled!
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
# Madeleine Masser-Frye (mmmasserfrye@hmc.edu) 06/2022
|
||||
from collections import namedtuple
|
||||
import re
|
||||
import argparse
|
||||
import csv
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from matplotlib.cbook import flatten
|
||||
import matplotlib.pyplot as plt
|
||||
from collections import namedtuple
|
||||
|
||||
import matplotlib.lines as lines
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from adjustText import adjust_text
|
||||
from ppa.ppaAnalyze import noOutliers
|
||||
from matplotlib import ticker
|
||||
import argparse
|
||||
import os
|
||||
from matplotlib.cbook import flatten
|
||||
from ppa.ppaAnalyze import noOutliers
|
||||
|
||||
|
||||
def synthsintocsv():
|
||||
|
|
|
@ -5,18 +5,19 @@
|
|||
# James Stine james.stine@okstate.edu 15 October 2023
|
||||
#
|
||||
|
||||
import scipy.optimize as opt
|
||||
import subprocess
|
||||
import csv
|
||||
import re
|
||||
from matplotlib.cbook import flatten
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.lines as lines
|
||||
import matplotlib as mpl
|
||||
import numpy as np
|
||||
from collections import namedtuple
|
||||
import sklearn.metrics as skm # depricated, will need to replace with scikit-learn
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from collections import namedtuple
|
||||
|
||||
import matplotlib as mpl
|
||||
import matplotlib.lines as lines
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import scipy.optimize as opt
|
||||
import sklearn.metrics as skm # depricated, will need to replace with scikit-learn
|
||||
from matplotlib.cbook import flatten
|
||||
|
||||
|
||||
def synthsfromcsv(filename):
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
# James Stine james.stine@okstate.edu 15 October 2023
|
||||
#
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import subprocess
|
||||
from multiprocessing import Pool
|
||||
|
||||
from ppaAnalyze import synthsfromcsv
|
||||
|
||||
|
||||
def runCommand(module, width, tech, freq):
|
||||
command = f"make synth DESIGN={module} WIDTH={width} TECH={tech} DRIVE=INV FREQ={freq} MAXOPT=1 MAXCORES=1"
|
||||
subprocess.call(command, shell=True)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
# Madeleine Masser-Frye mmasserfrye@hmc.edu 1/2023
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
from multiprocessing import Pool
|
||||
import argparse
|
||||
|
||||
|
||||
def runSynth(config, mod, tech, freq, maxopt, usesram):
|
||||
global pool
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import fileinput
|
||||
import sys
|
||||
|
||||
address = 0
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
# extract all arch test vectors
|
||||
import os
|
||||
|
||||
wally = os.popen('echo $WALLY').read().strip()
|
||||
|
||||
def ext_bits(my_string):
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# date created: 3-29-2023
|
||||
|
||||
import os
|
||||
|
||||
wally = os.popen('echo $WALLY').read().strip()
|
||||
# print(wally)
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
from pkgutil import extend_path
|
||||
|
||||
__path__ = extend_path(__path__, __name__)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
import riscof.utils as utils
|
||||
from riscof.pluginTemplate import pluginTemplate
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
import os
|
||||
import re
|
||||
import logging
|
||||
|
||||
import riscof.utils as utils
|
||||
from riscof.pluginTemplate import pluginTemplate
|
||||
|
|
Loading…
Add table
Reference in a new issue