diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..08209b8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,82 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "siriushlafac" +authors = [{ name = "lnls-fac" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"} +] +description = "FAC Client Applications for Sirius" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-fac/hlafac" +Download = "https://github.com/lnls-fac/hlafac" +Repository = "https://github.com/lnls-fac/hlafac" +Issues = "https://github.com/lnls-fac/hlafac/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-hla-bo-ap-trajfit.py", + "scripts/sirius-hla-si-ap-trajfit.py", + "scripts/sirius-hla-si-ap-coupmeas.py" +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +siriushlafac = ["VERSION"] + +# --- linter and formatter configurations --- +[tool.ruff] +select = [ + "W", "E", "A", "B", "C90", "D", "I002", "N", "F", "G", "ARG", "S", "NPY"] +ignore = [ + "D203", "D204", "D213", "D215", "D400", "D401", "D404", "D406", "D407", + "D408", "D409", "D413", "E203", "E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401", "F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/setup.py b/setup.py index 718f4ea..2a61d7c 100755 --- a/setup.py +++ b/setup.py @@ -2,22 +2,31 @@ """SIRIUSHLAFAC Setup.""" -from setuptools import setup, find_packages +import pathlib +from setuptools import find_packages, setup -with open('VERSION', 'r') as _f: - __version__ = _f.read().strip() + +def get_abs_path(relative): + """.""" + return str(pathlib.Path(__file__).parent / relative) -with open('requirements.txt', 'r') as _f: - _requirements = _f.read().strip().split('\n') +with open(get_abs_path("README.md"), "r") as _f: + _long_description = _f.read().strip() + +with open(get_abs_path("VERSION"), "r") as _f: + __version__ = _f.read().strip() +with open(get_abs_path("requirements.txt"), "r") as _f: + _requirements = _f.read().strip().split("\n") setup( name='siriushlafac', version=__version__, author='lnls-fac', description='FAC Client Applications for Sirius', + long_description=_long_description, url='https://github.com/lnls-fac/hlafac', download_url='https://github.com/lnls-fac/hlafac', license='GNU GPLv3', diff --git a/siriushlafac/VERSION b/siriushlafac/VERSION index 5712157..5eef0f1 100644 --- a/siriushlafac/VERSION +++ b/siriushlafac/VERSION @@ -1 +1 @@ -0.10.1 +0.10.2