Skip to content

Commit

Permalink
Update black requirement from <=23.0,>=19.10b0 to >=19.10b0,<=24.8.0 …
Browse files Browse the repository at this point in the history
…in the pip group across 1 directory (#291)

* Update black requirement in the pip group across 1 directory

Updates the requirements on [black](https://github.com/psf/black) to permit the latest version.

Updates `black` to 24.8.0
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@19.10b0...24.8.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix lint error

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ruge Li <[email protected]>
  • Loading branch information
dependabot[bot] and rugeli authored Oct 7, 2024
1 parent bd9d6e1 commit 2ebc6ed
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 44 deletions.
11 changes: 7 additions & 4 deletions cellpack/autopack/Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,10 @@ def add_ingredient_positions_to_plot(
)
# plot the sphere
if ingr.use_rbsphere:
(ext_recipe, pts,) = ingr.getInterpolatedSphere(
(
ext_recipe,
pts,
) = ingr.getInterpolatedSphere(
seed_ingredient_positions[-i - 1],
seed_ingredient_positions[-i],
)
Expand Down Expand Up @@ -857,9 +860,9 @@ def update_pairwise_distances(
ingr.name,
ingr2.name,
):
pairwise_distance_dict[seed_index][
f"{ingr.name}_{ingr2.name}"
] = self.env.calc_pairwise_distances(ingr.name, ingr2.name).tolist()
pairwise_distance_dict[seed_index][f"{ingr.name}_{ingr2.name}"] = (
self.env.calc_pairwise_distances(ingr.name, ingr2.name).tolist()
)

return pairwise_distance_dict

Expand Down
18 changes: 9 additions & 9 deletions cellpack/autopack/DBRecipeHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ def resolve_local_regions(self, local_data, recipe_data, db):
if not DataDoc.is_key(key_or_dict):
obj_item = local_data["regions"][region_name][index]["object"]
if DataDoc.is_key(obj_item):
local_data["regions"][region_name][index][
"object"
] = prep_recipe_data["objects"][obj_item]
local_data["regions"][region_name][index]["object"] = (
prep_recipe_data["objects"][obj_item]
)
else:
local_data["regions"][region_name][index][
"object"
] = prep_recipe_data["objects"][obj_item["name"]]
local_data["regions"][region_name][index]["object"] = (
prep_recipe_data["objects"][obj_item["name"]]
)
# replace reference in obj with actual data
obj_data = local_data["regions"][region_name][index]["object"]
self.resolve_object_data(obj_data, prep_recipe_data)
Expand Down Expand Up @@ -362,9 +362,9 @@ def convert_representation(doc, db):
and doc_value["packing"] is not None
):
position_value = doc_value["packing"]["positions"]
convert_doc["representations"]["packing"][
"positions"
] = ObjectDoc.convert_positions_in_representation(position_value)
convert_doc["representations"]["packing"]["positions"] = (
ObjectDoc.convert_positions_in_representation(position_value)
)
return convert_doc

@staticmethod
Expand Down
14 changes: 7 additions & 7 deletions cellpack/autopack/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,10 @@ def resolve_gradient_data_objects(self, gradient_data):
"""
# TODO: check if other modes need to be resolved
if gradient_data["mode"] == "surface":
gradient_data["mode_settings"][
"object"
] = self.get_compartment_object_by_name(
gradient_data["mode_settings"]["object"]
gradient_data["mode_settings"]["object"] = (
self.get_compartment_object_by_name(
gradient_data["mode_settings"]["object"]
)
)
return gradient_data

Expand Down Expand Up @@ -2567,9 +2567,9 @@ def store_asJson(self, resultfilename=None, indent=True):
if r:
self.result_json["exteriorRecipe"] = OrderedDict()
for ingr in r.ingredients:
self.result_json["exteriorRecipe"][
ingr.composition_name
] = self.dropOneIngrJson(ingr, self.result_json["exteriorRecipe"])
self.result_json["exteriorRecipe"][ingr.composition_name] = (
self.dropOneIngrJson(ingr, self.result_json["exteriorRecipe"])
)

# compartment ingr
for orga in self.compartments:
Expand Down
7 changes: 1 addition & 6 deletions cellpack/autopack/GeometryTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,7 @@ def region_2_integrand(self, theta, rho, d):

def region_2(self, rho, d):
# require scipy
i4 = (
d**3
/ 6.0
* (rho**2 / d**2 - 1)
* (pi / 4 - self.region_1_2_theta(rho, d))
)
i4 = d**3 / 6.0 * (rho**2 / d**2 - 1) * (pi / 4 - self.region_1_2_theta(rho, d))
i3 = (
d**2
* rho
Expand Down
6 changes: 3 additions & 3 deletions cellpack/autopack/Graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,9 +1523,9 @@ def displayCompartmentsIngredients(self):
elif self.vi.host == "dejavu":
self.orgaToMasterGeom[ingr] = ingr.mesh
elif self.vi.host == "softimage":
self.orgaToMasterGeom[
ingr
] = ingr.mesh # self.getMasterInstance(polygon)
self.orgaToMasterGeom[ingr] = (
ingr.mesh
) # self.getMasterInstance(polygon)
# polygon already an instance from a different object\

j += 1
Expand Down
4 changes: 1 addition & 3 deletions cellpack/autopack/ingredient/single_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,7 @@ def cube_surface_distance(
current_distance = numpy.sqrt(dist_x**2 + dist_y**2)
else:
# vertex is the closest
current_distance = numpy.sqrt(
dist_x**2 + dist_y**2 + dist_z**2
)
current_distance = numpy.sqrt(dist_x**2 + dist_y**2 + dist_z**2)
return current_distance

def get_signed_distance(
Expand Down
5 changes: 4 additions & 1 deletion cellpack/autopack/ingredient/single_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def collision_jitter(
distance_to_packing_location - radius_of_ing_being_packed
)

(insidePoints, newDistPoints,) = self.get_new_distances_and_inside_points(
(
insidePoints,
newDistPoints,
) = self.get_new_distances_and_inside_points(
env,
jtrans,
rotMat,
Expand Down
8 changes: 5 additions & 3 deletions cellpack/autopack/interface_objects/partners.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ def __init__(self, partners):
partner["name"],
partner["position"] if "position" in partner else [0, 0, 0],
partner["weight"] if "weight" in partner else weight,
partner["binding_probability"]
if "binding_probability" in partner
else 1.0,
(
partner["binding_probability"]
if "binding_probability" in partner
else 1.0
),
)
self.all_partners.append(partner)

Expand Down
6 changes: 3 additions & 3 deletions cellpack/autopack/loaders/recipe_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def _load_json(self):
):
node = {"include": compartment["from"]}
sub_recipe = self._request_sub_recipe(inode=node)
recipe_data["compartments"][
compartment["from"]
] = sub_recipe["compartments"]
recipe_data["compartments"][compartment["from"]] = (
sub_recipe["compartments"]
)
continue
compartment_dict = recipe_data["compartments"][cname]
rep = None
Expand Down
1 change: 1 addition & 0 deletions cellpack/autopack/upy/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with upy. If not, see <http://www.gnu.org/licenses/gpl-3.0.html>.
"""

import numpy
from math import floor

Expand Down
1 change: 1 addition & 0 deletions cellpack/autopack/upy/simularium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
You should have received a copy of the GNU General Public License
along with upy. If not, see <http://www.gnu.org/licenses/gpl-3.0.html>.
"""

# CRITICAL_DEPENDENCIES = ['blender','c4d']
__revision__ = "01"
8 changes: 4 additions & 4 deletions cellpack/autopack/writers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ def save_Mixed_asJson(
"include": ing_filename,
}
else:
env.jsondic["cytoplasme"]["ingredients"][
ingr.composition_name
] = io_ingr.ingrJsonNode(
ingr, result=result, kwds=kwds, transpose=transpose
env.jsondic["cytoplasme"]["ingredients"][ingr.composition_name] = (
io_ingr.ingrJsonNode(
ingr, result=result, kwds=kwds, transpose=transpose
)
) # {"name":ingr.composition_name}
env.jsondic["cytoplasme"]["ingredients"][ingr.composition_name][
"name"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
]

test_requirements = [
"black>=19.10b0, <=23.0",
"black>=19.10b0, <=24.8.0",
"flake8>=3.8.3, <=6.0.0",
"flake8-debugger>=3.2.1",
"pytest>=5.4.3",
Expand Down

0 comments on commit 2ebc6ed

Please sign in to comment.