Skip to content
Snippets Groups Projects
Commit f1259d2a authored by Valentin Valls's avatar Valentin Valls
Browse files

Rework the project with pyproject.toml

parent fda34044
No related branches found
No related tags found
No related merge requests found
Pipeline #200485 failed
......@@ -9,7 +9,7 @@ test:
- eval "$(/opt/conda/bin/conda shell.posix hook)" # Enable activate/deactivate
- mamba create --name=test python=3.10 pytango
- conda activate test
- pip install .[test] nosqltangodb pytest mock
- pip install .[test]
script:
- pytest tests -s
variables:
......
# SampleChanger
Handles the sample changer robot for micro tomography.
The robot can be installed on different tomgraphy end stations and aligns
itself with the set-up used.
## Robot controller
The class can use few controllers from the [StaubLink project](https://gitlab.esrf.fr/watier/StaubLink).
to handle all functionality of the robot.
- `id19Controller.py`
- `bm05Controller2.py`
## TomoSampleChanger
The TomoSampleChanger have to be defined with the following properties.
- `robot_controller`: One of `bm05` or `id19`
- `robot_host`: The host name or IP of the robot
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools>=61.0", "wheel"] # PEP 508 syntax
build-backend = "setuptools.build_meta"
[project]
name = "samplechanger"
version = "0.2.0"
authors = [
{ name="Clemence Muzelle", email="clemence.muzelle@esrf.fr" },
]
description = "Sample changer software"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
license = {text = "GNU Lesser General Public License v3"}
readme = "README.md"
dependencies = []
[project.optional-dependencies]
dev = ["black"]
test = ["pytest", "pytest-mock", "nosqltangodb"]
[project.scripts]
TomoSampleChanger = "samplechanger.sample_changer_ds.TomoSampleChanger:main"
TomoSamples = "samplechanger.samples_ds.TomoSamples:main"
[project.urls]
"Homepage" = "https://gitlab.esrf.fr/bliss/sample_changer"
"Bug Tracker" = "https://gitlab.esrf.fr/bliss/sample_changer/issues"
[tool.flake8]
# Check that this is aligned with your other tools like Black
max-line-length = 120
exclude = [
# No need to traverse our git directory
".git",
# There's no value in checking cache directories
"__pycache__"
]
# Use extend-ignore to add to already ignored checks which are anti-patterns like W503.
extend-ignore = [
# PEP 8 recommends to treat : in slices as a binary operator with the lowest priority, and to leave an equal
# amount of space on either side, except if a parameter is omitted (e.g. ham[1 + 1 :]).
# This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8.
# Since E203 is not PEP 8 compliant, we tell Flake8 to ignore this warning.
# https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
"E203"
]
\ No newline at end of file
# -*- coding: utf-8 -*-
import setuptools
"""The setup script."""
import sys
from setuptools import setup, find_packages
TESTING = any(x in sys.argv for x in ['test', 'pytest'])
with open('README.rst') as readme_file:
readme = readme_file.read()
requirements=[]
setup_requirements = ['pytest-runner', 'pytest'] if TESTING else []
test_requirements = ['pytest-cov', 'pytest', 'mock', 'nosqltangodb']
setup(
author="Clemence Muzelle",
author_email='clemence.muzelle@esrf.fr',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
description="Sample changer software",
install_requires=requirements,
license="GNU Lesser General Public License v3",
long_description=readme,
include_package_data=True,
keywords='samplechanger',
name='samplechanger',
package_dir={"": "src"},
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
url='https://gitlab.esrf.fr/bliss/sample_changer',
version='0.1.0',
zip_safe=False,
entry_points={
'console_scripts': [
'TomoSampleChanger = samplechanger.sample_changer_ds.TomoSampleChanger:main',
'TomoSamples = samplechanger.samples_ds.TomoSamples:main',
]
}
)
setuptools.setup()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment