Skip to content

Commit

Permalink
fix: add install and cli
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Nov 22, 2024
1 parent 5c62d67 commit 5df930b
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
20 changes: 20 additions & 0 deletions nspeed/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import click

from .nspeed import setup_test_files, run_speed_tests

@click.group("main")
def cli_main():
"""
Test the speed of various transfer configurations.
"""
pass

@cli_main.command("init")
def init():
"""(1) Populate source locations with test files."""
setup_test_files()

@cli_main.command("run")
def run():
"""(2) Run the speed tests."""
run_speed_tests()
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = nspeed
url = https://github.com/seung-lab/network-speed/
summary = Test network speed using various configurations.
description_content_type = text/markdown
description_file = README.md
author = William Silversmith
author_email = [email protected]
home_page = https://github.com/seung-lab/network-speed/
license = License :: OSI Approved :: BSD License
classifier =
Intended Audience :: Developers
Development Status :: 4 - Beta
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development :: Libraries :: Python Modules

[global]
setup_hooks = pbr.hooks.setup_hook

[files]
packages =
nspeed
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os
import setuptools
import sys

setuptools.setup(
setup_requires=['pbr'],
python_requires=">=3.8,<4.0",
include_package_data=True,
entry_points={
"console_scripts": [
"nspeed=nspeed:cli_main"
],
},
pbr=True
)

0 comments on commit 5df930b

Please sign in to comment.