Skip to content

Commit

Permalink
py v3.12 support. update pre-commit, dependencies. fix package.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkmngrgn committed Aug 31, 2024
1 parent 337caa3 commit 557250f
Show file tree
Hide file tree
Showing 8 changed files with 252 additions and 231 deletions.
27 changes: 4 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v4.6.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -10,7 +10,7 @@ repos:
- id: check-docstring-first

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.4"
rev: "v1.5.5"
hooks:
- id: forbid-crlf
- id: remove-crlf
Expand All @@ -28,34 +28,15 @@ repos:
- mdformat-gfm
- mdformat-black

- repo: https://github.com/pycqa/pydocstyle
rev: "6.3.0"
hooks:
- id: pydocstyle
language: python
exclude: ^tests/
additional_dependencies: ["tomli"]

- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: "23.12.1"
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.11.2"
hooks:
- id: mypy
args: ["--strict", "--ignore-missing-imports"]
exclude: ^tests/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.9"
rev: "v0.6.3"
hooks:
- id: ruff
args: [--fix]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
**DOSH-CLI** is a command-line interface of [**DOSH-CORE**](https://github.com/gkmngrgn/dosh-core) to run your tasks on any platform, on any shell. Define your tasks, aliases, environments in a `dosh.lua` file and run `dosh`. DOSH will work like a CLI app reading your config file.

<img src="https://raw.githubusercontent.com/gkmngrgn/dosh-core/main/dosh-logo.svg"
width="200"
alt="DOSH logo" />
width="200"
alt="DOSH logo" />

## INSTALLATION

Expand Down
1 change: 1 addition & 0 deletions dosh_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DOSH CLI app."""

import importlib.metadata

try:
Expand Down
1 change: 1 addition & 0 deletions dosh_cli/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DOSH main module."""

import sys
from enum import Enum
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ main() {
chmod +x "$bin_file"

printf "\nSTEP 3: Done! You can delete the temporary directory if you want:"
printf "\n$temp_dir\n"
printf "\n%s\n" "$temp_dir"
}

main
8 changes: 4 additions & 4 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ set -e

export PATH="$HOME/.local/bin:$HOME/bin:$PATH"

if command -v pyenv &> /dev/null
if which pyenv &> /dev/null
then
echo "pyenv found in path."
pyenv global system
fi

PY="$(command -v python3 || command -v python)"
PY="$(which python3 || which python)"

if command -v poetry &> /dev/null
if which poetry &> /dev/null
then
echo "poetry found in path."
else
Expand All @@ -20,7 +20,7 @@ else
$PY -m pipx install poetry
fi

PY="$(poetry run command -v python)"
PY="$(poetry run which python)"
OS_NAME=$($PY -c 'import platform; print(platform.system().lower())')
ARCH_TYPE=$($PY -c 'import platform; print(platform.machine().lower())')
PY_VERSION=$($PY -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
Expand Down
436 changes: 237 additions & 199 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dosh-cli"
version = "0.1.3"
version = "0.1.4"
description = "Command line interface of DOSH, a tool for managing your tasks."
authors = ["Gökmen Görgen <gkmngrgn@gmail.com>"]
readme = "README.md"
Expand All @@ -21,7 +21,7 @@ classifiers = [
dosh = "dosh_cli.cli:run_cli"

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
python = ">=3.9,<3.13"
dosh-core = "^0.3.0"

[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 557250f

Please sign in to comment.