mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-20 02:18:13 +00:00
* Add SystemVerilog language server support using slang-langserver - Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support - Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows - Add pytest marker and basic test cases for symbol retrieval Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix ruff lint errors by updating configuration - Add UP042, PLW0108, PLC0207 to ruff ignore list (style preferences) - Update test repo pyproject.toml to use lint.select and lint.isort sections Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Replace slang-langserver with verible-verilog-ls for SystemVerilog slang v7.0 release URLs return 404 as the project stopped providing pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance) which actively maintains binary releases for all major platforms. Changes: - Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057 - Add Linux ARM64 platform support - Update fallback and error messages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add SystemVerilog language server support using slang-langserver - Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support - Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows - Add pytest marker and basic test cases for symbol retrieval Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Replace slang-langserver with verible-verilog-ls for SystemVerilog slang v7.0 release URLs return 404 as the project stopped providing pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance) which actively maintains binary releases for all major platforms. Changes: - Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057 - Add Linux ARM64 platform support - Update fallback and error messages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix Verible binary paths for macOS and Windows The archive directory names differ per platform: - Linux: verible-v0.0-4051-g9fdb4057/bin/ - macOS: verible-v0.0-4051-g9fdb4057-macOS/bin/ - Windows: verible-v0.0-4051-g9fdb4057-win64/ (no bin/ subdirectory) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update docs and comments: slang-langserver → verible-verilog-ls - Update pyproject.toml marker description - Update ls_config.py docstring - Update test file docstrings - Remove unused _slang_available() function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add verible-verilog-ls to CI and improve SystemVerilog LS - Add verible-verilog-ls installation step to pytest.yml for Linux/macOS/Windows (GitHub Releases, follows ZLS pattern) - Remove unused threading import and server_ready Event - Add capability validation (assert textDocumentSync, warn on missing documentSymbolProvider/definitionProvider) - Add window/logMessage notification handler - Add codeAction, formatting, documentHighlight capabilities - Improve error message with conda/Homebrew/GitHub install methods Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add verible detection tests and remove redundant ALU tests Add comprehensive unit tests for verible-verilog-ls binary detection logic (PATH lookup, version logging, graceful degradation, download fallback). Remove duplicate ALU symbol tests that tested the same LSP operations already covered by counter tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix SystemVerilog LSP convention deviations from code review - Add client/registerCapability handler (all other 31 LSPs have it) - Add locale: en to initialize params (project convention) - Change log.debug to log.info for window/logMessage handler - Fix dead code in test_find_references_cross_file skip/assert logic - Move repeated imports to module top level in detection tests - Remove unused IS_WINDOWS/IS_UNIX variables and sys import - Fix hardcoded line number comment to semantic description Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix Windows CI verible path: flat zip structure has no bin/ subdir The Windows verible zip extracts to verible-VERSION-win64/ with executables directly in the root (no bin/ subdirectory), unlike Linux/macOS tar.gz which have bin/ subdirectory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix macOS CI verible path: tar.gz extracts with -macOS suffix Each platform has different directory naming in verible releases: - Linux: verible-VERSION/bin/ (no suffix) - macOS: verible-VERSION-macOS/bin/ (has -macOS suffix) - Windows: verible-VERSION-win64/ (flat, no bin/ subdir) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Refactor: read Verible version from settings instead of hardcoding Extract hardcoded version string into _custom_settings.get("verible_version") with the current version as default. This allows version override via project.yml without changing source code. Also introduce DEFAULT_VERIBLE_VERSION constant in detection tests for consistency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add rename tests and strengthen existing SystemVerilog tests - Add TestSystemVerilogRename: within-file, cross-file, module rename - Strengthen all existing tests with exact position/value verification - Remove all pytest.skip, replace with assert (review feedback) - Remove isinstance check in _find_symbol_by_name (review feedback) - Extract _extract_hover_text and _extract_changes helpers - Remove test_diagnostics (requires shared ls.py fix, separate PR) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
337 lines
9.0 KiB
TOML
337 lines
9.0 KiB
TOML
[build-system]
|
|
build-backend = "hatchling.build"
|
|
requires = ["hatchling"]
|
|
|
|
[project]
|
|
name = "serena-agent"
|
|
version = "0.1.4"
|
|
description = ""
|
|
authors = [{ name = "Oraios AI", email = "info@oraios-ai.de" }]
|
|
readme = "README.md"
|
|
requires-python = ">=3.11, <3.12"
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3.11",
|
|
]
|
|
dependencies = [
|
|
"requests>=2.32.3,<3",
|
|
"pyright>=1.1.396,<2",
|
|
"fortls>=3.2.2",
|
|
"overrides>=7.7.0,<8",
|
|
"python-dotenv>=1.0.0, <2",
|
|
"mcp==1.23.0",
|
|
"flask>=3.0.0",
|
|
"sensai-utils>=1.5.0",
|
|
"pydantic>=2.10.6",
|
|
"types-pyyaml>=6.0.12.20241230",
|
|
"pyyaml>=6.0.2",
|
|
"ruamel.yaml==0.18.14",
|
|
"jinja2>=3.1.6",
|
|
"dotenv>=0.9.9",
|
|
"pathspec>=0.12.1",
|
|
"psutil>=7.0.0",
|
|
"docstring_parser>=0.16",
|
|
"joblib>=1.5.1",
|
|
"tqdm>=4.67.1",
|
|
"tiktoken>=0.9.0",
|
|
"anthropic>=0.54.0",
|
|
"beautifulsoup4>=4.14.2",
|
|
]
|
|
|
|
[[tool.uv.index]]
|
|
name = "testpypi"
|
|
url = "https://test.pypi.org/simple/"
|
|
publish-url = "https://test.pypi.org/legacy/"
|
|
explicit = true
|
|
|
|
[project.scripts]
|
|
serena = "serena.cli:top_level"
|
|
serena-mcp-server = "serena.cli:start_mcp_server"
|
|
index-project = "serena.cli:index_project" # deprecated
|
|
|
|
[project.license]
|
|
text = "MIT"
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"black[jupyter]>=23.7.0, <26", # black 26 is incompatible with our pathspec version
|
|
"jinja2",
|
|
# In version 1.0.4 we get a NoneType error related to some config conversion (yml_analytics is None and should be a list)
|
|
"mypy>=1.16.1",
|
|
"poethepoet>=0.20.0",
|
|
"pytest>=8.0.2",
|
|
"pytest-xdist>=3.5.0",
|
|
"ruff>=0.0.285",
|
|
"toml-sort>=0.24.2",
|
|
"types-pyyaml>=6.0.12.20241230",
|
|
"syrupy>=4.9.1",
|
|
"types-requests>=2.32.4.20241230",
|
|
# docs
|
|
"sphinx>=7,<8",
|
|
"sphinx_rtd_theme>=0.5.1",
|
|
"sphinx-toolbox==3.7.0",
|
|
"jupyter-book>=1,<2",
|
|
"nbsphinx",
|
|
"pyinstrument",
|
|
"pytest-timeout>=2.4.0",
|
|
]
|
|
agno = ["agno>=2.2.1", "sqlalchemy>=2.0.40"]
|
|
google = ["google-genai>=1.8.0"]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/oraios/serena"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/serena", "src/interprompt", "src/solidlsp"]
|
|
|
|
[tool.black]
|
|
line-length = 140
|
|
target-version = ["py311"]
|
|
exclude = '''
|
|
/(
|
|
src/solidlsp/language_servers/.*/static|src/multilspy
|
|
)/
|
|
'''
|
|
|
|
[tool.doc8]
|
|
max-line-length = 1000
|
|
|
|
[tool.mypy]
|
|
allow_redefinition = true
|
|
check_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
disallow_untyped_defs = true
|
|
ignore_missing_imports = true
|
|
no_implicit_optional = true
|
|
pretty = true
|
|
show_error_codes = true
|
|
show_error_context = true
|
|
show_traceback = true
|
|
strict_equality = true
|
|
strict_optional = true
|
|
warn_no_return = true
|
|
warn_redundant_casts = true
|
|
warn_unreachable = true
|
|
warn_unused_configs = true
|
|
warn_unused_ignores = false
|
|
exclude = "^build/|^docs/|^test/resources/"
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "test.*"
|
|
disallow_untyped_defs = false # untyped defs are OK in tests
|
|
|
|
[tool.poe.env]
|
|
PYDEVD_DISABLE_FILE_VALIDATION = "1"
|
|
|
|
[tool.poe.executor]
|
|
# This is important when using poe with uv, because otherwise poe will try to run commands through
|
|
# uv, which in turn will try to recreate the environment, which in turn will fail if any process
|
|
# using the environment is already running! Naturally, processes using the env are running all the
|
|
# time (e.g. a Serena MCP server), so using the default executor (uv) is not an option!
|
|
type = "simple"
|
|
|
|
[tool.poe.tasks]
|
|
# Uses PYTEST_MARKERS env var for default markers
|
|
# For custom markers, one can either adjust the env var or just use -m option in the command line,
|
|
# as the second -m option will override the first one.
|
|
test = "pytest test -vv"
|
|
_black_check = "black --check src scripts test"
|
|
_ruff_check = "ruff check src scripts test"
|
|
_black_format = "black src scripts test"
|
|
_ruff_format = "ruff check --fix src scripts test"
|
|
lint = ["_black_check", "_ruff_check"]
|
|
format = ["_ruff_format", "_black_format"]
|
|
_mypy_core = "mypy src/serena src/solidlsp"
|
|
_mypy_test = "mypy --disable-error-code no-untyped-def test"
|
|
type-check = ["_mypy_core", "_mypy_test"]
|
|
# docs
|
|
_autogen_rst = "python docs/autogen_rst.py"
|
|
_sphinx_build = "sphinx-build -b html docs docs/_build -W --keep-going"
|
|
_jb_generate_toc = "python docs/create_toc.py"
|
|
_jb_generate_config = "jupyter-book config sphinx docs/"
|
|
doc-clean = "rm -rf docs/_build docs/03_api"
|
|
doc-generate-files = ["_autogen_rst", "_jb_generate_toc", "_jb_generate_config"]
|
|
doc-build = ["doc-clean", "doc-generate-files", "_sphinx_build"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
line-length = 140
|
|
exclude = ["src/solidlsp/language_servers/**/static", "src/multilspy"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
line-ending = "auto"
|
|
skip-magic-trailing-comma = false
|
|
docstring-code-format = true
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"ASYNC",
|
|
"B",
|
|
"C4",
|
|
"C90",
|
|
"COM",
|
|
"D",
|
|
"DTZ",
|
|
"E",
|
|
"F",
|
|
"FLY",
|
|
"G",
|
|
"I",
|
|
"ISC",
|
|
"PIE",
|
|
"PLC",
|
|
"PLE",
|
|
"PLW",
|
|
"RET",
|
|
"RUF",
|
|
"RSE",
|
|
"SIM",
|
|
"TID",
|
|
"UP",
|
|
"W",
|
|
"YTT",
|
|
]
|
|
ignore = [
|
|
"PLC0415",
|
|
"RUF002",
|
|
"RUF005",
|
|
"RUF059",
|
|
"SIM118",
|
|
"SIM108",
|
|
"E501",
|
|
"E741",
|
|
"B008",
|
|
"B011",
|
|
"B028",
|
|
"D100",
|
|
"D101",
|
|
"D102",
|
|
"D103",
|
|
"D104",
|
|
"D105",
|
|
"D107",
|
|
"D200",
|
|
"D203",
|
|
"D213",
|
|
"D401",
|
|
"D402",
|
|
"DTZ005",
|
|
"E402",
|
|
"E501",
|
|
"E701",
|
|
"E731",
|
|
"C408",
|
|
"E203",
|
|
"G004",
|
|
"RET505",
|
|
"D106",
|
|
"D205",
|
|
"D212",
|
|
"PLW2901",
|
|
"B027",
|
|
"D404",
|
|
"D407",
|
|
"D408",
|
|
"D409",
|
|
"D400",
|
|
"D415",
|
|
"COM812",
|
|
"RET503",
|
|
"RET504",
|
|
"F403",
|
|
"F405",
|
|
"C401",
|
|
"C901",
|
|
"ASYNC230",
|
|
"ISC003",
|
|
"B024",
|
|
"B007",
|
|
"SIM102",
|
|
"W291",
|
|
"W293",
|
|
"B009",
|
|
"SIM103", # forbids multiple returns
|
|
"SIM110", # requires use of any(...) instead of for-loop
|
|
"G001", # forbids str.format in log statements
|
|
"E722", # forbids unspecific except clause
|
|
"SIM105", # forbids empty/general except clause
|
|
"SIM113", # wants to enforce use of enumerate
|
|
"E712", # forbids equality comparison with True/False
|
|
"UP007", # forbids some uses of Union
|
|
"TID252", # forbids relative imports
|
|
"B904", # forces use of raise from other_exception
|
|
"RUF012", # forbids mutable attributes as ClassVar
|
|
"SIM117", # forbids nested with statements
|
|
"C400", # wants to unnecessarily force use of list comprehension
|
|
"UP037", # can incorrectly (!) convert quoted type to unquoted type, causing an error
|
|
"UP045", # imposes T | None instead of Optional[T]
|
|
"UP031", # forbids % operator to format strings
|
|
"UP042", # wants str,Enum -> StrEnum (breaking change)
|
|
"PLW0108", # unnecessary lambda (style preference)
|
|
"PLC0207", # split vs rsplit optimization (style preference)
|
|
]
|
|
unfixable = ["F841", "F601", "F602", "B018"]
|
|
extend-fixable = ["F401", "B905", "W291"]
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 20
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**" = ["D103"]
|
|
"scripts/**" = ["D103"]
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "--snapshot-patch-pycharm-diff"
|
|
markers = [
|
|
"clojure: language server running for Clojure",
|
|
"python: language server running for Python",
|
|
"go: language server running for Go",
|
|
"java: language server running for Java",
|
|
"kotlin: language server running for kotlin",
|
|
"groovy: language server running for Groovy",
|
|
"rust: language server running for Rust",
|
|
"typescript: language server running for TypeScript",
|
|
"vue: language server running for Vue (uses TypeScript LSP)",
|
|
"php: language server running for PHP",
|
|
"perl: language server running for Perl",
|
|
"csharp: language server running for C#",
|
|
"elixir: language server running for Elixir",
|
|
"elm: language server running for Elm",
|
|
"terraform: language server running for Terraform",
|
|
"swift: language server running for Swift",
|
|
"bash: language server running for Bash",
|
|
"r: language server running for R",
|
|
"snapshot: snapshot tests for symbolic editing operations",
|
|
"ruby: language server running for Ruby (uses ruby-lsp)",
|
|
"zig: language server running for Zig",
|
|
"lua: language server running for Lua",
|
|
"nix: language server running for Nix",
|
|
"dart: language server running for Dart",
|
|
"erlang: language server running for Erlang",
|
|
"scala: language server running for Scala",
|
|
"al: language server running for AL (Microsoft Dynamics 365 Business Central)",
|
|
"fsharp: language server running for F#",
|
|
"rego: language server running for Rego",
|
|
"markdown: language server running for Markdown",
|
|
"julia: Julia language server tests",
|
|
"fortran: language server running for Fortran",
|
|
"haskell: Haskell language server tests",
|
|
"yaml: language server running for YAML",
|
|
"powershell: language server running for PowerShell",
|
|
"pascal: language server running for Pascal (Free Pascal/Lazarus)",
|
|
"cpp: language server running for C/C++",
|
|
"slow: tests that require additional Expert instances and have long startup times (~60-90s each)",
|
|
"toml: language server running for TOML",
|
|
"matlab: language server running for MATLAB (requires MATLAB R2021b+)",
|
|
"systemverilog: language server running for SystemVerilog (uses verible-verilog-ls)",
|
|
]
|
|
|
|
[tool.codespell]
|
|
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
|
|
skip = '.git*,*.svg,*.lock,*.min.*'
|
|
check-hidden = true
|
|
# ignore-regex = ''
|
|
ignore-words-list = 'paket'
|