najaeda 0.1.5__cp313-cp313t-macosx_11_0_arm64.whl → 0.1.7__cp313-cp313t-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of najaeda might be problematic. Click here for more details.
- najaeda/docs/.readthedocs.yaml +37 -0
- najaeda/docs/Makefile +20 -0
- najaeda/docs/conf.py +26 -0
- najaeda/docs/make.bat +35 -0
- najaeda/docs/source/api.rst +7 -0
- najaeda/docs/source/conf.py +40 -0
- najaeda/docs/source/index.rst +13 -0
- najaeda/instance_visitor.py +12 -6
- najaeda/libnaja_snl.dylib +0 -0
- najaeda/libnaja_snl_python.dylib +0 -0
- najaeda/netlist.py +346 -144
- najaeda-0.1.7.dist-info/METADATA +192 -0
- najaeda-0.1.7.dist-info/RECORD +20 -0
- najaeda-0.1.5.dist-info/METADATA +0 -102
- najaeda-0.1.5.dist-info/RECORD +0 -13
- {najaeda-0.1.5.dist-info → najaeda-0.1.7.dist-info}/WHEEL +0 -0
- {najaeda-0.1.5.dist-info → najaeda-0.1.7.dist-info}/licenses/AUTHORS +0 -0
- {najaeda-0.1.5.dist-info → najaeda-0.1.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 The Naja authors <https://github.com/najaeda/naja/blob/main/AUTHORS>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# .readthedocs.yaml
|
|
5
|
+
# Read the Docs configuration file
|
|
6
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
7
|
+
|
|
8
|
+
# Required
|
|
9
|
+
version: 2
|
|
10
|
+
|
|
11
|
+
# Set the OS, Python version and other tools you might need
|
|
12
|
+
build:
|
|
13
|
+
os: ubuntu-22.04
|
|
14
|
+
apt_packages:
|
|
15
|
+
- cmake
|
|
16
|
+
tools:
|
|
17
|
+
python: "3.12"
|
|
18
|
+
# You can also specify other tool versions:
|
|
19
|
+
# nodejs: "19"
|
|
20
|
+
# rust: "1.64"
|
|
21
|
+
# golang: "1.19"
|
|
22
|
+
|
|
23
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
24
|
+
sphinx:
|
|
25
|
+
configuration: docs/conf.py
|
|
26
|
+
|
|
27
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
28
|
+
# formats:
|
|
29
|
+
# - pdf
|
|
30
|
+
# - epub
|
|
31
|
+
|
|
32
|
+
# Optional but recommended, declare the Python requirements required
|
|
33
|
+
# to build your documentation
|
|
34
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
35
|
+
python:
|
|
36
|
+
install:
|
|
37
|
+
- requirements: docs/requirements.txt
|
najaeda/docs/Makefile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
najaeda/docs/conf.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#...
|
|
2
|
+
#extensions = [
|
|
3
|
+
# "breathe",
|
|
4
|
+
# 'sphinx_rtd_theme',
|
|
5
|
+
#]
|
|
6
|
+
#...
|
|
7
|
+
|
|
8
|
+
project = 'najaeda'
|
|
9
|
+
copyright = '2023, The Naja authors'
|
|
10
|
+
author = 'The Naja authors'
|
|
11
|
+
|
|
12
|
+
html_theme = "sphinx_rtd_theme"
|
|
13
|
+
html_title = "najaeda Documentation"
|
|
14
|
+
|
|
15
|
+
breathe_default_project = "najaeda"
|
|
16
|
+
|
|
17
|
+
#import os
|
|
18
|
+
#if 'IN_READ_THE_DOCS' in os.environ:
|
|
19
|
+
# import subprocess
|
|
20
|
+
# #call doxygen from cmake
|
|
21
|
+
# subprocess.call('mkdir build', shell=True)
|
|
22
|
+
# subprocess.call('cd build; cmake ../.. -DBUILD_ONLY_DOC=ON', shell=True)
|
|
23
|
+
# subprocess.call('cd build; make docs', shell=True)
|
|
24
|
+
# subprocess.call('cd build/docs; pwd; ls -all', shell=True)
|
|
25
|
+
#
|
|
26
|
+
#breathe_projects = { "najaeda" : "./build/docs/xml/" }
|
najaeda/docs/make.bat
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=source
|
|
11
|
+
set BUILDDIR=build
|
|
12
|
+
|
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# For the full list of built-in configuration values, see the documentation:
|
|
4
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
5
|
+
|
|
6
|
+
# -- Project information -----------------------------------------------------
|
|
7
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
# Add the src directory to sys.path
|
|
13
|
+
sys.path.insert(0, os.path.abspath('../../../'))
|
|
14
|
+
|
|
15
|
+
project = 'najaeda'
|
|
16
|
+
copyright = '2024, Naja authors'
|
|
17
|
+
author = 'Naja authors'
|
|
18
|
+
release = '0.1.6'
|
|
19
|
+
|
|
20
|
+
# -- General configuration ---------------------------------------------------
|
|
21
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
22
|
+
|
|
23
|
+
extensions = [
|
|
24
|
+
'sphinx.ext.autodoc', # Enables the automodule directive
|
|
25
|
+
'sphinx.ext.napoleon', # (Optional) Supports Google and NumPy-style docstrings
|
|
26
|
+
'sphinx.ext.viewcode', # (Optional) Links to source code in docs
|
|
27
|
+
'sphinx.ext.todo', # (Optional) For TODOs in the documentation
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
autodoc_mock_imports = ["najaeda.snl"]
|
|
31
|
+
templates_path = ['_templates']
|
|
32
|
+
exclude_patterns = []
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# -- Options for HTML output -------------------------------------------------
|
|
37
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
38
|
+
|
|
39
|
+
html_theme = 'sphinx_rtd_theme'
|
|
40
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.. najaeda documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Mon Dec 16 16:39:26 2024.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
|
|
6
|
+
najaeda documentation
|
|
7
|
+
=====================
|
|
8
|
+
|
|
9
|
+
.. toctree::
|
|
10
|
+
:maxdepth: 2
|
|
11
|
+
:caption: Contents:
|
|
12
|
+
|
|
13
|
+
api
|
najaeda/instance_visitor.py
CHANGED
|
@@ -11,15 +11,21 @@ class VisitorConfig:
|
|
|
11
11
|
def __init__(
|
|
12
12
|
self,
|
|
13
13
|
enter_condition: Callable[[netlist.Instance], bool] = lambda node: True,
|
|
14
|
-
callback: Callable[
|
|
14
|
+
callback: Callable[..., None] = lambda node, *args, **kwargs: None,
|
|
15
|
+
args: tuple = (),
|
|
16
|
+
kwargs: dict = None,
|
|
15
17
|
):
|
|
16
18
|
"""
|
|
17
|
-
:param enter_condition: A
|
|
18
|
-
the
|
|
19
|
-
:param callback:
|
|
19
|
+
:param enter_condition: A callable that takes a node (dict)
|
|
20
|
+
and returns True if the visitor should enter.
|
|
21
|
+
:param callback: A callable that takes a node (dict) and performs an operation on it.
|
|
22
|
+
:param args: Positional arguments to pass to the callback.
|
|
23
|
+
:param kwargs: Keyword arguments to pass to the callback.
|
|
20
24
|
"""
|
|
21
|
-
self.callback = callback
|
|
22
25
|
self.enter_condition = enter_condition
|
|
26
|
+
self.callback = callback
|
|
27
|
+
self.args = args
|
|
28
|
+
self.kwargs = kwargs or {}
|
|
23
29
|
|
|
24
30
|
|
|
25
31
|
class Visitor:
|
|
@@ -37,7 +43,7 @@ class Visitor:
|
|
|
37
43
|
:param config: VisitorConfig object defining conditions and callbacks.
|
|
38
44
|
"""
|
|
39
45
|
# Execute the callback
|
|
40
|
-
config.callback(instance)
|
|
46
|
+
config.callback(instance, *config.args, **config.kwargs)
|
|
41
47
|
|
|
42
48
|
# Check if we should proceed to children
|
|
43
49
|
if config.enter_condition(instance):
|
najaeda/libnaja_snl.dylib
CHANGED
|
Binary file
|
najaeda/libnaja_snl_python.dylib
CHANGED
|
Binary file
|