diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7523af2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# See LICENSE file for copyright and license information +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..bb564b3 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,36 @@ +# See LICENSE file for copyright and license information +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + analyze: + name: Analyze (python) + runs-on: 'ubuntu-latest' + timeout-minutes: 360 + permissions: + security-events: write + packages: read + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: python + build-mode: none + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:python" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..22a2b36 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +# See LICENSE file for copyright and license information +name: Python package + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + - name: Lint with pylint, vulture + run: | + pylint nncli tests --disable=parse-error + vulture nncli .vulture_whitelist.py + - name: Test with mypy + run: python -m pytest + - name: Build + run: | + flit build + make -C docs html man diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8b04943 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +# See LICENSE file for copyright and license information +name: Python release + +on: + push: + tags: [ "v*" ] + +jobs: + release: + + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Build package + run: | + python -m pip install build + python -m build + - name: Publish to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2a0aa3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -# https://travis-ci.org/djmoch/nncli -language: python - -matrix: - fast_finish: true - -.mixins: -- &xenial-mixin - dist: xenial - sudo: true - addons: - apt: - packages: - - libgnutls-dev - -env: - - PIPENV_HIDE_EMOJIS=1 PIPENV_NO_INHERIT=1 - -install: - - pip install -U pip pipenv python-coveralls - - make test-install - -jobs: - include: - - stage: test - script: make test - python: 3.4 - - stage: test - script: make test - python: 3.5 - - stage: test - script: make test - python: 3.6 - - stage: test - script: make test - <<: *xenial-mixin - python: 3.7 - - stage: lint - script: make lint - python: 3.6 - - stage: coverage - script: make coverage - after_success: coveralls - python: 3.5 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 5dc7bf7..0cbad13 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -64,30 +64,20 @@ updating requirements files. Discussion and Requests ----------------------- -All discussion takes place on the public `mailing list`_. The list's -archive can be found at https://lists.danielmoch.com/nncli-dev. Emails -can be sent to the following addresses to manage your subscription to -the mailing list. +All discussion takes place on the `issue tracker`_. -- nncli-dev+subscribe@ -- nncli-dev+unsubscribe@ -- nncli-dev+help@ - -Patches and pull requests are welcome, preferably via emailed output -of `git-request-pull(1)`_ sent to the mailing list. Bug reports should -also be directed to the mailing list. - -If you aren't hosting a fork anywhere online, you can also send patches -using `git-format-patch(1)`_. +Pull requests are welcome. Releases -------- -Releases are published to PyPI_. Signed source tarballs are maintained -at https://dl.danielmoch.com/nncli. Instructions for verifying -tarballs are in the README file at the previous link. +Releases are published to PyPI_. +Signed source tarballs are maintained on the `releases page`_. +Archives are signed with `signify`. +To support the use of `minisign`, which is compatable with `signify`, +detached signatures will be created. +Signature files are indicated with a .minisig extension. .. _PyPI: https://pypi.org/project/nncli/ -.. _mailing list: nncli-dev@danielmoch.com -.. _git-format-patch(1): https://www.git-scm.com/docs/git-format-patch -.. _git-request-pull(1): https://www.git-scm.com/docs/git-request-pull +.. _issue tracker: https://github.com/djmoch/nncli/issues +.. _releases page: https://github.com/djmoch/nncli/releases diff --git a/docs/source/conf.py b/docs/source/conf.py index 9bbdfdb..0bc38a2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -93,7 +93,7 @@ 'color_accent': 'blue', # Set the repo location to get a badge with stats - 'repo_url': 'https://git.danielmoch.com/nncli/', + 'repo_url': 'https://github.com/djmoch/nncli/', 'repo_name': 'Git Repository', 'repo_type': None, diff --git a/docs/source/index.rst b/docs/source/index.rst index 5198797..0ff18e6 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,7 +10,7 @@ NextCloud Notes Command Line Interface .. image:: https://img.shields.io/pypi/l/nncli.svg :alt: PyPI - License - :target: https://git.danielmoch.com/nncli/tree/LICENSE + :target: https://github.com/djmoch/nncli/blob/master/LICENSE .. image:: https://img.shields.io/pypi/v/nncli.svg :alt: PyPI :target: https://pypi.org/project/nncli diff --git a/pyproject.toml b/pyproject.toml index 6f11eb3..30b1c3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ authors = [ {name = "Daniel Moch", email = "daniel@danielmoch.com"}, ] readme = "README.rst" -requires-python = ">=3" +requires-python = ">=3.9" classifiers = [ "License :: OSI Approved :: MIT License", "Development Status :: 4 - Beta", @@ -28,7 +28,7 @@ dynamic = [ "version", "description" ] [project.urls] Homepage = "https://nncli.org" -"Source Code" = "https://git.danielmoch.com/nncli" +"Source Code" = "https://github.com/djmoch/nncli" [project.optional-dependencies] dev = [ @@ -64,29 +64,3 @@ show_missing = true [tool.pytest.ini_options] mock_use_standalone_module = true - -[tool.tox] -legacy_tox_ini = """ -[tox] -envlist = py37, py38, py39, py310, pylint, coverage -skipsdist = True - -[testenv:pylint] -deps = -rrequirements-dev.txt -allowlist_externals = make -commands = - make lint - -[testenv:coverage] -deps = -rrequirements-dev.txt -allowlist_externals = make -commands = - make coverage - -[testenv] -deps = -rrequirements-dev.txt -allowlist_externals = make -commands = - make install - python -m pytest -""" diff --git a/requirements-dev.txt b/requirements-dev.txt index 6d60504..9628d18 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -105,9 +105,9 @@ flit==3.5.1 \ --hash=sha256:2e3b7377714483ecc54b236330d7bf3467b9f5b909b22333b50b6b4324162510 \ --hash=sha256:9b60008eb0df1c97057704a9f979d546d175c137b773e5c912e56035047fccee # via nncli (pyproject.toml) -flit-core==3.5.1 \ - --hash=sha256:3083720351a6cb00e0634a1ec0e26eae7b273174c3c6c03d5b597a14203b282e \ - --hash=sha256:42d144fa25df9493bfb655036279c4a4ed323e2e3db178b757e898af5aba0334 +flit-core==3.9.0 \ + --hash=sha256:72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba \ + --hash=sha256:7aada352fb0c7f5538c4fafeddf314d3a6a92ee8e2b1de70482329e42de70301 # via flit idna==3.3 \ --hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff \ diff --git a/src/nncli/__init__.py b/src/nncli/__init__.py index 1f74f5b..d7d3bdc 100644 --- a/src/nncli/__init__.py +++ b/src/nncli/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- """NextCloud Notes Command Line Interface""" -__version__ = '0.3.7' +__version__ = '0.3.8'