Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions collective_effects_installation_tutorial.txt

This file was deleted.

2 changes: 1 addition & 1 deletion cppcolleff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ install: clean install-cpp install-py

uninstall: uninstall-cpp uninstall-py

develop-install-py: develop-uninstall-py all
develop-install-py: clean develop-uninstall-py all
$(MAKE) develop-install -C $(PYTHON_PACKAGE_DIR)

develop-uninstall-py:
Expand Down
1 change: 1 addition & 0 deletions cppcolleff/python_package/LICENSE
2 changes: 0 additions & 2 deletions cppcolleff/python_package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ uninstall:
develop-install: develop-uninstall all
$(PIP) install --no-deps -e ./

# known issue: It will fail to uninstall scripts
# if they were installed in develop mode
develop-uninstall:
$(PIP) uninstall -y $(PACKAGE)

Expand Down
1 change: 1 addition & 0 deletions cppcolleff/python_package/README.md
1 change: 0 additions & 1 deletion cppcolleff/python_package/VERSION

This file was deleted.

1 change: 1 addition & 0 deletions cppcolleff/python_package/VERSION
72 changes: 72 additions & 0 deletions cppcolleff/python_package/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[build-system]
requires = ["setuptools>=44"]
build-backend = "setuptools.build_meta"

[project]
name = "cppcolleff"
authors = [{ name = "lnls-fac" } ]
maintainers = [
{name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}
]
description = "Collective effects calculation package"
readme = "README.md"
dynamic = ["version", "dependencies"]
requires-python = ">=3.6"
classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
keywords = ["SIRIUS", "python", "Collective Effects", "Accelerator Physics"]

license = "GPL-3.0"
license-files= [ "LICENSE", ]

[project.urls]
Homepage = "https://github.com/lnls-fac/collective-effects"
Download = "https://github.com/lnls-fac/collective-effects"
Repository = "https://github.com/lnls-fac/collective-effects.git"
Issues = "https://github.com/lnls-fac/collective-effects/issues"

# --- Setuptools specific configurations ---
[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
version = { file = "VERSION" }
dependencies = { file = "requirements.txt" }

[tool.setuptools.package-data]
cppcolleff = ["_cppcolleff.so", "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
3 changes: 3 additions & 0 deletions cppcolleff/python_package/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpy>=1.18
scipy>=1.5
matplotlib>=3.3
18 changes: 17 additions & 1 deletion cppcolleff/python_package/setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
#!/usr/bin/env python3

import pathlib

from setuptools import setup

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='cppcolleff',
version=__version__,
author='lnls-fac',
description='cppcolleff python package',
long_description=_long_description,
url='https://github.com/lnls-fac/collective_effects',
download_url='https://github.com/lnls-fac/collective_effects',
classifiers=[
Expand All @@ -18,6 +33,7 @@
'Topic :: Scientific/Engineering'
],
packages=['cppcolleff'],
install_requires=_requirements,
package_data={'cppcolleff': ['_cppcolleff.so', 'VERSION']},
zip_safe=False
)
34 changes: 0 additions & 34 deletions pycolleff/INSTALL

This file was deleted.

4 changes: 1 addition & 3 deletions pycolleff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ uninstall:
develop-install: develop-uninstall
$(PIP) install --no-deps -e ./

# known issue: It will fail to uninstall scripts
# if they were installed in develop mode
develop-uninstall:
$(PIP) uninstall -y $(PACKAGE)

test:
pytest tests/

dist: ## Build setuptools dist
python setup.py sdist bdist_wheel
python -m build

distupload: ## Upload package dist to PyPi
python -m twine upload --verbose dist/*
Expand Down
2 changes: 0 additions & 2 deletions pycolleff/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# pycolleff
Python module for impedances and instability analysis in electron storage rings.

For installation instructions, read INSTALL.
80 changes: 80 additions & 0 deletions pycolleff/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[build-system]
requires = ["setuptools>=44"]
build-backend = "setuptools.build_meta"

[project]
name = "pycolleff"
authors = [{ name = "lnls-fac" } ]
maintainers = [
{name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"},
{name = "Murilo Barbosa Alves", email= "alvesb.murilo@gmail.com"}
]
description = "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", "Collective Effects", "Accelerator Physics"]

license = "MIT"
license-files= [ "LICENSE", ]

[project.urls]
Homepage = "https://github.com/lnls-fac/collective-effects"
Download = "https://github.com/lnls-fac/collective-effects"
Repository = "https://github.com/lnls-fac/collective-effects.git"
Issues = "https://github.com/lnls-fac/collective-effects/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 [project.scripts], defining valid entrypoints.
script-files = [
'scripts/ems-wake-analysis.py',
'scripts/echo2d_submit.py',
]

[tool.setuptools.dynamic]
version = { file = "VERSION" }
dependencies = { file = "requirements.txt" }

[tool.setuptools.package-data]
pycolleff = ["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
3 changes: 2 additions & 1 deletion pycolleff/scripts/echo2d_submit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python-sirius
#!/usr/bin/env python3

import argparse
import subprocess as sp

import psutil as psu


Expand Down
2 changes: 1 addition & 1 deletion pycolleff/scripts/ems-wake-analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python-sirius
Comment thread
fernandohds564 marked this conversation as resolved.
#!/usr/bin/env python3

import optparse
import os
Expand Down
10 changes: 4 additions & 6 deletions pycolleff/setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python3

import pkg_resources
import pathlib

from setuptools import find_packages, setup


def get_abs_path(relative):
return pkg_resources.resource_filename(__name__, relative)
"""."""
return str(pathlib.Path(__file__).parent / relative)


with open(get_abs_path("README.md"), "r") as _f:
Expand All @@ -17,10 +19,6 @@ def get_abs_path(relative):
with open(get_abs_path("requirements.txt"), "r") as _f:
_requirements = _f.read().strip().split("\n")


with open('VERSION', 'r') as _f:
__version__ = _f.read().strip()

setup(
name='pycolleff',
version=__version__,
Expand Down