-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize the setup / install process: * Introduce a `pyproject.toml` file with `[build-system]` information to allow PEP517 - compatible builds * Move from `setup.json` to `setup.cfg`. The combined `dev` extra dependency is still handled in `setup.py` because there is no syntax to combine extras in `setup.cfg` * Single-source the version from ``__init__.py`` using the `attr:` command in `setup.cfg`, and remove the version consistency check * Update list of authors * Add missing `astroid` dependency * Fix some minor linting issues Co-authored-by: Daniel Marchand <t-dmarchand@microsoft.com> Co-authored-by: Dominik Gresch <a-dogres@microsoft.com>
- Loading branch information
1 parent
bea61f0
commit 80845b2
Showing
10 changed files
with
82 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools >= 46.4.0", "wheel", "fastentrypoints"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[metadata] | ||
name = aiida-testing | ||
author = Dominik Gresch, Leopold Talirz, Jens Bröder, Philipp Rüßmann, and the AiiDA team | ||
author_email = | ||
version = attr: aiida_testing.__version__ | ||
url = https://aiida-testing.readthedocs.io/ | ||
description = Helpers for testing AiiDA plugins using pytest | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
keywords = | ||
AiiDA | ||
testing | ||
pytest | ||
mock | ||
cache | ||
license = MIT | ||
classifiers = | ||
Development Status :: 3 - Alpha | ||
Environment :: Plugins | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Topic :: Scientific/Engineering :: Physics | ||
Framework :: AiiDA | ||
Framework :: Pytest | ||
|
||
[options] | ||
python_requires = >=3.6 | ||
include_package_data = true | ||
install_requires = | ||
aiida-core>=1.0.0<2.0.0 | ||
pytest>=3.6 | ||
pyyaml~=5.1.2 | ||
voluptuous~=0.11.7 | ||
|
||
[options.extras_require] | ||
docs = | ||
sphinx | ||
sphinx-rtd-theme | ||
testing = | ||
pgtest~=1.3.1 | ||
aiida-diff | ||
pytest-datadir | ||
pre_commit = | ||
astroid==2.2.5 | ||
yapf==0.28 | ||
pre-commit | ||
prospector==1.1.7 | ||
pylint==2.3.1 | ||
mypy==0.740 | ||
|
||
|
||
[options.entry_points] | ||
console_scripts = | ||
aiida-mock-code = aiida_testing.mock_code._cli:run | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
#!/usr/bin/env python | ||
|
||
# Author: Dominik Gresch <greschd@gmx.ch> | ||
""" | ||
usage: pip install .[dev] | ||
""" | ||
|
||
import json | ||
import os | ||
from utils import fastentrypoints # NOQA | ||
import warnings | ||
|
||
import setuptools | ||
from setuptools.config import read_configuration | ||
|
||
from setuptools import find_packages, setup | ||
try: | ||
import fastentrypoints # NOQA | ||
except ImportError: | ||
warnings.warn( | ||
"The 'fastentrypoints' module could not be loaded. " | ||
"Installed console script will be slower." | ||
) | ||
|
||
SETUP_JSON_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'setup.json') | ||
with open(SETUP_JSON_PATH, 'r') as json_file: | ||
SETUP_KWARGS = json.load(json_file) | ||
EXTRAS_REQUIRE = SETUP_KWARGS['extras_require'] | ||
SETUP_CONFIG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'setup.cfg') | ||
SETUP_KWARGS = read_configuration(SETUP_CONFIG_PATH) | ||
EXTRAS_REQUIRE = SETUP_KWARGS['options']['extras_require'] | ||
EXTRAS_REQUIRE['dev'] = ( | ||
EXTRAS_REQUIRE["docs"] + EXTRAS_REQUIRE["testing"] + EXTRAS_REQUIRE["pre-commit"] | ||
EXTRAS_REQUIRE["docs"] + EXTRAS_REQUIRE["testing"] + EXTRAS_REQUIRE["pre_commit"] | ||
) | ||
|
||
if __name__ == '__main__': | ||
setup( | ||
packages=find_packages(), | ||
long_description=open( | ||
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.md') | ||
).read(), | ||
long_description_content_type="text/markdown", | ||
**SETUP_KWARGS | ||
) | ||
if __name__ == "__main__": | ||
setuptools.setup(extras_require=EXTRAS_REQUIRE) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.