Skip to content

Commit

Permalink
Update Stub Files
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l authored and github-actions[bot] committed Apr 29, 2024
1 parent 84a1167 commit d5a30d3
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions examples/aperture/run_aperture.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# -*- coding: utf-8 -*-

import amrex.space3d as amr

from impactx import ImpactX, distribution, elements

# work-around for https://github.com/ECP-WarpX/impactx/issues/499
Expand Down
1 change: 1 addition & 0 deletions examples/fodo_tune/run_fodo_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# -*- coding: utf-8 -*-

import amrex.space3d as amr

from impactx import ImpactX, distribution, elements

sim = ImpactX()
Expand Down
1 change: 1 addition & 0 deletions examples/initialize_from_array/run_from_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import amrex.space3d as amr
import numpy as np
import transformation_utilities as pycoord

from impactx import Config, ImpactX, elements

################
Expand Down
5 changes: 3 additions & 2 deletions examples/optimize_triplet/run_triplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# -*- coding: utf-8 -*-

import amrex.space3d as amr
import impactx
import numpy as np
from impactx import ImpactX, distribution, elements
from scipy.optimize import minimize

import impactx
from impactx import ImpactX, distribution, elements

# Call MPI_Init and MPI_Finalize only once:
if impactx.Config.have_mpi:
from mpi4py import MPI # noqa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import numpy as np
import scipy.optimize as opt
from surrogate_model_definitions import surrogate_model

from impactx import (
Config,
CoordSystem,
Expand All @@ -29,7 +31,6 @@
distribution,
elements,
)
from surrogate_model_definitions import surrogate_model

try:
import torch
Expand Down
1 change: 1 addition & 0 deletions src/python/impactx/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ from __future__ import annotations
import os as os

from amrex import space3d as amr

from impactx.impactx_pybind import (
Config,
CoordSystem,
Expand Down
3 changes: 2 additions & 1 deletion tests/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import os

import amrex.space3d as amr
import impactx
import pytest

import impactx

if impactx.Config.have_mpi:
from mpi4py import MPI # noqa

Expand Down
3 changes: 2 additions & 1 deletion tests/python/test_charge_deposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import math

import amrex.space3d as amr
import impactx
import matplotlib.pyplot as plt
import numpy as np
from conftest import basepath

import impactx


def test_charge_deposition(save_png=True):
"""
Expand Down
1 change: 1 addition & 0 deletions tests/python/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import matplotlib.pyplot as plt
import pytest

from impactx import ImpactX, amr, distribution, elements


Expand Down
1 change: 1 addition & 0 deletions tests/python/test_impactx.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np
import pytest
from conftest import basepath

from impactx import ImpactX, distribution, elements

# FIXME in AMReX via https://github.com/AMReX-Codes/amrex/pull/3727
Expand Down
1 change: 1 addition & 0 deletions tests/python/test_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pytest

from impactx import CoordSystem, ImpactX, coordinate_transformation, distribution


Expand Down
3 changes: 2 additions & 1 deletion tests/python/test_xopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
import importlib

import amrex.space3d as amr
import impactx
import numpy as np
import pytest

import impactx
from impactx import ImpactX, distribution, elements

# configure the test
Expand Down

0 comments on commit d5a30d3

Please sign in to comment.