diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..4e5af4a --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,6 @@ +exclude-labels: + - 'skip-changelog' +template: | + ## Change Log + + $CHANGES diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..b4fb77a --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,61 @@ +name: build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel coveralls + python -m pip install --upgrade -r requirements-dev.txt + - name: Lint with flake8 + run: | + flake8 pymapadmin test + - name: Type checking with mypy + run: | + mypy pymapadmin test + - name: Test with pytest + run: | + py.test --cov=pymapadmin + - name: Report test coverage to Coveralls + if: success() + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + coveralls --service=github + + docs: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade -r requirements-dev.txt + python -m pip install --upgrade -r doc/requirements.txt + - name: Build the Sphinx documentation + run: | + make -C doc html diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..1ffe4fe --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,52 @@ +name: publish + +on: + release: + types: [ published ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* + + docs: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade -r requirements-dev.txt + python -m pip install --upgrade -r doc/requirements.txt + - name: Build the Sphinx documentation + run: | + make -C doc html + - name: Deploy to GitHub Pages + if: success() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ github.token }} + publish_dir: ./doc/build/html diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..2de63b7 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,15 @@ +name: draft + +on: + push: + branches: + - master + +jobs: + update_release_draft: + + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.lvimrc b/.lvimrc index 49c62e2..5f6e825 100644 --- a/.lvimrc +++ b/.lvimrc @@ -1,4 +1,3 @@ -let g:ale_fix_on_save = 1 let g:ale_fixers = { \ 'python': ['autopep8'], \} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9a33bdd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: python -python: - - "3.9" -dist: bionic # https://docs.travis-ci.com/user/languages/python/#python-37-and-higher -install: - - travis_retry pip install -U -r doc/requirements.txt - - travis_retry pip install -U -r requirements-dev.txt - - travis_retry pip install coveralls -script: - - py.test --cov=pymapadmin - - mypy pymapadmin test - - flake8 pymapadmin test -after_success: - - coveralls - - make -C doc html -branches: - only: - - master - - /^\d+\.\d+.*$/ # version tags -deploy: - - provider: pages:git - local_dir: doc/build/html - on: - tags: true - edge: true - - provider: pypi - distributions: sdist bdist_wheel - skip_existing: true - on: - tags: true - edge: true diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 30b7f09..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "[python]": { - "editor.rulers": [ - 79 - ] - }, - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, - "python.linting.enabled": true, - "python.testing.unittestEnabled": false, - "python.testing.nosetestsEnabled": false, - "python.testing.pytestEnabled": true, - "python.testing.pytestArgs": [ - "test" - ] -} \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 2fb663d..012f610 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ ## The MIT License (MIT) -Copyright (c) 2019 Ian Good +Copyright (c) 2021 Ian Good 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/README.md b/README.md index 64c14ad..a57c9f0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ pymap-admin =========== -[![Build Status](https://travis-ci.com/icgood/pymap-admin.svg?branch=master)](https://travis-ci.com/icgood/pymap-admin) +[![build](https://github.com/icgood/pymap-admin/actions/workflows/python-package.yml/badge.svg)](https://github.com/icgood/pymap-admin/actions/workflows/python-package.yml) [![Coverage Status](https://coveralls.io/repos/icgood/pymap-admin/badge.svg)](https://coveralls.io/r/icgood/pymap-admin) [![PyPI](https://img.shields.io/pypi/v/pymap-admin.svg)](https://pypi.python.org/pypi/pymap-admin) [![PyPI](https://img.shields.io/pypi/pyversions/pymap-admin.svg)](https://pypi.python.org/pypi/pymap-admin) diff --git a/requirements-all.txt b/requirements-all.txt new file mode 100644 index 0000000..e1baf77 --- /dev/null +++ b/requirements-all.txt @@ -0,0 +1 @@ +-e '.[optional]' diff --git a/requirements-dev.txt b/requirements-dev.txt index 1ad035d..c8d267f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,4 +6,5 @@ pytest-asyncio pytest-cov rope --e '.[optional,build]' +-r requirements-all.txt +-e '.[build]' diff --git a/setup.py b/setup.py index 7813691..3315f3e 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ian C. Good +# Copyright (c) 2021 Ian C. Good # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ setup(name='pymap-admin', - version='0.7.0', + version='0.7.1', author='Ian Good', author_email='ian@icgood.net', description='Admin tool for running pymap instances.',