From f07ec5012d498072319e0bcecb1632688632ace5 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Wed, 14 Dec 2022 20:10:58 +0100 Subject: [PATCH 1/4] Convert setup.cfg to pyproject.toml pipx install ini2toml[full] ini2toml setup.cfg > pyproject.toml rm setup.cfg --- pyproject.toml | 419 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 368 ------------------------------------------- 2 files changed, 419 insertions(+), 368 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..69a83bcb67 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,419 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "aesara" +authors = [{name = "aesara-devs", email = "aesara.devs@gmail.com"}] +description = "Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs." +license = {text = "BSD"} +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python", + "Topic :: Software Development :: Code Generators", + "Topic :: Software Development :: Compilers", + "Topic :: Scientific/Engineering :: Mathematics", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", +] +keywords = [ + "aesara", + "math", + "numerical", + "symbolic", + "blas", + "numpy", + "autodiff", + "differentiation", +] +urls = {Homepage = "https://github.com/aesara-devs/aesara"} +requires-python = ">=3.7" +dependencies = [ + "numpy >=1.17.0", + "scipy >=0.14", + "filelock", + "etuples", + "logical-unification", + "miniKanren", + "cons", + "typing_extensions", + "setuptools >=48.0.0", +] +dynamic = ["version"] + +[project.readme] +file = "DESCRIPTION.txt" +content-type = "text/x-rst" + +[project.scripts] +aesara-cache = "bin.aesara_cache:main" + +[tool.setuptools] +platforms = [ + "Windows", + "Linux", + "Solaris", + "Mac OS-X", + "Unix", +] +include-package-data = false + +[tool.setuptools.packages.find] +exclude = [ + "tests", + "tests.*", +] +namespaces = false + +[tool.setuptools.package-data] +aesara = [ + "*.txt", + "*.rst", + "*.txt", + "*.rst", + "*.cu", + "*.cuh", + "*.c", + "*.sh", + "*.pkl", + "*.h", + "*.cpp", + "ChangeLog", + "c_code/*", + "py.typed", +] +"aesara.misc" = ["*.sh"] +"aesara.d3viz" = [ + "html/*", + "css/*", + "js/*", +] + +[tool.flake8] +select = "C,E,F,W" +ignore = "E203,E231,E501,E741,W503,W504,C901" +max-line-length = "88" +per-file-ignores = """ +**/__init__.py:F401,E402,F403 +aesara/tensor/linalg.py:F401,F403 +aesara/scalar/basic_scipy.py:E402,F403,F401 +aesara/graph/toolbox.py:E402,F403,F401 +aesara/link/jax/jax_dispatch.py:E402,F403,F401 +aesara/link/jax/jax_linker.py:E402,F403,F401 +aesara/sparse/sandbox/sp2.py:F401 +tests/tensor/test_math_scipy.py:E402 +tests/sparse/test_basic.py:E402 +tests/sparse/test_opt.py:E402 +tests/sparse/test_sp2.py:E402 +tests/sparse/test_utils.py:E402,F401 +tests/sparse/sandbox/test_sp.py:E402,F401 +tests/scalar/test_basic_sympy.py:E402 +aesara/graph/rewriting/unify.py:F811""" +exclude = """ +versioneer.py +doc/ +aesara/_version.py""" + +[tool.coverage.run] +omit = [ + "aesara/_version.py", + "tests/*", + "aesara/assert_op.py", + "aesara/graph/opt.py", + "aesara/graph/opt_utils.py", + "aesara/graph/optdb.py", + "aesara/graph/kanren.py", + "aesara/graph/unify.py", + "aesara/link/jax/jax_linker.py", + "aesara/link/jax/jax_dispatch.py", + "aesara/graph/toolbox.py", + "aesara/scalar/basic_scipy.py", +] +branch = true +relative_files = true + +[tool.coverage.report] +omit = [ + "aesara/_version.py", + "tests/*", +] +exclude_lines = [ + "pragma: no cover", + "if TYPE_CHECKING:", +] +show_missing = 1 + +[tool.versioneer] +vcs = "git" +style = "pep440" +versionfile_source = "aesara/_version.py" +versionfile_build = "aesara/_version.py" +tag_prefix = "rel-" + +[tool.pytest.ini_options] +addopts = "--durations=50" +testpaths = ["tests/"] + +[tool.pylint] +max-line-length = "88" + +[tool."pylint.messages_control"] +disable = "C0330, C0326" + +[tool.isort] +profile = "black" +lines_after_imports = 2 +lines_between_sections = 1 +honor_noqa = true +skip_gitignore = true +skip = ["aesara/version.py", "**/__init__.py"] + +[tool.mypy] +ignore_missing_imports = true +no_implicit_optional = true +check_untyped_defs = false +strict_equality = true +warn_redundant_casts = true +warn_unused_configs = true +warn_unused_ignores = true +warn_return_any = true +warn_no_return = false +warn_unreachable = true +show_error_codes = true +allow_redefinition = false +files = ["aesara", "tests"] +plugins = ["numpy.typing.mypy_plugin"] + +[[tool.mypy.overrides]] +module = ["versioneer"] +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["doc.*"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["setup"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["tests.*"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara._version"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.mode"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.builders"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.sharedvalue"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.compilelock"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.function.pfunc"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.function.types"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.compile.debugmode"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.type"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.var"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.basic"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.elemwise"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.math"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.rewriting.basic"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.subtensor"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.shape"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.extra_ops"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.type_other"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.blas"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.blas_headers"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.slinalg"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.sharedvar"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.rewriting.math"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.blas_c"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.random.op"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.random.basic"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.random.utils"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.link.numba.dispatch.extra_ops"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.link.numba.dispatch.elemwise"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.link.numba.dispatch.random"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.link.jax.dispatch"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.raise_op"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.nnet.conv3d2d"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.nnet.neighbours"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.nnet.abstract_conv"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.nnet.ctc"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.sandbox.*"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.ifelse"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.typed_list.*"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.sparse.basic"] +ignore_errors = true +check_untyped_defs = false + +[[tool.mypy.overrides]] +module = ["aesara.sparse.sharedvar"] +ignore_errors = true +check_untyped_defs = false diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 21072baba7..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,368 +0,0 @@ -[metadata] -name = aesara -author = aesara-devs -author_email = aesara.devs@gmail.com -description = Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs. -long_description = file: DESCRIPTION.txt -long_description_content_type = text/x-rst -url = https://github.com/aesara-devs/aesara -license = BSD -platforms = - Windows - Linux - Solaris - Mac OS-X - Unix -classifiers = - Development Status :: 6 - Mature - Intended Audience :: Education - Intended Audience :: Science/Research - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Programming Language :: Python - Topic :: Software Development :: Code Generators - Topic :: Software Development :: Compilers - Topic :: Scientific/Engineering :: Mathematics - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Operating System :: Unix - Operating System :: MacOS - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 -keywords = - aesara - math - numerical - symbolic - blas - numpy - autodiff - differentiation - -[options] -packages = find: -python_requires = >=3.7 -install_requires = - numpy >=1.17.0 - scipy >=0.14 - filelock - etuples - logical-unification - miniKanren - cons - typing_extensions - setuptools >=48.0.0 - -[options.packages.find] -exclude = - tests - tests.* - -[options.entry_points] -console_scripts = - aesara-cache = bin.aesara_cache:main - -[options.package_data] -* = - *.txt - *.rst - *.cu - *.cuh - *.c - *.sh - *.pkl - *.h - *.cpp - ChangeLog - c_code/* -aesara = - py.typed -aesara.misc = - *.sh -aesara.d3viz = - html/* - css/* - js/* - -[flake8] -select = C,E,F,W -ignore = E203,E231,E501,E741,W503,W504,C901 -max-line-length = 88 -per-file-ignores = - **/__init__.py:F401,E402,F403 - aesara/tensor/linalg.py:F401,F403 - aesara/scalar/basic_scipy.py:E402,F403,F401 - aesara/graph/toolbox.py:E402,F403,F401 - aesara/link/jax/jax_dispatch.py:E402,F403,F401 - aesara/link/jax/jax_linker.py:E402,F403,F401 - aesara/sparse/sandbox/sp2.py:F401 - tests/tensor/test_math_scipy.py:E402 - tests/sparse/test_basic.py:E402 - tests/sparse/test_opt.py:E402 - tests/sparse/test_sp2.py:E402 - tests/sparse/test_utils.py:E402,F401 - tests/sparse/sandbox/test_sp.py:E402,F401 - tests/scalar/test_basic_sympy.py:E402 - aesara/graph/rewriting/unify.py:F811 -exclude = - versioneer.py - doc/ - aesara/_version.py - -[coverage:run] -omit = - aesara/_version.py - tests/* - aesara/assert_op.py - aesara/graph/opt.py - aesara/graph/opt_utils.py - aesara/graph/optdb.py - aesara/graph/kanren.py - aesara/graph/unify.py - aesara/link/jax/jax_linker.py - aesara/link/jax/jax_dispatch.py - aesara/graph/toolbox.py - aesara/scalar/basic_scipy.py -branch = True -relative_files = true - -[coverage:report] -omit = - aesara/_version.py - tests/* -exclude_lines = - pragma: no cover - if TYPE_CHECKING: -show_missing = 1 - -[versioneer] -VCS = git -style = pep440 -versionfile_source = aesara/_version.py -versionfile_build = aesara/_version.py -tag_prefix = rel- - -[tool:pytest] -addopts = --durations=50 -testpaths = tests/ - -[pylint] -max-line-length = 88 - -[pylint.messages_control] -disable = C0330, C0326 - -[isort] -profile = black -lines_after_imports = 2 -lines_between_sections = 1 -honor_noqa = True -skip_gitignore = True -skip = aesara/version.py -skip_glob = **/*.pyx - -[mypy] -ignore_missing_imports = True -no_implicit_optional = True -check_untyped_defs = False -strict_equality = True -warn_redundant_casts = True -warn_unused_configs = True -warn_unused_ignores = True -warn_return_any = True -warn_no_return = False -warn_unreachable = True -show_error_codes = True -allow_redefinition = False -files = aesara,tests -plugins = numpy.typing.mypy_plugin - -[mypy-versioneer] -check_untyped_defs = False - -[mypy-doc.*] -ignore_errors = True -check_untyped_defs = False - -[mypy-setup] -ignore_errors = True -check_untyped_defs = False - -[mypy-tests.*] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara._version] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.mode] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.builders] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.sharedvalue] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.compilelock] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.function.pfunc] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.function.types] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.compile.debugmode] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.type] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.var] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.basic] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.elemwise] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.math] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.rewriting.basic] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.rewriting.shape] -warn_unused_ignores = False - -[mypy-aesara.tensor.rewriting.elemwise] -warn_unused_ignores = False - -[mypy-aesara.tensor.subtensor] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.shape] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.extra_ops] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.type_other] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.blas] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.blas_headers] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.slinalg] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.sharedvar] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.rewriting.math] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.blas_c] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.random.op] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.random.basic] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.random.utils] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.scan.op] -warn_unused_ignores = False - -[mypy-aesara.link.numba.dispatch.extra_ops] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.link.numba.dispatch.elemwise] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.link.numba.dispatch.random] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.link.jax.dispatch] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.raise_op] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.nnet.conv3d2d] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.nnet.neighbours] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.nnet.abstract_conv] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.tensor.nnet.ctc] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.sandbox.*] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.ifelse] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.typed_list.*] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.sparse.basic] -ignore_errors = True -check_untyped_defs = False - -[mypy-aesara.sparse.sharedvar] -ignore_errors = True -check_untyped_defs = False \ No newline at end of file From 02c52b0282de26e27d3e7114d365fc876f48c1ef Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Sun, 25 Dec 2022 19:34:38 +0100 Subject: [PATCH 2/4] Fix conversion errors --- pyproject.toml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 69a83bcb67..9fcc7c1a88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,6 +66,7 @@ platforms = [ "Mac OS-X", "Unix", ] +# Not from setup.cfg include-package-data = false [tool.setuptools.packages.find] @@ -73,12 +74,11 @@ exclude = [ "tests", "tests.*", ] +# Not from setup.cfg: namespaces = false [tool.setuptools.package-data] -aesara = [ - "*.txt", - "*.rst", +"*" = [ "*.txt", "*.rst", "*.cu", @@ -90,6 +90,8 @@ aesara = [ "*.cpp", "ChangeLog", "c_code/*", +] +"aesara" = [ "py.typed", ] "aesara.misc" = ["*.sh"] @@ -176,7 +178,8 @@ lines_after_imports = 2 lines_between_sections = 1 honor_noqa = true skip_gitignore = true -skip = ["aesara/version.py", "**/__init__.py"] +skip = ["aesara/version.py"] +skip_glob = ["**/*.pyx"] [tool.mypy] ignore_missing_imports = true @@ -283,6 +286,14 @@ module = ["aesara.tensor.rewriting.basic"] ignore_errors = true check_untyped_defs = false +[[tool.mypy.overrides]] +module = ["aesara.tensor.rewriting.shape"] +warn_unused_ignores = false + +[[tool.mypy.overrides]] +module = ["aesara.tensor.rewriting.elemwise"] +warn_unused_ignores = false + [[tool.mypy.overrides]] module = ["aesara.tensor.subtensor"] ignore_errors = true @@ -348,6 +359,10 @@ module = ["aesara.tensor.random.utils"] ignore_errors = true check_untyped_defs = false +[[tool.mypy.overrides]] +module = ["aesara.scan.op"] +warn_unused_ignores = false + [[tool.mypy.overrides]] module = ["aesara.link.numba.dispatch.extra_ops"] ignore_errors = true From f79ea86e71381ec349dd73506fa489181d2e784c Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Sun, 25 Dec 2022 19:39:23 +0100 Subject: [PATCH 3/4] Make tool-specific adjustments for pyproject.toml --- .flake8 | 24 +++++++++++++++++++++++ .github/workflows/pypi.yml | 14 ++++++++++++-- pyproject.toml | 39 +++++--------------------------------- setup.cfg | 6 ++++++ 4 files changed, 47 insertions(+), 36 deletions(-) create mode 100644 .flake8 create mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..78a63b0682 --- /dev/null +++ b/.flake8 @@ -0,0 +1,24 @@ +[flake8] +select = C,E,F,W +ignore = E203,E231,E501,E741,W503,W504,C901 +max-line-length = 88 +per-file-ignores = + **/__init__.py:F401,E402,F403 + aesara/tensor/linalg.py:F401,F403 + aesara/scalar/basic_scipy.py:E402,F403,F401 + aesara/graph/toolbox.py:E402,F403,F401 + aesara/link/jax/jax_dispatch.py:E402,F403,F401 + aesara/link/jax/jax_linker.py:E402,F403,F401 + aesara/sparse/sandbox/sp2.py:F401 + tests/tensor/test_math_scipy.py:E402 + tests/sparse/test_basic.py:E402 + tests/sparse/test_opt.py:E402 + tests/sparse/test_sp2.py:E402 + tests/sparse/test_utils.py:E402,F401 + tests/sparse/sandbox/test_sp.py:E402,F401 + tests/scalar/test_basic_sympy.py:E402 + aesara/graph/rewriting/unify.py:F811 +exclude = + versioneer.py + doc/ + aesara/_version.py diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 50e8854bfa..4bac0ed1a8 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -29,8 +29,9 @@ jobs: python-version: "3.8" - name: Build the sdist and the wheel run: | - pip install wheel - python setup.py sdist bdist_wheel + python -m pip install -U pip + python -m pip install build + python -m build - name: Check the sdist installs and imports run: | mkdir -p test-sdist @@ -38,6 +39,15 @@ jobs: python -m venv venv-sdist venv-sdist/bin/python -m pip install ../dist/aesara-*.tar.gz venv-sdist/bin/python -c "import aesara;print(aesara.__version__)" + test -n "$(find . -name lazylinker_c.c)" + - name: Check the wheel installs and imports + run: | + mkdir -p test-wheel + cd test-wheel + python -m venv venv-wheel + venv-wheel/bin/python -m pip install ../dist/aesara-*.whl + venv-wheel/bin/python -c "import aesara;print(aesara.__version__)" + test -n "$(find . -name lazylinker_c.c)" - uses: actions/upload-artifact@v2 with: name: artifact diff --git a/pyproject.toml b/pyproject.toml index 9fcc7c1a88..cc3ec7e4b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,8 @@ [build-system] -requires = ["setuptools>=61.2"] +requires = [ + "setuptools>=61.2", + "versioneer[toml]", +] build-backend = "setuptools.build_meta" [project] @@ -101,31 +104,6 @@ namespaces = false "js/*", ] -[tool.flake8] -select = "C,E,F,W" -ignore = "E203,E231,E501,E741,W503,W504,C901" -max-line-length = "88" -per-file-ignores = """ -**/__init__.py:F401,E402,F403 -aesara/tensor/linalg.py:F401,F403 -aesara/scalar/basic_scipy.py:E402,F403,F401 -aesara/graph/toolbox.py:E402,F403,F401 -aesara/link/jax/jax_dispatch.py:E402,F403,F401 -aesara/link/jax/jax_linker.py:E402,F403,F401 -aesara/sparse/sandbox/sp2.py:F401 -tests/tensor/test_math_scipy.py:E402 -tests/sparse/test_basic.py:E402 -tests/sparse/test_opt.py:E402 -tests/sparse/test_sp2.py:E402 -tests/sparse/test_utils.py:E402,F401 -tests/sparse/sandbox/test_sp.py:E402,F401 -tests/scalar/test_basic_sympy.py:E402 -aesara/graph/rewriting/unify.py:F811""" -exclude = """ -versioneer.py -doc/ -aesara/_version.py""" - [tool.coverage.run] omit = [ "aesara/_version.py", @@ -153,14 +131,7 @@ exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", ] -show_missing = 1 - -[tool.versioneer] -vcs = "git" -style = "pep440" -versionfile_source = "aesara/_version.py" -versionfile_build = "aesara/_version.py" -tag_prefix = "rel-" +show_missing = true [tool.pytest.ini_options] addopts = "--durations=50" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..1c853a424f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[versioneer] +VCS = git +style = pep440 +versionfile_source = aesara/_version.py +versionfile_build = aesara/_version.py +tag_prefix = rel- From aafd5fa7303cdb996e94ba23099d6bc1b60868e4 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Sun, 25 Dec 2022 20:35:32 +0100 Subject: [PATCH 4/4] Update project metadata Co-authored-by: Brandon T. Willard --- pyproject.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cc3ec7e4b1..675601a518 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,8 +8,14 @@ build-backend = "setuptools.build_meta" [project] name = "aesara" authors = [{name = "aesara-devs", email = "aesara.devs@gmail.com"}] -description = "Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs." -license = {text = "BSD"} +description = "A library for defining, optimizing, and efficiently evaluating mathematical expressions involving multi-dimensional arrays." +license.text = "BSD-3-Clause" +license.files = ["LICENSE.txt"] +# # Setuptools isn't yet PEP 639 (draft) compliant. +# # See +# # If accepted, then the previous two lines will change to: +# license = "BSD-3-Clause" +# license-files.paths = ["LICENSE.txt"] classifiers = [ "Development Status :: 6 - Mature", "Intended Audience :: Education",