-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve project structure, add pre-commit config, pyproject.toml
- Add pyproject.toml to simplify installing project dependencies - Add pre-commit config to run black, isort and mypy before commits
- Loading branch information
Showing
7 changed files
with
134 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.* | ||
!.gitignore | ||
*~ | ||
.vscode | ||
.\#* | ||
\#*\# | ||
remove.txt | ||
Location/L.txt | ||
Location/location_old | ||
**/__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
# Exclude elisp files to not clear page breaks | ||
exclude: \.el$ | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.0.0 | ||
hooks: | ||
- id: mypy | ||
stages: [push, manual] | ||
pass_filenames: false | ||
args: | ||
- --config-file=pyproject.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "ai-wallpaper" | ||
description = "Create fresh, personal AI painted wallpapers" | ||
readme = "README.md" | ||
license = "GPL-3.0-or-later" | ||
requires-python = ">=3.9" | ||
authors = [ | ||
{ name = "Debanjum Singh Solanky" }, | ||
] | ||
keywords = [ | ||
"AI", | ||
"images", | ||
"khoj", | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Artistic Software", | ||
"Topic :: Adaptive Technologies", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Intended Audience :: Information Technology", | ||
] | ||
dependencies = [ | ||
"rich >= 13.3.1", | ||
"requests >= 2.26.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/debanjum/ai-wallpaper" | ||
|
||
[project.scripts] | ||
aiwall = "aiwall.paper:generate" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pytest >= 7.1.2", | ||
"mypy >= 1.0.1", | ||
"black >= 23.1.0", | ||
"pre-commit >= 3.0.4", | ||
] | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
raw-options.local_scheme = "no-local-version" # PEP440 compliant version for PyPi | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = ["src/aiwall"] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/aiwall"] | ||
|
||
[tool.mypy] | ||
files = "src/aiwall" | ||
pretty = true | ||
strict_optional = false | ||
install_types = true | ||
ignore_missing_imports = true | ||
non_interactive = true | ||
show_error_codes = true | ||
warn_unused_ignores = false | ||
|
||
[tool.black] | ||
line-length = 120 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--strict-markers" |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters