Skip to content

Commit

Permalink
Merge pull request #897 from swyddfa/develop
Browse files Browse the repository at this point in the history
New Release
  • Loading branch information
alcarney authored Sep 22, 2024
2 parents 6a2086c + c1fbbd0 commit a34241e
Show file tree
Hide file tree
Showing 125 changed files with 3,000 additions and 1,642 deletions.
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

0 comments on commit a34241e

Please sign in to comment.