From 6eb9a524673e7d047953325379b1f5eadc089b9e Mon Sep 17 00:00:00 2001 From: Fernando Date: Thu, 5 Jun 2025 17:55:18 -0300 Subject: [PATCH 1/7] MNT: Modernize install. --- python_package/LICENSE | 1 + python_package/README.md | 1 + python_package/pyproject.toml | 33 +++++++++++++++++++++++++++++++++ python_package/requirements.txt | 1 + python_package/setup.py | 16 +++++++++++++++- 5 files changed, 51 insertions(+), 1 deletion(-) create mode 120000 python_package/LICENSE create mode 120000 python_package/README.md create mode 100644 python_package/pyproject.toml create mode 100644 python_package/requirements.txt diff --git a/python_package/LICENSE b/python_package/LICENSE new file mode 120000 index 0000000..d20b62f --- /dev/null +++ b/python_package/LICENSE @@ -0,0 +1 @@ +/home/fac/repos/trackcpp/LICENSE \ No newline at end of file diff --git a/python_package/README.md b/python_package/README.md new file mode 120000 index 0000000..01314d8 --- /dev/null +++ b/python_package/README.md @@ -0,0 +1 @@ +/home/fac/repos/trackcpp/README.md \ No newline at end of file diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml new file mode 100644 index 0000000..7f518dc --- /dev/null +++ b/python_package/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=64"] +build-backend = "setuptools.build_meta" + +[project] +name = "trackcpp" +authors = [ { name = "lnls-fac" }, ] +description = "trackcpp python package" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +license = "MIT" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-fac/trackcpp" +Download = "https://github.com/lnls-fac/trackcpp" + +# --- Configurações específicas do Setuptools --- +[tool.setuptools] +include-package-data = true + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +trackcpp = ["VERSION", "_trackcpp.so"] diff --git a/python_package/requirements.txt b/python_package/requirements.txt new file mode 100644 index 0000000..fc37fb4 --- /dev/null +++ b/python_package/requirements.txt @@ -0,0 +1 @@ +numpy>=1.8 diff --git a/python_package/setup.py b/python_package/setup.py index a4e96cc..73c8208 100755 --- a/python_package/setup.py +++ b/python_package/setup.py @@ -1,15 +1,28 @@ #!/usr/bin/env python-sirius from setuptools import setup +import pathlib -with open('VERSION','r') as _f: + +def get_abs_path(relative): + return str(pathlib.Path(__file__).parent / relative) + + +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='trackcpp', version=__version__, author='lnls-fac', description='trackcpp python package', + long_description=_long_description, url='https://github.com/lnls-fac/trackcpp', download_url='https://github.com/lnls-fac/trackcpp', classifiers=[ @@ -17,6 +30,7 @@ 'Programming Language :: Python', 'Topic :: Scientific/Engineering' ], + install_requires=_requirements, packages=['trackcpp'], package_data={'trackcpp': ['_trackcpp.so', 'VERSION']}, zip_safe=False From c286b38b0a9eaa4181161a342bba2252e491b3d9 Mon Sep 17 00:00:00 2001 From: fernandohds564 Date: Thu, 5 Jun 2025 18:22:26 -0300 Subject: [PATCH 2/7] MNT: update minimal setuptools version to 44. --- python_package/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml index 7f518dc..5c00784 100644 --- a/python_package/pyproject.toml +++ b/python_package/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64"] +requires = ["setuptools>=44"] build-backend = "setuptools.build_meta" [project] From 0237adcf05b728c2be4bc12a4912f9f8d28391f9 Mon Sep 17 00:00:00 2001 From: fernandohds564 Date: Thu, 5 Jun 2025 18:55:39 -0300 Subject: [PATCH 3/7] MNT: update Ubuntu version in github worflow, since 20.04 is not supported anymore. --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 938e26d..8a3c741 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,7 +3,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 From 0efe728bf511ec4ea0c68cca9f35256e72a03a6e Mon Sep 17 00:00:00 2001 From: fernandohds564 Date: Fri, 6 Jun 2025 12:01:17 -0300 Subject: [PATCH 4/7] Update pyproject.toml --- python_package/pyproject.toml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml index 5c00784..a00a465 100644 --- a/python_package/pyproject.toml +++ b/python_package/pyproject.toml @@ -5,6 +5,12 @@ build-backend = "setuptools.build_meta" [project] name = "trackcpp" 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"}, + {name = "Murilo Barbosa Alves", email= "murilo.alves@lnls.br"} +] description = "trackcpp python package" readme = "README.md" dynamic = ["version", "dependencies"] @@ -20,6 +26,8 @@ license-files= [ "LICENSE", ] [project.urls] Homepage = "https://github.com/lnls-fac/trackcpp" Download = "https://github.com/lnls-fac/trackcpp" +Repository = "https://github.com/lnls-fac/trackcpp.git" +Issues = "https://github.com/lnls-fac/trackcpp/issues" # --- Configurações específicas do Setuptools --- [tool.setuptools] @@ -31,3 +39,35 @@ dependencies = { file = "requirements.txt" } [tool.setuptools.package-data] trackcpp = ["VERSION", "_trackcpp.so"] + +# --- 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 From afabfea9e6a03401c65bf486e4807215fffd0a71 Mon Sep 17 00:00:00 2001 From: fernandohds564 Date: Fri, 6 Jun 2025 13:01:12 -0300 Subject: [PATCH 5/7] Update python_package/pyproject.toml Co-authored-by: Murilo B. Alves --- python_package/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_package/pyproject.toml b/python_package/pyproject.toml index a00a465..59b4b63 100644 --- a/python_package/pyproject.toml +++ b/python_package/pyproject.toml @@ -9,7 +9,7 @@ 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"}, - {name = "Murilo Barbosa Alves", email= "murilo.alves@lnls.br"} + {name = "Murilo Barbosa Alves", email= "alvesb.murilo@gmail.com"} ] description = "trackcpp python package" readme = "README.md" From 3a6be390b49bcd18a4e0dd386ff5dfd9f902c4d4 Mon Sep 17 00:00:00 2001 From: Fernando Date: Fri, 6 Jun 2025 14:48:56 -0300 Subject: [PATCH 6/7] MNT: make sure symbolic links are relative paths. --- python_package/LICENSE | 2 +- python_package/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python_package/LICENSE b/python_package/LICENSE index d20b62f..ea5b606 120000 --- a/python_package/LICENSE +++ b/python_package/LICENSE @@ -1 +1 @@ -/home/fac/repos/trackcpp/LICENSE \ No newline at end of file +../LICENSE \ No newline at end of file diff --git a/python_package/README.md b/python_package/README.md index 01314d8..32d46ee 120000 --- a/python_package/README.md +++ b/python_package/README.md @@ -1 +1 @@ -/home/fac/repos/trackcpp/README.md \ No newline at end of file +../README.md \ No newline at end of file From 57233f82c62ce6bacb9219a77d2b91e1ba7069a9 Mon Sep 17 00:00:00 2001 From: Ana Clara Oliveira Date: Thu, 4 Dec 2025 12:44:50 -0300 Subject: [PATCH 7/7] Update version to 4.10.8 --- python_package/trackcpp/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_package/trackcpp/VERSION b/python_package/trackcpp/VERSION index f90ee14..195e81e 100644 --- a/python_package/trackcpp/VERSION +++ b/python_package/trackcpp/VERSION @@ -1 +1 @@ -4.10.7 +4.10.8