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
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ jobs:
- 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
pip install -e .[dev]
make
pip install -e .

- name: Run tests with pytest
run: |
Expand All @@ -47,19 +46,20 @@ jobs:
- 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 .

make

- name: Run examples
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

kill $(jobs -p)
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.

13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ For an example, see the [Blackrock Neurotech CerePlex driver](https://github.com
Dependencies:

git submodule update --init
pip install -r requirements.txt
pip install .
./setup.sh all
# or
make all

To build and install in development mode:

pip install -e .
git submodule update --init
pip install -e .[dev]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need

Suggested change
pip install -e .[dev]
pip install -e ".[dev]"

otherwise the brackets are interpreted (I get zsh: no matches found: .[dev])

make

To build and install a wheel:

Expand All @@ -176,6 +178,13 @@ To build and install a wheel:

## Development

It is highly recommened setting up a [virtual python environment](https://docs.python.org/3/library/venv.html) if you are actively developing this repo:
```bash
python -m venv .venv

source .venv/bin/activate
```

If you want to catch linting errors before pushing, you can install a pre-commit hook.

```bash
Expand Down
46 changes: 45 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
[project]
name = "science-synapse"
version = "2.0.0"
description = "Client library and CLI for the Synapse API"
authors = [{name = "Science Team", email = "team@science.xyz"}]
readme = "README.md"
license = "Apache-2.0"
license-files = ["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",
"paramiko >=3.5.1",
"protobuf>=5.29",
"protoletariat>=3.3.9",
"pyqt5>=5.15.11",
"pyqtgraph>=0.13.7",
"pyserial>=3.5",
"pyyaml>=6.0",
"pyzmq>=26.3.0",
"rich>=13.9.4",
"scipy>=1.13.1",
]

[project.optional-dependencies]
dev = [
"ruff>=0.9.10",
"pre-commit>=4.1.0",
"pytest>=8.3.5",
"pytest-asyncio>=0.25.3",
]

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


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

This file was deleted.

38 changes: 1 addition & 37 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,40 +21,8 @@
]

setup(
name="science-synapse",
version="2.0.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",
"pyyaml",
"paramiko >=3.5.1"
],
entry_points={
"console_scripts": [
"synapsectl = synapse.cli:main",
"synapse-sim = synapse.simulator:main",
],
},
)