diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4fed858e..a712f398 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -15,6 +15,10 @@ tag_message = search = __version__ = '{current_version}' replace = __version__ = '{new_version}' +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" + [bumpversion:file:docs/rst/conf.py] search = version = release = '{current_version}' replace = version = release = '{new_version}' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d613b50a..01cbb8f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - run: pip install tox diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ce89a7f2..5bf29dc4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 with: python-version: "3.10" - run: pip install tox diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 230159d6..b6cfb526 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,13 +13,13 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - run: pip install tox diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8bf8e16..0051c3c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - run: pip install tox @@ -27,7 +27,7 @@ jobs: run: tox -e test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: env_vars: OS,PYTHON files: ./coverage.xml diff --git a/.github/workflows/version-bump-and-package.yml b/.github/workflows/version-bump-and-package.yml index 5c6c48b4..57987ae0 100644 --- a/.github/workflows/version-bump-and-package.yml +++ b/.github/workflows/version-bump-and-package.yml @@ -13,12 +13,12 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: token: ${{ secrets.AC_GITHUB_TOKEN }} - name: Set up Python - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v4 with: python-version: '3.x' diff --git a/.readthedocs.yml b/.readthedocs.yml index 07200dfd..87a82d19 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,12 @@ # Required version: 2 +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/rst/conf.py diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 19f7dee5..ef33fc23 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -2,6 +2,10 @@ Changelog ========= +* set `long-description` to single file +* remove Py3.8 +* Fixing codecov upload +* Translate ```setup.py`` into ``pyproject.toml`` v0.1.24 (2023-01-27) ------------------------------------------ diff --git a/pyproject.toml b/pyproject.toml index 9ebf2060..370f96fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,3 +3,97 @@ # https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support requires = ["setuptools>=43.0.0", "wheel"] build-backend = "setuptools.build_meta" + +[project] +name = "mdacli" +version = "0.1.24" +description = "A command line client for MDAnalysis Analysis classes." +authors = [ + {name = "MDAnalysis Development Team and contributors", email = "mdanalysis@numfocus.org"}, +] +readme = "README.rst" +requires-python = ">=3.8" +keywords = ["Science", "Molecular Dynamics", "MDAnalysis"] +license = {text = "GPL-3.0-or-later"} + +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Operating System :: POSIX", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Shells", +] + +dependencies = [ + "MDAnalysis>=2.1.0", + "threadpoolctl", +] + +[project.urls] +homepage = "https://github.com/MDAnalysis/mdacli" +documentation = "https://mdacli.readthedocs.io/en/latest" +repository = "https://github.com/MDAnalysis/mdacli" +changelog = "https://github.com/MDAnalysis/mdacli/blob/main/docs/CHANGELOG.rst" +issues = "https://github.com/MDAnalysis/mdacli/issues/" +discord = "https://discord.com/channels/807348386012987462" +twitter = "https://twitter.com/mdanalysis" +blog = "https://www.mdanalysis.org/blog" +user_group = " https://groups.google.com/g/mdnalysis-discussion" + +[project.scripts] +mda = "mdacli.__main__:main" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.flake8] +max_line_length = 80 +hang-closing = true +ignore = [ + "W293", + "W503", + "D412", + "D105", +] +docstring-convention = "numpy" + +[tool.isort] +line_length = 80 +indent = 4 +multi_line_output = 8 +include_trailing_comma = true +lines_after_imports = 2 +sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER" +known_first_party = "mdacli" +known_third_party = [ + "MDAnalysis", + "hypothesis", + "matplotlib", + "numpy", + "pytest", +] + +[tool.pytest.ini_options] +addopts = "-p pytest_cov" +python_files = [ + "test_*.py", + "*_test.py", + "tests.py", +] +testpaths = [ + "tests" +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 83f24b4c..00000000 --- a/setup.cfg +++ /dev/null @@ -1,70 +0,0 @@ -[metadata] -name = mdacli -version = attr:mdacli.__version__ -description = A command line client for MDAnalysis Analysis classes. -long_description = - file: README.rst - file: docs/CHANGELOG.rst -long_description_content_type = text/x-rst -license = GPLv3 -license_files = LICENSE -url = https://github.com/MDAnalysis/mdacli -author = attr:pycoulomb.__authors__ -author_email = mdanalysis@numfocus.org - -classifiers = - Development Status :: 4 - Beta - Environment :: Console - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Intended Audience :: Science/Research - Natural Language :: English - Operating System :: POSIX - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Bio-Informatics - Topic :: Scientific/Engineering :: Chemistry - Topic :: Scientific/Engineering :: Physics - Topic :: Software Development :: Libraries :: Python Modules - Topic :: System :: Shells - -keywords = - Science - Molecular Dynamics - MDAnalysis - -python_requires = >=3.7 - -project_urls = - Source = https://github.com/MDAnalysis/mdacli - Documentation = https://mdacli.readthedocs.io/en/latest/ - Changelog = https://github.com/MDAnalysis/mdacli/blob/main/docs/CHANGELOG.rst - User Group = https://groups.google.com/g/mdnalysis-discussion/ - Issue Tracker = https://github.com/MDAnalysis/mdacli/issues - Discord = https://discord.com/channels/807348386012987462/ - Blog = https://www.mdanalysis.org/blog/ - Twitter = https://twitter.com/mdanalysis - -[options] -package_dir= - =src -packages = find: - -install_requires = - MDAnalysis>=2.1.0 - threadpoolctl - -[options.packages.find] -where=src - -[options.entry_points] -console_scripts = - mda = mdacli.__main__:main - -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py deleted file mode 100644 index 46810d7c..00000000 --- a/setup.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python3 -# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- -# -# Copyright (c) 2021 Authors and contributors -# -# Released under the GNU Public Licence, v2 or any higher version -# SPDX-License-Identifier: GPL-2.0-or-later -"""Setuptools-based setup script for tests of mdacli. - -For a basic installation just type the command:: - - python setup.py develop - -""" - -# Always prefer setuptools over distutils -from setuptools import setup - - -setup() diff --git a/src/mdacli/libcli.py b/src/mdacli/libcli.py index df69a085..e24525bb 100644 --- a/src/mdacli/libcli.py +++ b/src/mdacli/libcli.py @@ -759,13 +759,10 @@ def init_base_argparse(name, version, description): Parameters ---------- - name : str Name of the cli program - version : str Version of the cli program - description : str Description of the cli program diff --git a/tox.ini b/tox.ini index 208b7759..dc2d9084 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 3.14.0 +minversion = 4.4.6 ignore_basepython_conflict = true # these are the environments that will run when you # execute `tox` in the command-line @@ -52,8 +52,8 @@ deps = isort skip_install = true commands = - flake8 {posargs:src/mdacli tests setup.py} - isort --verbose --check-only --diff src/mdacli tests setup.py + flake8 {posargs:src/mdacli tests} + isort --verbose --check-only --diff src/mdacli tests # asserts package build integrity [testenv:build] @@ -62,19 +62,17 @@ commands = setenv = COMMIT_MSG = Test commit message deps = - setuptools - wheel - twine - docutils - check-manifest - readme-renderer bump2version + build + check-manifest + twine + skip_install = true commands_pre = python {toxinidir}/devtools/clean_dist_check.py commands = python --version python {toxinidir}/devtools/check_changelog.py - python setup.py sdist bdist_wheel + python -m build twine check dist/*.whl twine check dist/*.tar.gz check-manifest {toxinidir} @@ -104,38 +102,3 @@ commands = deps = safety skip_install = true commands = safety check - -[flake8] -max_line_length = 80 -hang-closing = true -ignore = - W293 - W503 - D412 - D105 -per-file-ignores = setup.py:E501 -docstring-convention = numpy - -[isort] -line_length = 80 -indent = 4 -multi_line_output = 8 -include_trailing_comma = true -lines_after_imports = 2 -sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -known_first_party = mdacli -known_third_party = - MDAnalysis - hypothesis - matplotlib - numpy - pytest - -[tool:pytest] -addopts = -p pytest_cov -python_files = - test_*.py - *_test.py - tests.py -testpaths = - tests