Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release #897

Merged
merged 44 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
503dc4f
Drop Python 3.8
alcarney Jul 21, 2024
fb1cc4a
lsp: pyupgrade --py39-plus
alcarney Jul 21, 2024
96a01fb
sphinx-agent: Fix message parsing
alcarney Jul 21, 2024
47989e3
Update changelog
alcarney Jul 21, 2024
c96bc56
devenv: Bump NodeJS version
alcarney Jul 21, 2024
8de0b24
devenv: Install the latest hatch
alcarney Jul 21, 2024
d02c69a
build(deps-dev): bump @vscode/vsce from 2.30.0 to 2.31.1 in /code
dependabot[bot] Jul 22, 2024
5bce0a3
build(deps): bump semver from 7.6.2 to 7.6.3 in /code
dependabot[bot] Jul 22, 2024
4552ff3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 22, 2024
306fbaf
Bump ruff version
alcarney Jul 22, 2024
fc194b2
Start testing against 3.13
alcarney Jul 21, 2024
44f758b
Merge branch 'release' into develop
alcarney Jul 25, 2024
5b75ce8
lsp: Drop Sphinx 5.x, add support for Sphinx 8.x
alcarney Jul 25, 2024
dbd612e
ext: Fix import
alcarney Aug 6, 2024
48290c2
lsp: Re-implement `esbonio.sphinx.configOverrides`
alcarney Aug 6, 2024
ebb698f
lsp: Remove `furo` as test dependency
alcarney Aug 6, 2024
c779ab1
code: Expose `esbonio.sphinx.configOverrides` option
alcarney Aug 6, 2024
b0e1fde
vscode: Hide ruff cache dir
alcarney Aug 6, 2024
d1ace34
vscode: Add some `configOverrides`
alcarney Aug 6, 2024
5238de0
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 5, 2024
218beb0
build(deps-dev): bump typescript from 5.5.3 to 5.5.4 in /code (#867)
dependabot[bot] Aug 6, 2024
647de61
build(deps-dev): bump ovsx from 0.9.1 to 0.9.2 in /code
dependabot[bot] Aug 6, 2024
90bf2dd
ext: Remove dependency on nbformat
alcarney Aug 21, 2024
e164f62
ext: Drop Python 3.8 support
alcarney Aug 21, 2024
c72d60c
ext: Use hatch for testing
alcarney Aug 21, 2024
9a5b77b
ext: Update changelog
alcarney Aug 21, 2024
9f09f93
ext: Add missing dependency
alcarney Aug 21, 2024
b02c435
docs: Use hatch for building docs
alcarney Aug 21, 2024
c74dcc5
docs: Add guide on using esbonio with environment managers
alcarney Aug 21, 2024
2b21fca
vscode: Remove old task definition
alcarney Aug 21, 2024
28685b2
code: Remove unused typing dependency
alcarney Aug 21, 2024
349c393
code: Stop injecting active Python env into config
alcarney Aug 21, 2024
b875c03
code: Expose additional Sphinx process properties
alcarney Aug 21, 2024
12c9bd9
sphinx-agent: Use only builtin nodes for line numbers
alcarney Aug 24, 2024
35a4fc3
docs: Add guide on implementing previews
alcarney Aug 24, 2024
ba6e837
code: Bump dependencies
alcarney Sep 17, 2024
84d3bd6
Reduce frequency of update checks
alcarney Sep 17, 2024
8f7dec1
Update pre-commit config and deps
alcarney Sep 17, 2024
1ccaef2
Reduce frequency of update checks
alcarney Sep 17, 2024
871a9a1
lsp: Work around openlawlibrary/pygls#433
alcarney Sep 17, 2024
ad935d2
build(deps): bump platformdirs from 4.2.2 to 4.3.3 in /code
dependabot[bot] Sep 16, 2024
1c1e5b1
build(deps): bump websockets from 12.0 to 13.0.1 in /code
dependabot[bot] Sep 2, 2024
cb319a1
lsp: Migrate to pygls v2
alcarney Aug 24, 2024
c1fbbd0
code: Bump pygls version
alcarney Sep 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .devcontainer/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ ifeq ($(strip $(ARCH)),)
$(error Unable to determine platform architecture)
endif

HATCH_VERSION = 1.10.0
NODE_VERSION := 18.20.2
NODE_VERSION := 18.20.4

# The versions of Python we support
PYXX_versions := 3.8 3.9 3.10 3.11 3.12
PYXX_versions := 3.9 3.10 3.11 3.12
PY_INTERPRETERS =

# Hatch is not only used for building packages, but bootstrapping any missing
# interpreters
HATCH ?= $(or $(shell command -v hatch), $(BIN)/hatch)

$(HATCH):
curl -L --output /tmp/hatch.tar.gz https://github.com/pypa/hatch/releases/download/hatch-v$(HATCH_VERSION)/hatch-$(HATCH_VERSION)-$(ARCH)-unknown-linux-gnu.tar.gz
curl -L --output /tmp/hatch.tar.gz https://github.com/pypa/hatch/releases/latest/download/hatch-$(ARCH)-unknown-linux-gnu.tar.gz
tar -xf /tmp/hatch.tar.gz -C /tmp
rm /tmp/hatch.tar.gz

test -d $(BIN) || mkdir -p $(BIN)
mv /tmp/hatch-$(HATCH_VERSION)-$(ARCH)-unknown-linux-gnu $(HATCH)
mv /tmp/hatch $(HATCH)

$@ --version
touch $@
Expand Down
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ updates:
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
interval: "monthly"

- package-ecosystem: "npm"
directory: "/code"
target-branch: "develop"
schedule:
interval: "weekly"
interval: "monthly"

- package-ecosystem: "pip"
directory: "/code"
target-branch: "develop"
schedule:
interval: "weekly"
interval: "monthly"

- package-ecosystem: "pip"
directory: "/lib/esbonio/tests/workspaces/demo"
target-branch: "develop"
schedule:
interval: "weekly"
interval: "monthly"
3 changes: 2 additions & 1 deletion .github/workflows/lsp-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest]

