Skip to content
Closed
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
34 changes: 21 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.6"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version-file: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
make
pip install -e .
uv sync --all-extras --dev
uv run make

- name: Run tests with pytest
run: |
pytest -v
uv run pytest -v

test-examples:
runs-on: ubuntu-latest
Expand All @@ -44,22 +47,27 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.6"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version-file: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
make
pip install -e .
uv sync --all-extras --dev
uv run make

synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 &
- name: Run examples
run: |
uv run synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 &

sleep 2

python synapse/examples/stream_out.py 127.0.0.1:50051
uv run synapse/examples/stream_out.py 127.0.0.1:50051

kill $(jobs -p)
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
[project]
name = "science-synapse"
version = "0.11.0"
description = "Client library and CLI for the Synapse API"
authors = [{name = "Science Team", email = "team@science.xyz"}]
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.9"
dependencies = [
"build>=1.2.2.post1",
"coolname>=2.2.0",
"crcmod>=1.7",
"dearpygui>=2.0.0",
"grpcio>=1.71.0",
"grpcio-tools>=1.71.0",
"numpy>=2.0.0",
"pandas>=2.2.0",
"protobuf>=5.29",
"protoletariat>=3.3.9",
"pyqt5>=5.15.11",
"pyqtgraph>=0.13.7",
"pyserial>=3.5",
"pytest>=8.3.5",
"pytest-asyncio>=0.25.3",
"pyzmq>=26.3.0",
"rich>=13.9.4",
"scipy>=1.13.1",
]

[build-system]
requires = ["setuptools", "wheel", "Cython", "crcmod"]
build-backend = "setuptools.build_meta"

[dependency-groups]
dev = [
"ruff>=0.9.10",
"pre-commit>=4.1.0",
]

[project.scripts]
synapsectl = "synapse.cli:main"
synapse-sim = "synapse.simulator:main"
20 changes: 0 additions & 20 deletions requirements.txt

This file was deleted.

36 changes: 1 addition & 35 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from setuptools import setup, find_packages, Extension
from setuptools import setup, Extension
from Cython.Build import cythonize
from pathlib import Path
import os

extra_compile_args = []
Expand All @@ -13,9 +12,6 @@
"-O3",
]

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

extensions = [
Extension(
"synapse.utils.ndtp",
Expand All @@ -25,38 +21,8 @@
]

setup(
name="science-synapse",
version="0.11.0",
description="Client library and CLI for the Synapse API",
author="Science Team",
author_email="team@science.xyz",
packages=find_packages(include=["synapse", "synapse.*"]),
long_description=long_description,
long_description_content_type="text/markdown",
ext_modules=cythonize(
extensions,
compiler_directives={"language_level": "3"},
),
python_requires=">=3.9",
install_requires=[
"coolname",
"grpcio-tools",
"protoletariat",
"numpy >=2.0.0",
"pyserial",
"scipy",
"crcmod",
"rich",
"pyqtgraph",
"pyqt5",
"pandas >=2.2.0",
"dearpygui",
"pyzmq"
],
entry_points={
"console_scripts": [
"synapsectl = synapse.cli:main",
"synapse-sim = synapse.simulator:main",
],
},
)
Loading