Skip to content

Introduce pyproject.toml, restructure installation - #25

Open
axodentally wants to merge 12 commits into
feat/testsfrom
feat/introduce-pyproject-toml
Open

Introduce pyproject.toml, restructure installation#25
axodentally wants to merge 12 commits into
feat/testsfrom
feat/introduce-pyproject-toml

Conversation

@axodentally

@axodentally axodentally commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator
  • Adds a pyproject.toml with project metadata, dependencies, optional development dependencies, and entry points for CLI tools, enabling standard installation via pip and editable installs for development. (pyproject.toml)

  • Removes the custom install_symlinks.sh and load_env.sh scripts, as tool installation and environment setup are now handled by standard Python packaging. (install_symlinks.sh, load_env.sh) [1] [2]

  • Introduces a constraints.txt file to allow users to pin dependencies to tested versions for reproducibility. (constraints.txt)

  • Updates README.md and manual installation instructions

  • Refactors tools/netviz/netviz.py to add a main entry point

These changes make the project installation more robust, reproducible, and aligned with modern Python practices.

@axodentally

axodentally commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

This change is part of the following stack:

Change managed by git-spice.

Comment thread tools/mgr/mgr.py
import asyncio

from helpers import *
from tools.mgr.helpers import *
Comment thread tools/netviz/netviz.py
def terminal_to_pty(event: events.XtermDataEventArguments) -> None: # pyright: ignore[reportUnusedFunction]
try:
os.write(pty_fd, event.data.encode("utf-8"))
except OSError:
Comment thread tools/netviz/netviz.py
termios.TIOCSWINSZ,
struct.pack("HHHH", event.rows, event.cols, 0, 0),
)
except OSError:
@axodentally
axodentally force-pushed the feat/introduce-pyproject-toml branch from 665e130 to 0744c66 Compare August 25, 2026 14:19
this allows us to properly define dependencies, settings for tools like
based-pyright and how to build/install the project.
With this in place, nse2 can be install into a venv just by using `pip
install .` and python will automatically add the bash scripts and python
scripts to the PATH of the venv.
in future, replace that with pylock.yaml, uv.lock or similar
@axodentally
axodentally force-pushed the feat/introduce-pyproject-toml branch from 0744c66 to 546f809 Compare August 25, 2026 14:27
Use explicit root page functions for netviz and manager so NiceGUI can
load pages correctly when launched through the installed console
scripts. This prevents entry-point wrappers from being re-executed and
fixes page loading, process lifecycle, and premature terminal cleanup
errors.
@axodentally
axodentally force-pushed the feat/introduce-pyproject-toml branch from fd71279 to fb9404e Compare August 26, 2026 12:04

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

install_symlinks.sh previously exposed every tools/helpers/* command, but the new package entry points omit get_fixed_links/graphml2viz and script-files excludes the helper shell scripts. A normal pip install therefore loses helper commands that the new docs say are available on PATH. Add the missing scripts/package data or explicitly retire them, and test the installed wheel contents and commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants