Skip to content

Commit

Permalink
precommit: make sure isort output is compatible with black (ECP-WarpX…
Browse files Browse the repository at this point in the history
…#3981)

* make sure isort output good for black
  • Loading branch information
RTSandberg authored Jun 12, 2023
1 parent f6cda9a commit ceef66c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ indent_size = unset
# isort config
force_sort_within_sections = true
known_first_party = amrex,impactx,picmistandard,pywarpx,warpx
# same as the "black" multi-line import style
multi_line_output = 3
include_trailing_comma = True
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ def launch_analysis(executable):
def main() :

from lasy.laser import Laser
from lasy.profiles import (CombinedLongitudinalTransverseProfile,
GaussianProfile)
from lasy.profiles import (
CombinedLongitudinalTransverseProfile,
GaussianProfile,
)
from lasy.profiles.longitudinal import GaussianLongitudinalProfile
from lasy.profiles.transverse import LaguerreGaussianTransverseProfile

Expand Down
7 changes: 5 additions & 2 deletions Tools/LibEnsemble/run_libensemble_on_warpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
import all_machine_specs
from libensemble import libE_logger
from libensemble.executors.mpi_executor import MPIExecutor
from libensemble.tools import (add_unique_random_streams, parse_args,
save_libE_output)
from libensemble.tools import (
add_unique_random_streams,
parse_args,
save_libE_output,
)

# Import machine-specific run parameters
if machine == 'local':
Expand Down
34 changes: 26 additions & 8 deletions Tools/PerformanceTests/run_automated.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,41 @@
import sys
import time

from functions_perftest import (extract_dataframe, get_file_content,
run_batch_nnode, store_git_hash)
from functions_perftest import (
extract_dataframe,
get_file_content,
run_batch_nnode,
store_git_hash,
)
import git
import pandas as pd

# Get name of supercomputer and import configuration functions from
# machine-specific file
if os.getenv("LMOD_SYSTEM_NAME") == 'summit':
machine = 'summit'
from summit import (executable_name, get_batch_string, get_config_command,
get_run_string, get_submit_job_command, get_test_list,
process_analysis, time_min)
from summit import (
executable_name,
get_batch_string,
get_config_command,
get_run_string,
get_submit_job_command,
get_test_list,
process_analysis,
time_min,
)
if os.getenv("NERSC_HOST") == 'cori':
machine = 'cori'
from cori import (executable_name, get_batch_string, get_config_command,
get_run_string, get_submit_job_command, get_test_list,
process_analysis, time_min)
from cori import (
executable_name,
get_batch_string,
get_config_command,
get_run_string,
get_submit_job_command,
get_test_list,
process_analysis,
time_min,
)

# typical use: python run_automated.py --n_node_list='1,8,16,32' --automated
# Assume warpx, picsar, amrex and perf_logs repos ar in the same directory and
Expand Down

0 comments on commit ceef66c

Please sign in to comment.