Skip to content

Commit

Permalink
More updates (#187)
Browse files Browse the repository at this point in the history
* more

* do not formal xml

* more

* more

* more
  • Loading branch information
dycw authored Aug 14, 2024
1 parent 8deb0a3 commit 12e239d
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 0.1.184
current_version = 0.1.185
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.6
rev: v0.5.7
hooks:
- id: ruff
args: [--fix]
Expand All @@ -22,6 +22,10 @@ repos:
hooks:
- id: pretty-format-toml
args: [--autofix, --trailing-commas]
- repo: https://github.com/pamoller/xmlformatter
rev: v0.2.6
hooks:
- id: xml-formatter
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
Expand Down
11 changes: 6 additions & 5 deletions install-mac.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
~/.zimrc: zsh/zimrc
~/.zshenv: zsh/zshenv
~/.zshrc: zsh/zshrc
~/Library/LaunchAgents/com.redis-stack.redis-stack-server.plist: redis/com.redis-stack.redis-stack-server.plist

- shell:
- [
Expand Down Expand Up @@ -157,11 +158,7 @@
Installing pyright,
]
- [
"command -v redis-server >/dev/null 2>&1 || brew install redis",
Installing redis,
]
- [
"command -v redis-stack-server >/dev/null 2>&1 || brew tap-redis-stack/redis-stack && brew install redis-stack-server",
"command -v redis-stack-server >/dev/null 2>&1 || brew tap redis-stack/redis-stack && brew install redis-stack",
Installing redis-stack,
]
- [
Expand Down Expand Up @@ -242,3 +239,7 @@
"command -v justpath >/dev/null 2>&1 || pipx install justpath",
Installing justpath,
]
- [
"launchctl load ~/Library/LaunchAgents/com.redis-stack.redis-stack-server.plist",
Launching redis-stack-server,
]
2 changes: 2 additions & 0 deletions ipython/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@
concat,
date_range,
datetime_range,
from_epoch,
int_range,
int_ranges,
lit,
Expand Down Expand Up @@ -915,6 +916,7 @@
concat,
date_range,
datetime_range,
from_epoch,
int_range,
int_ranges,
lit,
Expand Down
11 changes: 4 additions & 7 deletions jupyter/docmanager/plugin.jsonc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"autosave": true,
"autosaveInterval": 60,
"confirmClosingDocument": false,
"defaultViewers": {},
"lastModifiedCheckMargin": 500,
"renameUntitledFileOnSave": true,
"maxNumberRecents": 10,
// Document Manager
// @jupyterlab/docmanager-extension:plugin
// Document Manager settings.
// ***************************************
}
2 changes: 1 addition & 1 deletion jupyter/jupyterlab_code_formatter/settings.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"args": ["--select=I001"],
},
"ruffformat": {
"args": [],
"args": ["--line-length=80"],
},
"suppressFormatterErrors": false,
"suppressFormatterErrorsIFFAutoFormatOnSave": false,
Expand Down
9 changes: 9 additions & 0 deletions nvim/lua/snippets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ ls.add_snippets("python", {
s("hy-invalid-argument", { t({ "from hypothesis.errors import InvalidArgument", "" }) }),
s("hy-lists", { t({ "from hypothesis.strategies import lists", "" }) }),
s("hy-reproduce-failure", { t({ "from hypothesis import reproduce_failure", "" }) }),
s("hy-sampled-from", { t({ "from hypothesis.strategies import sampled_from", "" }) }),
s("hy-settings", { t({ "from hypothesis import settings", "" }) }),
s("settings-max-examples", { t({ "@settings(max_examples=1)", "" }) }),
s("settings-generate-only", { t({ "@settings(phases={Phase.generate})", "" }) }),
Expand All @@ -98,6 +99,10 @@ ls.add_snippets("python", {
-- loguru
s("lo-logger", { t({ "from loguru import logger", "" }) }),

-- math
s("ma-inf", { t({ "from math import inf", "" }) }),
s("ma-nan", { t({ "from math import nan", "" }) }),

-- more-itertools
s("mi-iterate", { t({ "from more_itertools import iterate", "" }) }),
s("mi-partition", { t({ "from more_itertools import partition", "" }) }),
Expand Down Expand Up @@ -126,6 +131,7 @@ ls.add_snippets("python", {
s("po-enum", { t({ "from polars import Enum", "" }) }),
s("po-expr", { t({ "from polars import Expr", "" }) }),
s("po-float64", { t({ "from polars import Float64", "" }) }),
s("po-from-epoch", { t({ "from polars import from_epoch", "" }) }),
s("po-int-range", { t({ "from polars import int_range", "" }) }),
s("po-int-ranges", { t({ "from polars import int_ranges", "" }) }),
s("po-int64", { t({ "from polars import Int64", "" }) }),
Expand Down Expand Up @@ -211,6 +217,9 @@ ls.add_snippets("python", {
-- typing-extensions
s("ty-override", { t({ "from typing_extensions import override", "" }) }),

-- uuid
s("uu-uuid", { t({ "from uuid import UUID", "" }) }),

-- utilities
s("ut-always-iterable", { t({ "from utilities.more_itertools import always_iterable", "" }) }),
s("ut-check-polars-dataframe", { t({ "from utilities.polars import check_polars_dataframe", "" }) }),
Expand Down
16 changes: 16 additions & 0 deletions redis/com.redis-stack.redis-stack-server.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.redis-stack.redis-stack-server</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/Caskroom/redis-stack-server/7.4.0-v0/bin/redis-stack-server</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
18 changes: 9 additions & 9 deletions shell/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ if command -v pyenv >/dev/null 2>&1; then
fi

# redis-stack
if command -v brew >/dev/null 2>&1; then
__dir="$(brew --prefix)"/Caskroom/redis-stack-server/7.4.0-v0/bin
case ":${PATH}:" in
*:"${__dir}":*) ;;
*)
export PATH="${__dir}:${PATH}"
;;
esac
fi
# if command -v brew >/dev/null 2>&1; then
# __dir="$(brew --prefix)"/Caskroom/redis-stack-server/7.4.0-v0/bin
# case ":${PATH}:" in
# *:"${__dir}":*) ;;
# *)
# export PATH="${__dir}:${PATH}"
# ;;
# esac
# fi

# ripgrep
export RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME:-${HOME}/.config}/ripgreprc"
Expand Down

0 comments on commit 12e239d

Please sign in to comment.