Skip to content

Commit

Permalink
moved into src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jgunstone committed Jul 7, 2022
1 parent 09e628f commit 38314bc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def readme():
long_description_content_type="text/markdown",
include_package_data=True,
keywords='xlsxtemplater',
packages=find_packages('src'),
package_dir={'': 'src'},
name='xlsxtemplater',
packages=find_packages(include=['xlsxtemplater', 'xlsxtemplater.*']),
url='https://github.com/gunstonej/xlsxtemplater',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions xlsxtemplater/templater.py → src/xlsxtemplater/templater.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def object_to_excel(toexcel: ToExcel, fpth: str, file_properties: FileProperties
def to_excel(data_object,
fpth,
file_properties: FileProperties=None,
openfile: bool=True,
openfile: bool=False,
make_readme: bool=True) -> str:
"""
function to output dataobject (list of dicts of dataframes and associated metadata)
Expand All @@ -128,7 +128,7 @@ def to_excel(data_object,
file_properties: FileProperties obj defining metadata
openfile: bool
make_readme: creates a readme header sheet. default to true. avoid changing unless
necessary as it is required for the from_excel command.
necessary as it is required for the from_excel comm and.
Returns:
fpth: of output excel file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class XlsxTable:

def __post_init__(self):
# apply default header row formatting
self.row_formatting.insert(0, SetRow(1,50,{'bold': True,'text_wrap': True, 'valign': 'top','border': 1}))
self.row_formatting.insert(0, SetRow(0,50,{'bold': True,'text_wrap': True, 'valign': 'top','border': 1}))

@dataclass
class FileProperties:
Expand Down
6 changes: 3 additions & 3 deletions xlsxtemplater/utils.py → src/xlsxtemplater/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# mf packages
# TODO - remove this dedendency if opensource
try:
from mf_file_utilities import applauncher_wrapper as aw
from mf_file_utilities.applauncher_wrapper import go as _open_file
except:
pass

Expand All @@ -23,8 +23,8 @@ def date():
# from mf_modules.file_operations import open_file
def open_file(filename):
"""Open document with default application in Python."""
if sys.platform == 'linux' and str(type(aw))== "<class 'module'>":
aw.open_file(filename)
if sys.platform == 'linux':
_open_file(filename)
# note. this is an MF custom App for opening folders and files
# from a Linux file server on the local network
else:
Expand Down

0 comments on commit 38314bc

Please sign in to comment.