steps:
Expand All @@ -55,6 +55,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: pip cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lsp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- uses: 'actions/setup-python@v5'
with:
# This must be the minimum Python version we support
python-version: "3.8"
python-version: "3.9"

- name: pip cache
uses: actions/cache@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sphinx-ext-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

Expand All @@ -67,10 +67,10 @@ jobs:
- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade tox
python -m pip install --upgrade hatch
name: Setup Environment

- run: |
cd lib/esbonio-extensions
python -m tox -e py`echo ${{ matrix.python-version }} | tr -d .`
name: Test
hatch test -i py=${{ matrix.python-version }}
name: Run Tests
2 changes: 1 addition & 1 deletion .github/workflows/vscode-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: 'actions/setup-python@v5'
with:
# This must be the minimum Python version we support
python-version: "3.8"
python-version: "3.9"

- name: Pip cache
uses: actions/cache@v4
Expand Down
25 changes: 21 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
exclude: '.bumpversion.cfg$'
ci:
autoupdate_schedule: quarterly

repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -9,26 +11,41 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.6.5
hooks:
- id: ruff
name: ruff (esbonio)
args: [--fix]
files: 'lib/esbonio/.*\.py'

- id: ruff
name: ruff (esbonio-extensions)
args: [--fix]
files: 'lib/esbonio-extensions/.*\.py'

- id: ruff-format
name: ruff-format (esbonio)
files: 'lib/esbonio/.*\.py'

- id: ruff-format
name: ruff-format (esbonio-extensions)
files: 'lib/esbonio-extensions/.*\.py'

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.1'
rev: 'v1.11.2'
hooks:
- id: mypy
name: mypy (scripts)
files: 'scripts/.*\.py'
exclude: 'scripts/.*_documentation\.py'

