Skip to content
Draft
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
135 changes: 134 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,134 @@
/.git
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDEs
.idea/

.git/
132 changes: 129 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,132 @@
.venv/
build/
# Byte-compiled / optimized / DLL files
__pycache__/
*.egg-info/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDEs
.idea/
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# Norse execution server
# Norse server

A server that executes arbitrary PyTorch and Norse code.
A server instance that executes arbitrary PyTorch and Norse code.

## Usage

```bash
# Install via pip
pip install git+https://github.com/norse/norse_server
pip install git+https://github.com/norse/norse-server

# Run with gunicorn for production
norse-server start

# Or locally with flask for development
flask --app src/main.py --debug run -h 0.0.0.0
```

## Acknowledgements
Expand Down
70 changes: 54 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,71 @@
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"

[project]
name = "norse-server"
version = "1.1.0"
description = "Server instance for executing arbitrary PyTorch and Norse code"
readme = "README.md"
requires-python = ">=3.9"
license-files = ["BSD-3-Clause"]
authors = [
{name = "Hilal Khalife"},
{name = "Jens E. Pedersen"},
{name = "Sebastian Spreizer"},
]
maintainers = [
{name = "Sebastian Spreizer", email = "spreizer@web.de"},
{name = "Jens E. Pedersen", email = "jeped@kth.se"},
]
description = "Server for executing arbitrary PyTorch and Norse code"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["Python", "PyTorch", "Norse", "Flask"]
license = {text = "BSD-3-Clause"}
keywords = ["Norse", "PyTorch", "spiking neuronal networks"]
classifiers = [
"Framework :: Flask",
"Development Status :: 5 - Production/Stable",
"Framework :: FastAPI",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
]
dependencies = [
"RestrictedPython",
"flask",
"flask-cors",
"fastAPI",
"gunicorn",
"norse",
"requests",
"waitress",
"werkzeug",
"pydantic",
"uvicorn",
]
dynamic = ["version"]

[project.urls]
repository = "https://github.com/norse/norse-server"
documentation = "https://norse.github.io/norse/"

[tool.setuptools]
package-dir = {"norse_server" = "src"}
script-files = ["scripts/norse-server" , "scripts/norse-server-win.bat"]
script-files = [
"scripts/norse-server",
"scripts/norse-server-win.bat"
]

[tool.black]
line-length = 120

[tool.flake8]
# This is ignored
# see discussions around https://github.com/PyCQA/flake8/issues/234

[tool.isort]
atomic = true
line_length = 120
multi_line_output = 3
profile = "black"
skip_gitignore = true

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--mypy --pylint --pydocstyle --cov --ignore=conda --ignore=venv --ignore=.git --ignore=__pycache__"
norecursedirs = ".git _build venv tmp*"

[tool.mypy]
exclude = ".git/, .pytest_cache/, conda/, venv/"

[tool.setuptools.dynamic]
version = {attr = "src.__version__"}
[tool.pydocstyle]
convention = "numpy"
add-ignore = "D300"
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RestrictedPython
fastAPI
gunicorn
norse
pydantic
uvicorn
Loading