Skip to content

Commit 9e4b36c

Browse files
authored
chore: small fixes for makefile, license, ci and contributing (#53)
1 parent 3341d15 commit 9e4b36c

File tree

4 files changed

+35
-36
lines changed

4 files changed

+35
-36
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
default_language_version:
2-
python: "3.11"
2+
python: "3.12"
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-ast
88
- id: check-case-conflict
@@ -13,13 +13,13 @@ repos:
1313
- id: mixed-line-ending
1414
- id: trailing-whitespace
1515
- repo: https://github.com/charliermarsh/ruff-pre-commit
16-
rev: "v0.0.292"
16+
rev: "v0.8.1"
1717
hooks:
1818
- id: ruff
1919
args: ["--fix"]
2020
- id: ruff-format
2121
- repo: https://github.com/codespell-project/codespell
22-
rev: v2.2.6
22+
rev: v2.3.0
2323
hooks:
2424
- id: codespell
2525
exclude: "page/_templates/code.html"

CONTRIBUTING.md renamed to CONTRIBUTING.md

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,25 @@ the [Litestar Discord server](https://discord.gg/litestar). We're happy to help!
66

77
## Setting up the environment
88

9-
1. Install `PDM <https://pdm.fming.dev/latest/>`_
10-
2. Run ``pdm install`` to create a `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_ and install
11-
the dependencies
12-
3. Install [Node.js](https://nodejs.org/en) - `https://nodejs.org/en`.
13-
4. Install [Pre-commit](https://pre-commit.com/) - Run `pre-commit install` to install pre-commit hooks.
14-
5. Run `make install` to install Python and Node dependencies.
15-
6. Activate the virtual environment. `Read more here <https://pdm.fming.dev/latest/usage/venv/#activate-a-virtualenv>`_.
9+
1. Install [UV](https://docs.astral.sh/uv/getting-started/installation/).
10+
2. Run `uv sync` to create a [virtual environment](https://docs.python.org/3/tutorial/venv.html) and install the dependencies.
11+
3. Activate the virtual environment. [Read more](https://docs.astral.sh/uv/pip/environments/#using-a-virtual-environment).
12+
4. Install [Node.js](https://nodejs.org/en).
13+
5. Run `pre-commit install` to install pre-commit hooks.
14+
6. Run `make install` to install Python and Node dependencies.
1615
7. Run `make serve` to start the development server.
1716

1817
## Tips
1918

20-
Many modern IDEs like PyCharm or VS Code will enable the pdm-managed virtualenv that is created in step 2 for you
19+
Many modern IDEs like PyCharm or VS Code will enable the uv-managed virtualenv that is created in step 2 for you
2120
automatically.
21+
2222
If your IDE / editor doesn't offer this functionality, then you will need to manually activate the virtualenv yourself.
2323
Otherwise, you may encounter errors or unexpected behaviour when trying to run the commands referenced within this
2424
document.
2525

26-
The easiest way to activate this virtualenv manually as described at
27-
`Working with virtual environments <https://pdm.fming.dev/latest/usage/venv/#activate-a-virtualenv>` in
28-
PDM's documentation.
29-
3026
The rest of this document will assume this environment is active wherever commands are referenced.
3127

32-
## Code contributions
33-
3428
## Workflow
3529

3630
1. Fork [this repository](https://github.com/litestar-org/litestar.dev/fork) on GitHub.
@@ -44,15 +38,15 @@ The rest of this document will assume this environment is active wherever comman
4438
7. Push the changes to your fork on GitHub.
4539
8. [Open a pull request](https://github.com/litestar-org/litestar.dev/compare)
4640

47-
In the title of the pull request, describe the changes you made and include the issue number if applicable. You may
48-
use [Conventional Commits](https://www.conventionalcommits.org/) to structure your commit messages.
41+
In the title of the pull request, describe the changes you made and include the issue number if applicable. You may
42+
use [Conventional Commits](https://www.conventionalcommits.org/) to structure your commit messages.
4943

50-
For example:
44+
For example:
5145

52-
- feat: allow provided a config object to extend other configs.
53-
- fix: handle strings in config extending.
54-
- docs: correct spelling of CHANGELOG.
55-
- style: convert tabs to spaces.
46+
- feat: allow provided a config object to extend other configs.
47+
- fix: handle strings in config extending.
48+
- docs: correct spelling of CHANGELOG.
49+
- style: convert tabs to spaces.
5650

5751
9. Wait for the CI to run and for a maintainer to review your changes. If any changes are requested, make them and
5852
commit them to the same branch. The CI will automatically run again, and the maintainer will review your changes
@@ -64,11 +58,11 @@ The rest of this document will assume this environment is active wherever comman
6458

6559
## Guidelines for writing documentation
6660

67-
- All files should be written in [ReST](https://docutils.sourceforge.io/rst.html),
68-
[Sphinx](https://www.sphinx-doc.org/en/master/), If you're unfamiliar with any of
69-
those, [ReStructuredText primer](https://www.sphinx-doc.org/en/master/lib/usage/restructuredtext/basics.html),
70-
and [Sphinx quickstart](https://www.sphinx-doc.org/en/master/lib/usage/quickstart.html) are recommended reads.
71-
- For CSS styling, we use [tailwindcss](https://tailwindcss.com/).
72-
- To run the documentation locally, run the command `make serve`.
73-
- To build the documentation, run the command `make page`.
74-
- To build the documentation and serve it locally, run the command `make serve`.
61+
- All files should be written in [ReST](https://docutils.sourceforge.io/rst.html),
62+
[Sphinx](https://www.sphinx-doc.org/en/master/), If you're unfamiliar with any of
63+
those, [ReStructuredText primer](https://www.sphinx-doc.org/en/master/lib/usage/restructuredtext/basics.html),
64+
and [Sphinx quickstart](https://www.sphinx-doc.org/en/master/lib/usage/quickstart.html) are recommended reads.
65+
- For CSS styling, we use [tailwindcss](https://tailwindcss.com/).
66+
- To run the documentation locally, run the command `make serve`.
67+
- To build the documentation, run the command `make page`.
68+
- To build the documentation and serve it locally, run the command `make serve`.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Starlite
3+
Copyright (c) 2021, 2022, 2023, 2024, 2025 Litestar Org.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
.PHONY: page
22

33
install:
4-
pre-commit install
5-
pdm install
4+
uv sync
65
npm install
6+
pre-commit install
77

88
lint:
99
uv run pre-commit run --all-files
1010

11+
ifeq ($(OS),Windows_NT)
12+
clean:
13+
if exist page\_build rmdir /s /q page\_build
14+
else
1115
clean:
1216
rm -rf page/_build
17+
endif
1318

1419
build-assets:
1520
npx tailwindcss -i page/index.css -o page/_static/index.css

0 commit comments

Comments
 (0)