Skip to content

Commit

Permalink
clean setup.py, extras
Browse files Browse the repository at this point in the history
  • Loading branch information
rickwierenga committed Mar 26, 2023
1 parent 7ff5952 commit 86ff896
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Expand Up @@ -17,6 +17,6 @@ jobs:
with:
python-version: 3.9
- name: Install Dependencies
run: pip install -e '.[testing]'
run: pip install -e '.[dev]'
- name: Run Pytest
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -23,6 +23,6 @@ jobs:
with:
python-version: ${{ matrix.version }}
- name: Install Dependencies
run: pip install -e '.[testing]'
run: pip install -e '.[dev]'
- name: Run Pytest
run: make test
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Expand Up @@ -17,6 +17,6 @@ jobs:
with:
python-version: 3.9
- name: Install Dependencies
run: pip install -e '.[testing]'
run: pip install -e '.[dev]'
- name: Run Pytest
run: make typecheck
4 changes: 3 additions & 1 deletion docs/installation.md
Expand Up @@ -43,9 +43,11 @@ There's a multitude of other optional dependencies that you can install. Replace
- `simulation`: Needed for the simulation backend.
- `venus`: Needed for the VENUS backend. This is
[PyHamilton](https://github.com/dgretton/pyhamilton).
- `server`: Needed for LH server, an HTTP front end to LH.
- `opentrons`: Needed for the Opentrons backend.
- `server`: Needed for LH server, an HTTP front end to LH.
- `plate_reading`: Needed to interact with the CLARIO Star plate reader.
- `dev`: Everything you need for development.
- `all`: Everything. May not be available on all platforms.

To install multiple dependencies, separate them with a comma:

Expand Down
106 changes: 50 additions & 56 deletions setup.py
Expand Up @@ -2,88 +2,82 @@

from pylabrobot.__version__ import __version__

with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()

extras_docs = [
'sphinx_book_theme',
'myst_nb',
'sphinx_copybutton',
]

extras_fw = [
'pyusb'
"pyusb"
]

extras_http = [
'requests',
'types-requests'
"requests",
"types-requests"
]

extras_plate_reading = [
'pylibftdi',
"pylibftdi",
]

extras_websockets = [
'websockets'
"websockets"
]

extras_simulation = extras_websockets

extras_venus = [
'pyhamilton'
"pyhamilton"
]

extras_opentrons = [
'opentrons-http-api-client',
'opentrons-shared-data'
"opentrons-http-api-client",
"opentrons-shared-data"
]

extras_server = [
'flask[async]',
"flask[async]",
]

extras_testing = [
'pytest',
'pytest-timeout',
'pylint',
'mypy',
'responses'
] + extras_simulation + extras_opentrons + extras_server + extras_http + extras_plate_reading

extras_dev = extras_docs + extras_simulation + extras_http + extras_websockets + extras_testing + \
extras_server + extras_fw + extras_opentrons + extras_plate_reading
extras_dev = extras_fw + extras_http + extras_plate_reading + extras_websockets + \
extras_simulation + extras_opentrons + extras_server + [
"sphinx_book_theme",
"myst_nb",
"sphinx_copybutton",
"pytest",
"pytest-timeout",
"pylint",
"mypy",
"responses"
]

extras_all = extras_docs + extras_simulation + extras_http + extras_websockets + extras_testing + \
extras_venus + extras_server + extras_fw + extras_opentrons + extras_plate_reading
# Some extras are not available on all platforms. `dev` should be available everywhere
extras_all = extras_dev + extras_venus

setup(
name='PyLabRobot',
version=__version__,
packages=find_packages(exclude="tools"),
description='A hardware agnostic platform for liquid handling',
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=["typing_extensions"],
url='https://github.com/pylabrobot/pylabrobot.git',
package_data={'pylabrobot': ['liquid_handling/backends/simulation/simulator/*']},
extras_require={
'testing': extras_testing,
'docs': extras_docs,
'fw': extras_fw,
'simulation': extras_simulation,
'http': extras_http,
'plate_reading': extras_plate_reading,
'websockets': extras_websockets,
'venus': extras_venus,
'opentrons': extras_opentrons,
'server': extras_server,
'dev': extras_dev,
'all': extras_all,
},
entry_points={
'console_scripts': [
'lh-server=pylabrobot.server.liquid_handling_server:main',
],
}
name="PyLabRobot",
version=__version__,
packages=find_packages(exclude="tools"),
description="A hardware agnostic platform for liquid handling",
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=["typing_extensions"],
url="https://github.com/pylabrobot/pylabrobot.git",
package_data={"pylabrobot": ["liquid_handling/backends/simulation/simulator/*"]},
extras_require={
"fw": extras_fw,
"http": extras_http,
"plate_reading": extras_plate_reading,
"websockets": extras_websockets,
"simulation": extras_simulation,
"venus": extras_venus,
"opentrons": extras_opentrons,
"server": extras_server,
"dev": extras_dev,
"all": extras_all,
},
entry_points={
"console_scripts": [
"lh-server=pylabrobot.server.liquid_handling_server:main",
],
}
)

0 comments on commit 86ff896

Please sign in to comment.