Skip to content

Commit

Permalink
Move get_resource to preserve alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-blanco committed Feb 29, 2024
1 parent 6d54cd6 commit 893e566
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions pyMBE.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,20 @@ def get_radius_map(self):

return radius_map

def get_resource(self, path):
'''
Locate a file resource of the pyMBE package.
Args:
path(`str`): Relative path to the resource
Returns:
path(`int`): Absolute path to the resource
'''
import os
return os.path.join(os.path.dirname(__file__), path)

def get_type_map(self):
"""
Gets all different espresso types assigned to particles in `pmb.df`.
Expand Down Expand Up @@ -2750,16 +2764,4 @@ def write_output_vtf_file(self, espresso_system, filename):
coordinates.write (f'{particle.id} \t {particle.pos[0]} \t {particle.pos[1]} \t {particle.pos[2]}\n')
return

def get_resource(self, path):
'''
Locate a file resource of the pyMBE package.
Args:
path(`str`): Relative path to the resource

Returns:
path(`int`): Absolute path to the resource
'''
import os
return os.path.join(os.path.dirname(__file__), path)

0 comments on commit 893e566

Please sign in to comment.