mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-07-07 20:55:02 +00:00
use cog to automatically generate Python and Django versions (#96)
This commit is contained in:
parent
df3f6f31fa
commit
e6bde2d7aa
4 changed files with 92 additions and 4 deletions
|
@ -7,3 +7,45 @@ You should first check if there is a [GitHub issue](https://github.com/joshuadav
|
|||
Not all contributions need to start with an issue, such as typo fixes in documentation or version bumps to Python or Django that require no internal code changes, but generally, it is a good idea to open an issue first.
|
||||
|
||||
We adhere to Django's Code of Conduct in all interactions and expect all contributors to do the same. Please read the [Code of Conduct](https://www.djangoproject.com/conduct/) before contributing.
|
||||
|
||||
### `Justfile`
|
||||
|
||||
The repository includes a [`Justfile`](./Justfile) that provides all common development tasks with a consistent interface. Running `just` without arguments shows all available commands and their descriptions.
|
||||
|
||||
<!-- [[[cog
|
||||
import subprocess
|
||||
import cog
|
||||
|
||||
output_raw = subprocess.run(["just", "--list", "--list-submodules"], stdout=subprocess.PIPE)
|
||||
output_list = output_raw.stdout.decode("utf-8").split("\n")
|
||||
|
||||
cog.outl("""\
|
||||
```bash
|
||||
$ just
|
||||
$ # just --list --list-submodules
|
||||
""")
|
||||
|
||||
for i, line in enumerate(output_list):
|
||||
if not line:
|
||||
continue
|
||||
cog.out(line)
|
||||
if i < len(output_list):
|
||||
cog.out("\n")
|
||||
|
||||
cog.out("```")
|
||||
]]] -->
|
||||
```bash
|
||||
$ just
|
||||
$ # just --list --list-submodules
|
||||
|
||||
Available recipes:
|
||||
bumpver *ARGS
|
||||
clean
|
||||
lint # run pre-commit on all files
|
||||
test *ARGS
|
||||
testall *ARGS
|
||||
docs:
|
||||
build LOCATION="site" # Build documentation
|
||||
serve PORT="8000" # Serve documentation locally
|
||||
```
|
||||
<!-- [[[end]]] -->
|
||||
|
|
4
Justfile
4
Justfile
|
@ -8,6 +8,10 @@ mod docs ".just/docs.just"
|
|||
default:
|
||||
@just --list
|
||||
|
||||
[private]
|
||||
cog:
|
||||
uv run --with cogapp --with nox --no-project cog -r CONTRIBUTING.md README.md pyproject.toml
|
||||
|
||||
[private]
|
||||
nox SESSION *ARGS:
|
||||
uv run noxfile.py --session "{{ SESSION }}" -- "{{ ARGS }}"
|
||||
|
|
28
README.md
28
README.md
|
@ -1,11 +1,20 @@
|
|||
# django-language-server
|
||||
|
||||
<!-- [[[cog
|
||||
import subprocess
|
||||
import cog
|
||||
|
||||
from noxfile import DJ_VERSIONS
|
||||
from noxfile import PY_VERSIONS
|
||||
|
||||
cog.outl("[](https://pypi.org/project/django-language-server/)")
|
||||
cog.outl("")
|
||||
cog.outl(f"}-%2344B78B?labelColor=%23092E20)")
|
||||
]]] -->
|
||||
[](https://pypi.org/project/django-language-server/)
|
||||

|
||||

|
||||
<!-- https://shields.io/badges -->
|
||||
<!-- django-4.2 | 5.0 | 5.1-#44B78B -->
|
||||
<!-- labelColor=%23092E20 -->
|
||||

|
||||
<!-- [[[end]]] -->
|
||||
|
||||
A language server for the Django web framework.
|
||||
|
||||
|
@ -46,8 +55,19 @@ An editor that supports the Language Server Protocol (LSP) is required.
|
|||
|
||||
The Django Language Server aims to supports all actively maintained versions of Python and Django. Currently this includes:
|
||||
|
||||
<!-- [[[cog
|
||||
import subprocess
|
||||
import cog
|
||||
|
||||
from noxfile import DJ_VERSIONS
|
||||
from noxfile import PY_VERSIONS
|
||||
|
||||
cog.outl(f"- Python {', '.join([version for version in PY_VERSIONS])}")
|
||||
cog.outl(f"- Django {', '.join([version for version in DJ_VERSIONS if version != 'main'])}")
|
||||
]]] -->
|
||||
- Python 3.9, 3.10, 3.11, 3.12, 3.13
|
||||
- Django 4.2, 5.0, 5.1
|
||||
<!-- [[[end]]] -->
|
||||
|
||||
See the [Versioning](#versioning) section for details on how this project's version indicates Django compatibility.
|
||||
|
||||
|
|
|
@ -24,20 +24,42 @@ requires-python = ">=3.9"
|
|||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Framework :: Django",
|
||||
# [[[cog
|
||||
# import subprocess
|
||||
# import cog
|
||||
#
|
||||
# from noxfile import DJ_VERSIONS
|
||||
#
|
||||
# for version in DJ_VERSIONS:
|
||||
# if version == "main":
|
||||
# continue
|
||||
# cog.outl(f' "Framework :: Django :: {version}",')
|
||||
# ]]] -->
|
||||
"Framework :: Django :: 4.2",
|
||||
"Framework :: Django :: 5.0",
|
||||
"Framework :: Django :: 5.1",
|
||||
# [[[end]]]
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
# [[[cog
|
||||
# import subprocess
|
||||
# import cog
|
||||
#
|
||||
# from noxfile import PY_VERSIONS
|
||||
#
|
||||
# for version in PY_VERSIONS:
|
||||
# cog.outl(f' "Programming Language :: Python :: {version}",')
|
||||
# ]]] -->
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
# [[[end]]]
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Rust",
|
||||
"Topic :: Software Development",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue