diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 0000000..2c48d2f --- /dev/null +++ b/.cz.toml @@ -0,0 +1,11 @@ +[tool] +[tool.commitizen] +name = "cz_conventional_commits" +version = "0.1.1" +tag_format = "v$version" +version_files = [ + "setup.py:^version", + "liwo_services/__init__.py:__version__", +] + +annotated_tag = true diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..3b19f7f --- /dev/null +++ b/.github/workflows/bump.yml @@ -0,0 +1,30 @@ +name: Bump version + +on: + push: + branches: + - master + +jobs: + bump-version: + if: "!startsWith(github.event.head_commit.message, 'bump:')" + runs-on: ubuntu-latest + name: "Bump version and create release with commitizen changelog" + steps: + - name: Check out + uses: actions/checkout@v2 + with: + token: "${{ secrets.GITHUB_TOKEN }}" + fetch-depth: 0 + - name: Create bump and changelog + uses: commitizen-tools/commitizen-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + changelog_increment_filename: body.md + - name: Release + uses: softprops/action-gh-release@v1 + with: + body_path: "body.md" + tag_name: ${{ env.REVISION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 84e5b53..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Config file for automatic testing at travis-ci.com - -language: python -python: - - 3.8 - - 3.7 - -# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: pip install -U tox-travis - -# Command to run tests, e.g. python setup.py test -script: tox diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7be143b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +## Unreleased + +## v0.1.1 (2021-03-31) + +## v0.1.0 (2021-02-23) diff --git a/liwo_services/__init__.py b/liwo_services/__init__.py index b269c18..1aa1760 100644 --- a/liwo_services/__init__.py +++ b/liwo_services/__init__.py @@ -1,5 +1,5 @@ """Top-level package for LIWO Services.""" __author__ = """Fedor Baart""" -__email__ = 'fedor.baart@deltares.nl' -__version__ = '0.1.0' +__email__ = "fedor.baart@deltares.nl" +__version__ = "0.1.1" diff --git a/requirements_dev.txt b/requirements_dev.txt index 283f5d5..b58199e 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,4 @@ pip==19.2.3 -bump2version==0.5.11 wheel==0.33.6 watchdog==0.9.0 flake8==3.7.8 @@ -9,4 +8,6 @@ Sphinx==1.8.5 twine==1.14.0 Click==7.0 pytest==4.6.5 -pytest-runner==5.1 \ No newline at end of file +pytest-runner==5.1 +commitizen-2.20.* +black==22.1.* diff --git a/setup.cfg b/setup.cfg index a535885..87f0f21 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,16 +1,3 @@ -[bumpversion] -current_version = 0.1.0 -commit = True -tag = True - -[bumpversion:file:setup.py] -search = version='{current_version}' -replace = version='{new_version}' - -[bumpversion:file:liwo_services/__init__.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' - [bdist_wheel] universal = 1 diff --git a/setup.py b/setup.py index 25f47da..d240329 100755 --- a/setup.py +++ b/setup.py @@ -2,52 +2,60 @@ """The setup script.""" -from setuptools import setup, find_packages +from setuptools import find_packages, setup -with open('README.rst') as readme_file: +with open("README.rst") as readme_file: readme = readme_file.read() -with open('HISTORY.rst') as history_file: +with open("HISTORY.rst") as history_file: history = history_file.read() -requirements = ['Click>=7.0', ] +requirements = [ + "Click>=7.0", +] -setup_requirements = ['pytest-runner', ] +setup_requirements = [ + "pytest-runner", +] -test_requirements = ['pytest>=3', ] +test_requirements = [ + "pytest>=3", +] + +version = "v0.1.1" setup( author="Fedor Baart", - author_email='fedor.baart@deltares.nl', - python_requires='>=3.5', + author_email="fedor.baart@deltares.nl", + python_requires=">=3.5", classifiers=[ - 'Development Status :: 2 - Pre-Alpha', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Natural Language :: English', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", ], description="LIWO Backend Services", entry_points={ - 'console_scripts': [ - 'liwo_services=liwo_services.cli:cli', + "console_scripts": [ + "liwo_services=liwo_services.cli:cli", ], }, install_requires=requirements, license="GNU General Public License v3", - long_description=readme + '\n\n' + history, + long_description=readme + "\n\n" + history, include_package_data=True, - keywords='liwo_services', - name='liwo_services', - packages=find_packages(include=['liwo_services', 'liwo_services.*']), + keywords="liwo_services", + name="liwo_services", + packages=find_packages(include=["liwo_services", "liwo_services.*"]), setup_requires=setup_requirements, - test_suite='tests', + test_suite="tests", tests_require=test_requirements, - url='https://github.com/Deltares/liwo_services', - version='0.1.0', + url="https://github.com/Deltares/liwo_services", + version=version, zip_safe=False, )