diff --git a/LICENSE b/LICENSE index aff56f9..6e1d4e8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 WSP Canada Inc. +Copyright (c) 2021 WSP Canada Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/conda_recipe/bld.bat b/conda_recipe/bld.bat deleted file mode 100644 index a424c29..0000000 --- a/conda_recipe/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -python setup.py install --single-version-externally-managed --record=record.txt -if errorlevel 1 exit 1 diff --git a/conda_recipe/meta.yaml b/conda_recipe/meta.yaml index d2c000d..5c120df 100644 --- a/conda_recipe/meta.yaml +++ b/conda_recipe/meta.yaml @@ -8,8 +8,8 @@ source: path: ../ build: - number: auto noarch: python + script: python setup.py --quiet install --single-version-externally-managed --record record.txt requirements: host: @@ -22,7 +22,7 @@ about: home: https://github.com/wsp-sag/wsp-jacquard license: MIT license_file: LICENSE - summary: JSON-based configuration handler for models. + summary: JSON-based configuration handler for models extra: maintainers: diff --git a/jacquard/jacquard.py b/jacquard/jacquard.py index e5fa0ef..78b15da 100644 --- a/jacquard/jacquard.py +++ b/jacquard/jacquard.py @@ -7,7 +7,7 @@ from six import iteritems, StringIO -from .api import (JacquardParseError, JacquardSpecificationError, JacquardTypeError, JacquardValue, is_identifier, +from .api import (JacquardParseError, JacquardSpecificationError, JacquardTypeError, JacquardValue, is_identifier, open_file) @@ -149,15 +149,16 @@ def serialize(self): child_dict[attr] = item return child_dict - def to_file(self, fp): + def to_file(self, fp, sort_keys=False): """Writes the Jacquard to a JSON file. Args: fp (str): File path to the output files + sort_keys (bool, optional): Defaults to ``True``. """ dict_ = self.serialize() with open_file(fp, mode='w') as writer: - json.dump(dict_, writer, indent=2) + json.dump(dict_, writer, indent=2, sort_keys=sort_keys) @classmethod def from_file(cls, fp): diff --git a/jacquard/version.py b/jacquard/version.py index 1f356cc..cd7ca49 100644 --- a/jacquard/version.py +++ b/jacquard/version.py @@ -1 +1 @@ -__version__ = '1.0.0' +__version__ = '1.0.1' diff --git a/setup.py b/setup.py index cdf40fa..1ed6c78 100644 --- a/setup.py +++ b/setup.py @@ -5,15 +5,14 @@ version = {} with open(path.join(path.dirname(path.realpath(__file__)), 'jacquard', 'version.py')) as fp: exec(fp.read(), {}, version) -version_string = safe_version(version['__version__']) setup( name='wsp-jacquard', - version=version_string, + version=safe_version(version['__version__']), description='JSON-based configuration handler for models', url='https://github.com/wsp-sag/wsp-jacquard', author='WSP', - maintatiner='Brian Cheung', + maintainer='Brian Cheung', maintainer_email='brian.cheung@wsp.com', classifiers=[ 'License :: OSI Approved :: MIT License'