- id: mypy
name: mypy (esbonio)
args: [--config,lib/esbonio/pyproject.toml]
additional_dependencies:
- aiosqlite
- platformdirs
- pygls
- pygls>=2a0
- pytest_lsp>=0.3
- sphinx
- tomli
Expand Down
18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,25 @@
"**/.ipynb_checkpoints": true,
"**/.coverage": true,
"**/.vscode-test": true,
"**/.mypy_cache": true
"**/.mypy_cache": true,
"**/.ruff_cache": true
},
"esbonio.server.showDeprecationWarnings": true,
"esbonio.sphinx.configOverrides": {
// "extensions": [
// "sphinx.ext.autodoc",
// "sphinx.ext.intersphinx",
// "sphinx.ext.napoleon",
// "sphinx.ext.viewcode",
// "sphinx_design",
// "myst_parser",
// "cli_help",
// "collection_items",
// "domain",
// ],
// "html_theme": "alabaster",
// "html_theme_options": {},
},
"python.testing.pytestArgs": [
"lib/esbonio/tests"
],
Expand Down
17 changes: 0 additions & 17 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@
"$tsc-watch"
]
},
{
"label": "Build Tests",
"type": "npm",
"script": "compile-test",
"isBackground": false,
"options": {
"cwd": "${workspaceRoot}/code"
},
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never",
},
"problemMatcher": [
"$tsc-watch"
]
},
{
"label": "Build Docs",
"type": "shell",
Expand Down
8 changes: 4 additions & 4 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ dev-deps: node_modules/.installed bundled/libs/.installed
# Ensures the latest version of esbonio from PyPi is used.
release-deps: node_modules/.installed bundled/libs/.installed
-test -L bundled/libs/esbonio && rm bundled/libs/esbonio
test -d bundled/libs/esbonio-*.dist-info || $(PY38) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade $(ESBONIO)
test -d bundled/libs/esbonio-*.dist-info || $(PY39) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade $(ESBONIO)

requirements.txt: $(HATCH) requirements.in
$(HATCH) run deps:update

bundled/libs/.installed: $(PY38) requirements.txt
bundled/libs/.installed: $(PY39) requirements.txt
-test -d bundled/libs && rm -r bundled/libs
$(PY38) --version
$(PY38) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
$(PY39) --version
$(PY39) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
touch $@

node_modules/.installed: package.json package-lock.json $(NPM)
Expand Down
1 change: 1 addition & 0 deletions code/changes/785.enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Expose the `esbonio.sphinx.configOverrides` option
1 change: 1 addition & 0 deletions code/changes/858.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.8
1 change: 1 addition & 0 deletions code/changes/859.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for Python 3.13
1 change: 1 addition & 0 deletions code/changes/881.enchancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Sphinx Process tree view now includes details including `esbonio.sphinx.pythonCommand`, `esbonio.sphinx.buildCommand`, the current builder and output files
7 changes: 7 additions & 0 deletions code/changes/881.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**IMPORTANT!**

The VSCode extension will no longer automatically inject the currently active Python interpreter into the configuration sent to the server.
It is now required for all users to set the `esbonio.sphinx.pythonCommand` option, either in your VSCode settings, or in your project's `pyproject.toml` file.

This makes VSCode's behavior more predicable and brings it in line with how other editors behave.
It also encourages the sharing of project configuration settings, which is particuarly useful if you use an [environment manager](https://docs.esbon.io/en/latest/lsp/howto/use-esbonio-with.html)
5 changes: 1 addition & 4 deletions code/guides/bring-your-own-sphinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ While the `esbonio` language server is bundled as part of the extension, it does

This is because every Sphinx project is unique with its own set of dependencies and required extensions. In order to correctly understand your project `esbonio` needs to use the same Python environment that you use to build your documentation.

The Esbonio extension supports two mechanisms for selecting your Python environment.

1. If the official Python extension is available, by default Esbonio will attempt to use the same environment you have configured for your workspace.
2. Alternatively, you can use the `esbonio.sphinx.pythonCommand` setting to override this behavior.
You can tell Esbonio which environment to use by setting the `esbonio.sphinx.pythonCommand` option. See [this guide](https://docs.esbon.io/en/latest/lsp/howto/use-esbonio-with.html) for some examples
2 changes: 1 addition & 1 deletion code/hatch.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[envs.deps]
python = "3.8"
python = "3.9"
dependencies = ["pip-tools"]
skip-install = true

Expand Down
Loading