Bootstrapped
This commit is contained in:
parent
74e4135f00
commit
9fbdad45a8
32
pyproject.toml
Normal file
32
pyproject.toml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "pyhld"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Fiber to the Home High Level Design CLI Tool"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.8"
|
||||||
|
license = "MIT"
|
||||||
|
authors = [
|
||||||
|
{ name = "Your Name", email = "your.email@example.com" }
|
||||||
|
]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 3 - Alpha",
|
||||||
|
"Intended Audience :: Telecommunications Industry",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"click>=8.1.8",
|
||||||
|
"rich>=14.0.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
pyhld = "pyhld.cli:main"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["src/pyhld"]
|
10
setup.cfg
Normal file
10
setup.cfg
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[metadata]
|
||||||
|
license_files = LICENSE
|
||||||
|
|
||||||
|
[options]
|
||||||
|
package_dir=
|
||||||
|
=src
|
||||||
|
packages=find:
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
where=src
|
7
src/pyhld/__init__.py
Normal file
7
src/pyhld/__init__.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
"""
|
||||||
|
PyHLD - Python Fiber to the Home High Level Design Tool
|
||||||
|
"""
|
||||||
|
|
||||||
|
__version__ = "0.1.0"
|
||||||
|
__author__ = "Chris Bomar"
|
||||||
|
__email__ = ""
|
43
src/pyhld/cli.py
Normal file
43
src/pyhld/cli.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
"""Command line interface for PyHLD."""
|
||||||
|
import click
|
||||||
|
from rich.console import Console
|
||||||
|
from rich.panel import Panel
|
||||||
|
from . import __version__
|
||||||
|
|
||||||
|
console = Console()
|
||||||
|
|
||||||
|
@click.group()
|
||||||
|
@click.version_option(version=__version__)
|
||||||
|
def main():
|
||||||
|
"""PyHLD - Fiber to the Home High Level Design CLI Tool."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
@main.command()
|
||||||
|
@click.option('--input-file', '-i', type=click.Path(exists=True), help='Input data file')
|
||||||
|
@click.option('--output', '-o', type=click.Path(), help='Output file path')
|
||||||
|
def design(input_file, output):
|
||||||
|
"""Create a high-level FTTH design."""
|
||||||
|
console.print(Panel.fit("🌐 Creating FTTH Design", title="PyHLD"))
|
||||||
|
console.print(f"Input file: {input_file}")
|
||||||
|
console.print(f"Output will be saved to: {output}")
|
||||||
|
|
||||||
|
@main.command()
|
||||||
|
@click.option('--homes', '-h', type=int, help='Number of homes to be served')
|
||||||
|
@click.option('--area', '-a', type=float, help='Service area in square kilometers')
|
||||||
|
def calculate(homes, area):
|
||||||
|
"""Calculate basic FTTH metrics."""
|
||||||
|
console.print(Panel.fit("📊 Calculating FTTH Metrics", title="PyHLD"))
|
||||||
|
if homes and area:
|
||||||
|
density = homes / area
|
||||||
|
console.print(f"Homes: {homes}")
|
||||||
|
console.print(f"Area: {area} km²")
|
||||||
|
console.print(f"Density: {density:.2f} homes/km²")
|
||||||
|
|
||||||
|
@main.command()
|
||||||
|
def validate():
|
||||||
|
"""Validate design parameters and constraints."""
|
||||||
|
console.print(Panel.fit("✅ Validating Design", title="PyHLD"))
|
||||||
|
# Add validation logic here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
x
Reference in New Issue
Block a user