Skip to content

Commit ece8272

Browse files
committed
Fix
1 parent d5aae6b commit ece8272

File tree

8 files changed

+101
-89
lines changed

8 files changed

+101
-89
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trim_trailing_whitespace = true
1414
insert_final_newline = true
1515

1616
[*.md]
17-
indent_size = 3
17+
indent_size = 4
1818

1919
[*.nix]
2020
indent_size = 2

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
*
22

33
!.github/
4-
!.github/**
4+
!.github/**/
55
!assets/
6-
!assets/**
6+
!assets/**/
77
!.editorconfig
88
!.envrc
99
!.gitattributes
@@ -17,13 +17,13 @@
1717
!README.md
1818

1919
!scripts/
20-
!scripts/**
20+
!scripts/**/
2121
!shared/
22-
!shared/**
22+
!shared/**/
2323
!src/
24-
!src/**
24+
!src/**/
2525
!tests/
26-
!tests/**
26+
!tests/**/
2727

2828
!*.md
2929
!*.mdc

.justfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ build target:
3939
@uv run hatch build --target {{target}}
4040

4141
# Run a package
42-
run *args='core':
42+
run package="core" *args="":
4343
@echo "Running..."
44-
@uv run {{args}}
44+
@uv run {{package}} {{args}}
4545

4646
# Test the project
4747
test:
@@ -53,8 +53,6 @@ check:
5353
@echo "Checking..."
5454
@uv lock --locked
5555
@uv run pre-commit run -a
56-
@uv run mypy .
57-
@uv run deptry . --ignore=DEP002,DEP003
5856

5957
# Remove build artifacts and non-essential files
6058
clean:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ repos:
5151
]
5252

5353
- repo: https://github.com/asottile/pyupgrade
54-
rev: "v3.21.0"
54+
rev: "v3.21.2"
5555
hooks:
5656
- id: pyupgrade
5757
args: ["--py310-plus", "--keep-runtime-typing"]
5858

5959
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: "v0.14.1"
60+
rev: "v0.14.6"
6161
hooks:
6262
# Formatter first so code is canonicalized
6363
- id: ruff-format

README.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
*** This readme was adapted from Best-README-Template.
3+
https://github.com/othneildrew/Best-README-Template
4+
-->
5+
16
<!-- PROJECT SHIELDS -->
27
<!--
38
*** I'm using markdown "reference style" links for readability.
@@ -15,11 +20,11 @@
1520
</div>
1621

1722
<a href="https://github.com/Kaweees/modern_python">
18-
<img alt="Python Logo" src="assets/img/python.png" align="right" width="150">
23+
<img alt="Python Logo" src="assets/img/python.png" align="right" width="150">
1924
</a>
2025

2126
<div align="left">
22-
<h1><em><a href="https://miguelvf.dev/blog/dotfiles/compendium">~modern_python</a></em></h1>
27+
<h1><em><a href="https://github.com/Kaweees/modern_python">~modern_python</a></em></h1>
2328
</div>
2429

2530
<!-- ABOUT THE PROJECT -->
@@ -34,26 +39,40 @@ A template for developing production-ready Python applications.
3439
[![Codecov][Codecov-shield]][Codecov-url]
3540
[![GitHub Actions][github-actions-shield]][github-actions-url]
3641

37-
<!-- GETTING STARTED -->
42+
<!-- PROJECT PREVIEW -->
43+
## Preview
3844

45+
<p align="center">
46+
<img src="assets/img/demo.mp4" width = "80%" alt = "Video demonstration"/>
47+
</p>
48+
49+
<!-- GETTING STARTED -->
3950
## Getting Started
4051

4152
### Prerequisites
4253

43-
Before attempting to build this project, make sure you have [Nix](https://nixos.org/download.html) with [Flake](https://nixos.wiki/wiki/Flakes) support installed on your machine.
54+
Before attempting to build this project, make sure you have [direnv](https://direnv.net/) and [Nix](https://nixos.org/download.html) with [Flake](https://nixos.wiki/wiki/Flakes) support installed on your machine.
4455

4556
### Installation
4657

4758
To get a local copy of the project up and running on your machine, follow these simple steps:
4859

4960
1. Clone the project repository
5061

62+
```sh
63+
git clone https://github.com/Kaweees/modern_python.git
64+
cd modern_python
65+
```
66+
67+
2. Install the project dependencies
68+
69+
If you have `direnv` installed, simply allow the environment:
70+
5171
```sh
52-
git clone https://github.com/Kaweees/modern_python.git
53-
cd modern_python
72+
direnv allow
5473
```
5574

56-
2. Install the project dependencies
75+
Otherwise, you can use `nix-shell` to enter the environment:
5776

5877
```sh
5978
nix-shell --max-jobs $(nproc) # Linux / Windows (WSL)
@@ -62,12 +81,11 @@ To get a local copy of the project up and running on your machine, follow these
6281

6382
3. Run the project
6483

65-
```sh
66-
just run <package_name>
67-
```
84+
```sh
85+
just run <package_name>
86+
```
6887

6988
<!-- PROJECT FILE STRUCTURE -->
70-
7189
## Project Structure
7290

7391
```sh
@@ -86,7 +104,7 @@ modern_python/
86104

87105
## License
88106

89-
The source code for [Kaweees/modern_python](https://github.com/Kaweees/modern_python) is distributed under the terms of the MIT License, as I firmly believe that collaborating on free and open-source software fosters innovations that mutually and equitably beneficial to both collaborators and users alike. See [`LICENSE`](./LICENSE) for details and more information.
107+
The source code for [Kaweees/modern_python](https://github.com/Kaweees/modern_python) is distributed under the terms of the GNU General Public License v3.0, as I firmly believe that collaborating on free and open-source software fosters innovations that mutually and equitably beneficial to both collaborators and users alike. See [`LICENSE`](./LICENSE) for details and more information.
90108

91109
<!-- MARKDOWN LINKS & IMAGES -->
92110
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

ruff.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ extend-select = [
1717
# Ruff-specific rules
1818
"RUF",
1919
]
20+
select = ["E", "F", "I"]
21+
2022
ignore = [
2123
"E402", # Module level import not at top of file
2224
"E501", # Line too long
@@ -28,15 +30,10 @@ ignore = [
2830
"SIM117", # Merge with statements for context managers that have same scope
2931
"SIM118", # Checks for key-existence checks against dict.keys() calls
3032
]
31-
select = ["E", "F", "I"]
32-
33-
[lint.per-file-ignores]
34-
"*/__init__.py" = ["F401"] # Unused import
3533

3634
[lint.isort]
3735
known-first-party = ["modern_python", "core"]
3836

39-
4037
[lint.pydocstyle]
4138
convention = "google"
4239

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pkgs.mkShell {
1212

1313
# Shell hook to set up environment
1414
shellHook = ''
15+
export TMPDIR=/tmp
1516
just install
1617
'';
1718
}

0 commit comments

Comments
 (0)