Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Up #2

Merged
merged 7 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
include *.pip
include *.md
include *.rst
include hcl2/hcl2.lark
prune test
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,14 +23,14 @@ Learn more at <https://www.amplify.com>
## 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
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions bin/versionCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion hcl2/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Place of record for the package version"""

__version__ = "0.1.0"
__version__ = "0.1.1"
__git_hash__ = "GIT_HASH"
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "python_hcl2",
"name": "python-hcl2",
"devDependencies": {
"remark-cli": "^6.0.1",
"remark-preset-lint-consistent": "^2.0.2",
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -56,11 +56,10 @@ def get_requirements():
keywords='',
author='Amplify Education',
author_email='[email protected]',
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',
Expand Down