diff --git a/MANIFEST.in b/MANIFEST.in index c0b7bae1..0eed9cfc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,4 +2,5 @@ include *.pip include *.md include *.rst +include hcl2/hcl2.lark prune test diff --git a/README.md b/README.md index 131026da..b613cfe0 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Python HCL2 -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/dbdef52c39fb47c896aa1d7876a3a965)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python_hcl2&utm_campaign=Badge_Grade) -[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/dbdef52c39fb47c896aa1d7876a3a965)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python_hcl2&utm_campaign=Badge_Coverage) -[![Build Status](https://travis-ci.org/amplify-education/python_hcl2.svg?branch=master)](https://travis-ci.org/amplify-education/python_hcl2) -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/python_hcl2/master/LICENSE) -[![PyPI](https://img.shields.io/pypi/v/python_hcl2.svg)](https://pypi.org/project/python_hcl2/) -[![Python Versions](https://img.shields.io/pypi/pyversions/python_hcl2.svg)](https://pypi.python.org/pypi/python_hcl2) -[![Downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fpython_hcl2%2Frecent&query=data.last_month&colorB=brightgreen&suffix=%2FMonth)](https://pypistats.org/packages/python_hcl2) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/dbdef52c39fb47c896aa1d7876a3a965)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python-hcl2&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/dbdef52c39fb47c896aa1d7876a3a965)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python-hcl2&utm_campaign=Badge_Coverage) +[![Build Status](https://travis-ci.org/amplify-education/python-hcl2.svg?branch=master)](https://travis-ci.org/amplify-education/python-hcl2) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE) +[![PyPI](https://img.shields.io/pypi/v/python-hcl2.svg)](https://pypi.org/project/python-hcl2/) +[![Python Versions](https://img.shields.io/pypi/pyversions/python-hcl2.svg)](https://pypi.python.org/pypi/python-hcl2) +[![Downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fpython-hcl2%2Frecent&query=data.last_month&colorB=brightgreen&suffix=%2FMonth)](https://pypistats.org/packages/python-hcl2) A parser for [HCL2](https://github.com/hashicorp/hcl2/blob/master/hcl/spec.md) written in Python using [Lark](https://github.com/lark-parser/lark). This parser only supports HCL2 and isn't backwards compatible @@ -23,14 +23,14 @@ Learn more at ## Getting Started ### Prerequisites -python_hcl2 requires Python 3.6.0 or higher to run. +python-hcl2 requires Python 3.6.0 or higher to run. ### Installing This package can be installed using `pip` ```sh -pip3 install python_hcl2 +pip3 install python-hcl2 ``` ### Usage @@ -46,7 +46,7 @@ For development, `tox>=2.9.1` is recommended. ### Running Tests -python_hcl2 uses `tox`. You will need to install tox with `pip install tox`. +python-hcl2 uses `tox`. You will need to install tox with `pip install tox`. Running `tox` will automatically execute linters as well as the unit tests. You can also run them individually with the `-e` argument. diff --git a/bin/versionCheck.sh b/bin/versionCheck.sh index db4bda7e..a9280cce 100755 --- a/bin/versionCheck.sh +++ b/bin/versionCheck.sh @@ -8,13 +8,13 @@ IS_PULL_REQUEST=$2 # false if not a pull request, # Makes sure travis does not check version if doing a pull request if [ "$IS_PULL_REQUEST" != "false" ]; then - if git diff --quiet "origin/${TARGET_BRANCH}...HEAD" 'python_hcl2' "test" setup.* ./*.pip; then + if git diff --quiet "origin/${TARGET_BRANCH}...HEAD" 'python-hcl2' "test" setup.* ./*.pip; then echo "No changes found to main code or dependencies: no version change needed" exit 0 fi - CURRENT_VERSION=$(git show "origin/${TARGET_BRANCH}:python_hcl2/version.py" | sed -n 's/^__version__ = "\(.*\)"$/\1/p') - NEW_VERSION=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' python_hcl2/version.py) + CURRENT_VERSION=$(git show "origin/${TARGET_BRANCH}:hcl2/version.py" | sed -n 's/^__version__ = "\(.*\)"$/\1/p') + NEW_VERSION=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' hcl2/version.py) if [ "$CURRENT_VERSION" == "$NEW_VERSION" ]; then FAILURE_REASON="Failure reason: Version number should be bumped." diff --git a/hcl2/version.py b/hcl2/version.py index b6eef396..b9152015 100644 --- a/hcl2/version.py +++ b/hcl2/version.py @@ -1,4 +1,4 @@ """Place of record for the package version""" -__version__ = "0.1.0" +__version__ = "0.1.1" __git_hash__ = "GIT_HASH" diff --git a/package-lock.json b/package-lock.json index 3d69c030..7ea88dac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "python_hcl2", + "name": "python-hcl2", "requires": true, "lockfileVersion": 1, "dependencies": { diff --git a/package.json b/package.json index 04785e3a..bd1ede4c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "python_hcl2", + "name": "python-hcl2", "devDependencies": { "remark-cli": "^6.0.1", "remark-preset-lint-consistent": "^2.0.2", diff --git a/setup.py b/setup.py index e1598d15..c5be11c1 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,10 @@ def get_requirements(): setup( - name='python_hcl2', + name='python-hcl2', python_requires='>=3.6.0', version=get_version(), - description="A project for being awesome.", + description="A parser for HCL2", long_description=get_long_description(), long_description_content_type='text/markdown', # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers @@ -56,11 +56,10 @@ def get_requirements(): keywords='', author='Amplify Education', author_email='github@amplify.com', - url='https://github.com/amplify-education/python_hcl2', + url='https://github.com/amplify-education/python-hcl2', license='MIT', packages=find_packages(), include_package_data=True, - package_data={'': ['*.lark']}, zip_safe=False, install_requires=get_requirements(), test_suite='nose.collector',