Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Apr 28, 2024
1 parent f006c48 commit 9e44541
Show file tree
Hide file tree
Showing 62 changed files with 1,226 additions and 2,067 deletions.
44 changes: 44 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react-refresh", "react", "@typescript-eslint", "react-hooks"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"react/jsx-filename-extension": ["warn", { extensions: [".tsx"] }],
"import/extensions": ["error", "ignorePackages", { ts: "never", tsx: "never" }],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
"@typescript-eslint/no-explicit-any": "off",
"max-len": ["warn", { code: 120, ignoreComments: true, ignoreUrls: true }],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/prefer-default-export": "off",
"react/prop-types": "off",
"prettier/prettier": ["error", { endOfLine: "auto" }],
},
settings: {
"import/resolver": {
typescript: {},
},
},
}
39 changes: 20 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default_language_version:
python: "3.11"
python: "3.12"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -21,59 +21,60 @@ repos:
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/pdm-project/pdm
rev: 2.8.1
rev: 2.15.1
hooks:
- id: pdm-lock-check
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.3.0
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.280"
rev: "v0.4.2"
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
exclude: "tests/openiapi/typescript_converter/test_converter"
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
args: [--config=./pyproject.toml]
- repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0"
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: "_templates"
exclude: ".git"
- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1
hooks:
- id: curlylint
args: ["--format", "stylish"]
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
rev: v0.10.0
hooks:
- id: shellcheck
- repo: https://github.com/lovesegfault/beautysh.git
rev: v6.2.1
hooks:
- id: beautysh
- repo: https://github.com/python-formate/flake8-dunder-all
rev: v0.3.0
rev: v0.4.1
hooks:
- id: ensure-dunder-all
exclude: "test*|examples*|tools"
args: ["--use-tuple"]
- repo: https://github.com/ariebovenberg/slotscheck
rev: v0.16.5
rev: v0.19.0
hooks:
- id: slotscheck
exclude: "test_*|docs"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.4.1"
rev: "v1.10.0"
hooks:
- id: mypy
exclude: "tools|docs"
Expand All @@ -91,7 +92,7 @@ repos:
structlog,
pytest,
pytest-docker,
litestar,
"litestar[prometheus,standard,structlog]",
types-click,
types-passlib,
types-click,
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.min.*
.git/COMMIT_EDITMSG
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"insertPragma": false,
"printWidth": 120,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": false,
"trailingComma": "all",
"useTabs": false,
"bracketSameLine": true
}
3 changes: 1 addition & 2 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
3.11
3.12.0b2
3.12
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Jacob Coffee.
Copyright (c) 2023, 2024 Jacob Coffee.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ upgrade: ## Upgrade all dependencies to the latest stable versions
@if [ "$(USING_PDM)" ]; then $(PDM) update; fi
@echo "Dependencies Updated"

.PHONY: refresh-lockfiles
refresh-lockfiles: ## Sync lockfiles with requirements files.
$(PDM) update --update-reuse -G:all

.PHONY: lock
lock: ## Rebuild lockfiles from scratch, updating all dependencies
$(PDM) update --update-eager -G:all

# =============================================================================
# Developer Utils
# =============================================================================
Expand Down Expand Up @@ -132,8 +140,8 @@ develop: install ## Install the project in dev mode.
if [ "$(VENV_EXISTS)" && ! -f .env ]; then cp .env.example .env; fi
@echo "=> Install complete! Note: If you want to re-install re-run 'make develop'"

run-dev-server: ## Run the app in dev mode
$(PDM_RUN_BIN) app run server --http-workers 1 --reload
serve: ## Run the app in dev mode
$(PDM_RUN_BIN) app run-all --http-workers 1 --reload

run-dev-frontend: ## Run the app frontend in dev mode
$(PDM_RUN_BIN) tailwindcss -i app/domain/web/resources/input.css -o app/domain/web/resources/style.css --watch
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ Using the API

From around the web:

Browse to https://niapi.app/ and use the front page form, API, or `curl`
to interact with the API.
Browse to https://niapi.app/ and use the front page form, API, or `curl` to interact with the API.

## Contributing

Expand Down Expand Up @@ -124,6 +123,4 @@ tailwindcss -i niapi/domain/web/resources/input.css -o niapi/domain/web/resource

[//]: # "TODO"

![home.png](docs/images/index.png)
![home-dark.png](docs/images/index-dark.png)
![img.png](docs/images/output.png)
![home.png](docs/images/index.png) ![home-dark.png](docs/images/index-dark.png) ![img.png](docs/images/output.png)
157 changes: 0 additions & 157 deletions docs/changelog.md

This file was deleted.

Loading

0 comments on commit 9e44541

Please sign in to comment.