diff --git a/.github/actions/prepare_poetry_env/action.yml b/.github/actions/prepare_poetry_env/action.yml index 076b029..0c49983 100644 --- a/.github/actions/prepare_poetry_env/action.yml +++ b/.github/actions/prepare_poetry_env/action.yml @@ -13,7 +13,7 @@ runs: python-version: ${{ inputs.python-version }} - uses: abatilo/actions-poetry@v2 with: - poetry-version: 1.2.0 + poetry-version: 1.4.0 - name: Poetry install run: poetry install shell: bash diff --git a/.github/workflows/check_setup_py.yaml b/.github/workflows/check_setup_py.yaml deleted file mode 100644 index 876f7e7..0000000 --- a/.github/workflows/check_setup_py.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Check if setup.py is up to date - -on: [push] - -jobs: - check_setup_py: - strategy: - fail-fast: false - matrix: - python-version: [3.8] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - uses: abatilo/actions-poetry@v2.0.0 - with: - poetry-version: 1.2.2 - - name: Poetry install - run: poetry install - - name: Run packaging update - run: bash githooks/update_setup_py.sh - - name: Show changes on working copy - run: git status --porcelain=v1 -uno - - name: Show diff on working copy - run: git diff --cached; cat setup.py - - name: Check if setup.py changed - run: | - [ -z "$(git status --porcelain=v1 -uno 2>/dev/null)" ] - - name: Check if setup.py works - run: pip install . diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index c112e52..122991d 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -21,7 +21,7 @@ jobs: python-version: ${{ matrix.python-version }} - uses: abatilo/actions-poetry@v2.0.0 with: - poetry-version: 1.2.2 + poetry-version: 1.4.0 - name: Poetry install run: poetry install - name: Poetry build diff --git a/doc/changes/changes_0.4.0.md b/doc/changes/changes_0.4.0.md new file mode 100644 index 0000000..39f4286 --- /dev/null +++ b/doc/changes/changes_0.4.0.md @@ -0,0 +1,11 @@ +# error-reporting-python 0.4.0, released T.B.D + +Code Name: T.B.D + +## Summary + +T.B.D + +### Refactoring + + - #17: Removed setup.py and updated poetry in actions \ No newline at end of file diff --git a/githooks/pre-commit b/githooks/pre-commit index 68b0019..907b599 100755 --- a/githooks/pre-commit +++ b/githooks/pre-commit @@ -7,5 +7,4 @@ REPO_DIR=$(git rev-parse --show-toplevel) GITHOOKS_PATH="$REPO_DIR/githooks" pushd "$REPO_DIR" bash "$GITHOOKS_PATH/prohibit_commit_to_main.sh" -bash "$GITHOOKS_PATH/update_setup_py.sh" popd diff --git a/githooks/update_setup_py.sh b/githooks/update_setup_py.sh deleted file mode 100755 index 58d8182..0000000 --- a/githooks/update_setup_py.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -# define colors for use in output -green='\033[0;32m' -no_color='\033[0m' -grey='\033[0;90m' - -# Jump to the current project's root directory (the one containing -# .git/) -ROOT_DIR=$(git rev-parse --show-toplevel || echo) -NO_GIT=FALSE -if [ -z "$ROOT_DIR" ] -then - echo "Did not found git repository, using '$PWD' as ROOT_DIR" - NO_GIT=TRUE - ROOT_DIR=$PWD -fi - - -pushd "$ROOT_DIR" > /dev/null - -echo -e "Generate setup.py ${grey}(pre-commit hook)${no_color}" -if [ -d "dist" ] -then - rm -r "dist" -fi -poetry build > /dev/null -pushd dist > /dev/null -tar_file=$(ls *.tar.gz) -extracted_dir=${tar_file%.tar.gz} -tar -xf $tar_file -cp "$extracted_dir/setup.py" ../setup.py -rm -r "$extracted_dir" -popd > /dev/null - -if [ "$NO_GIT" == "FALSE" ] -then - echo -e "Add generated files ${grey}(pre-commit hook)${no_color}" - git add setup.py -fi - -popd > /dev/null diff --git a/pyproject.toml b/pyproject.toml index 4474c1f..f076e89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "exasol-error-reporting-python" -version = "0.3.0" +version = "0.4.0" description = "Exasol Python Error Reporting" license = "MIT" diff --git a/setup.py b/setup.py deleted file mode 100644 index e83c902..0000000 --- a/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup - -packages = \ -['exasol_error_reporting_python'] - -package_data = \ -{'': ['*']} - -setup_kwargs = { - 'name': 'exasol-error-reporting-python', - 'version': '0.3.0', - 'description': 'Exasol Python Error Reporting', - 'long_description': '# Error Reporting Python\n\nThis project contains a python library for describing Exasol error messages. \nThis library lets you define errors with a uniform set of attributes. \nFurthermore, the error message is implemented to be parseable, \nso that you can extract an error catalog from the code.\n\n\n## In a Nutshell\nCreate an error object:\n\n```python\nexa_error_obj = ExaError.message_builder(\'E-TEST-1\')\\\n .message("Not enough space on device {{device}}.")\\\n .mitigation("Delete something from {{device}}.")\\\n .mitigation("Create larger partition.")\\\n .parameter("device", "/dev/sda1", "name of the device") \n```\n\nUse it as string:\n\n```python\nprint(exa_error_obj)\n```\n\nResult:\n```\nE-TEST-1: Not enough space on device \'/dev/sda1\'. Known mitigations:\n* Delete something from \'/dev/sda1\'.\n* Create larger partition.\n```\n\n\nCheck out the [user guide](doc/user_guide/user_guide.md) for more details.\n\n### Information for Users\n\n* [User Guide](doc/user_guide/user_guide.md)\n* [Changelog](doc/changes/changelog.md)\n\nYou can find corresponding libraries for other languages here:\n\n* [Error reporting Java](https://github.com/exasol/error-reporting-java)\n* [Error reporting Lua](https://github.com/exasol/error-reporting-lua)\n* [Error reporting Go](https://github.com/exasol/error-reporting-go)\n* [Error reporting C#](https://github.com/exasol/error-reporting-csharp)\n\n### Information for Contributors\n\n* [System Requirement Specification](doc/system_requirements.md)\n* [Design](doc/design.md)\n* [Dependencies](doc/dependencies.md)', - 'author': 'Umit Buyuksahin', - 'author_email': 'umit.buyuksahin@exasol.com', - 'maintainer': 'None', - 'maintainer_email': 'None', - 'url': 'https://github.com/exasol/error-reporting-python', - 'packages': packages, - 'package_data': package_data, - 'python_requires': '>=3.8,<4.0', -} - - -setup(**setup_kwargs)