Skip to content

Commit

Permalink
Merge pull request #917 from swyddfa/develop
Browse files Browse the repository at this point in the history
New Release
  • Loading branch information
alcarney authored Oct 20, 2024
2 parents 44daa57 + 7d98957 commit d3aae44
Show file tree
Hide file tree
Showing 52 changed files with 1,978 additions and 1,082 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lsp-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
test:
name: "Python v${{ matrix.python-version }} -- ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ ci:
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.6.9
hooks:
- id: ruff
name: ruff (esbonio)
Expand Down
62 changes: 6 additions & 56 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
{
"version": "0.2.0",
"inputs": [
{
"id": "workspace",
"type": "pickString",
"description": "Pick the workspace root for this session",
"default": "code/",
"options": [
{
"label": "code",
"value": "code"
},
{
"label": "docs",
"value": "docs"
},
{
"label": "demo",
"value": "lib/esbonio/tests/workspaces/demo"
},
]
}
],
"inputs": [],
"configurations": [
{
"name": "VSCode Extension",
Expand All @@ -38,39 +17,9 @@
],
"preLaunchTask": "${defaultBuildTask}",
},
{
"name": "VSCode Web Extension",
"type": "extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/code",
"--extensionDevelopmentKind=web",
"--folder-uri=${workspaceRoot}/${input:workspace}"
],
"outFiles": [
"${workspaceRoot}/code/dist/browser/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
},
{
"name": "Docs",
"type": "python",
"request": "launch",
"module": "sphinx.cmd.build",
"args": [
"-M",
"html",
".",
"_build",
"-Ea"
],
"python": "${command:python.interpreterPath}",
"cwd": "${workspaceFolder}/docs"
},
{
"name": "pytest: esbonio",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"justMyCode": false,
Expand All @@ -84,19 +33,20 @@
},
{
"name": "Python: Attach",
"type": "python",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/lib/esbonio",
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
],
"justMyCode": false
"justMyCode": false,
"subProcess": true,
},
],
}
3 changes: 2 additions & 1 deletion code/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bundled/libs
bundled
node_modules
*.vsix
8 changes: 6 additions & 2 deletions code/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.bumpversion.cfg
.gitignore
.tox
.pytest_cache
**/__pycache__/**
**/.pyc
**/requirements.in
**/requirements.txt
**/requirements-*.in
**/requirements-*.txt
changes
CHANGES.rst
dist/**/*.map
dist/test
esbuild.mjs
hatch.toml
Makefile
node_modules
pyproject.toml
src/**
Expand Down
23 changes: 17 additions & 6 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ release: $(TOWNCRIER) $(HATCH) $(PY)
$(PY) ../scripts/make_release.py vscode

# Ensures the version of esbonio in ../lib/esbonio is used.
dev-deps: node_modules/.installed bundled/libs/.installed
dev-deps: node_modules/.installed bundled/libs/.installed bundled/env/.installed
-test -d bundled/libs/esbonio-*.dist-info && rm -r bundled/libs/esbonio-*.dist-info
-test -L bundled/libs/esbonio || rm -r bundled/libs/esbonio
if [ ! -f bundled/libs/esbonio/__main__.py ]; then \
Expand All @@ -34,17 +34,28 @@ dev-deps: node_modules/.installed bundled/libs/.installed
fi

# Ensures the latest version of esbonio from PyPi is used.
release-deps: node_modules/.installed bundled/libs/.installed
release-deps: node_modules/.installed bundled/libs/.installed bundled/env/.installed
-test -L bundled/libs/esbonio && rm bundled/libs/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
# Hatch is only required to exist, don't rebuild this target if it happens to be newer!
# https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
requirements-libs.txt: requirements-libs.in | $(HATCH)
$(HATCH) run deps:update-libs

bundled/libs/.installed: $(PY39) requirements.txt
requirements-env.txt: requirements-env.in | $(HATCH)
$(HATCH) run deps:update-env

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

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

node_modules/.installed: package.json package-lock.json $(NPM)
Expand Down
1 change: 1 addition & 0 deletions code/changes/875.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure scrolling is still synchronised, even after scrolling the preview window
1 change: 1 addition & 0 deletions code/changes/896.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The preview window should now work when using Codespaces
1 change: 1 addition & 0 deletions code/changes/915.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The VSCode extension now provides a fallback environment in the event the user has not configured `esbonio.sphinx.pythonCommand`. The environment only includes Sphinx itself and the MyST parser but it should be enough to provide basic support
1 change: 1 addition & 0 deletions code/changes/917.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update bundled version of the language server to `1.0.0b8`
8 changes: 6 additions & 2 deletions code/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ dependencies = ["pip-tools"]
skip-install = true

[envs.deps.scripts]
update = [
update-env = [
"python --version",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements.in",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements-env.in --output-file requirements-env.txt",
]
update-libs = [
"python --version",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements-libs.in --output-file requirements-libs.txt",
]
Loading

0 comments on commit d3aae44

Please sign in to comment.