Skip to content

Commit

Permalink
chore: Code cleanup (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
InCogNiTo124 authored Jul 1, 2023
1 parent 152a954 commit 0942c74
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,22 @@ array([[0. , 1. ],
```

### CLI
This library also comes with a handy CLI:
This library can also come with a handy CLI if you install it with the `cli` extra:
```shell
$ cat data.txt | knarrow
stdin 11
$ cat data.txt | knarrow -o value
stdin 59874.14171519781845532648
$ pip install "knarrow[cli]"
$ cat data.txt | knarrow -

This comment has been minimized.

Copy link
@branc116

branc116 Jul 2, 2023

I <3 this :)

This comment has been minimized.

Copy link
@InCogNiTo124

InCogNiTo124 Jul 2, 2023

Author Owner

I am glad you love it <3

<stdin> 11
$ cat data.txt | knarrow -o value -
<stdin> 59874.14171519781845532648
$ knarrow --sort -d ',' -o value shuf_delim.txt
shuf_delim.txt 20
```
_(the `-` for stdin is, unfortunately, mandatory)_
Try writing `knarrow --help` for more info.

## Similar projects

While I've come up with most of these methods by myself, I am not the only one. Here is a (non-comprehensive) list of projects I've found that implement a similar funcionality and may have been an inspiration for me:
While I've come up with most of these methods by myself, I am not the only one. Here is a (non-comprehensive) list of projects I've found that implement a similar functionality and may have been an inspiration for me:
- [mariolpantunes/knee](https://github.com/mariolpantunes/knee)

Note: this project was bootstrapped by [python-blueprint](https://github.com/johnthagen/python-blueprint)
Note: this project was bootstrapped by [python-blueprint](https://github.com/johnthagen/python-blueprint). Since then, it has been heavily modified, though.
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "knarrow"
description = 'Shoot a knarrow to the knee'
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = "Apache-2.0"
keywords = [ "optimization", "knee", "elbow", "kneedle" ]
authors = [
Expand All @@ -21,7 +21,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -83,7 +82,7 @@ packages = ["src/knarrow"]
include = ["src/knarrow/*"]

[[tool.hatch.envs.test.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11"] # matches entries in workflow
python = ["3.8", "3.9", "3.10", "3.11"] # matches entries in workflow

### TODO perhaps optimize the tool configurations
[tool.mypy]
Expand All @@ -98,7 +97,7 @@ exclude = "venv"
[tool.black]
# Use the more relaxed max line length permitted in PEP8.
line-length = 120
target-version = ["py36", "py37", "py38", "py39"]
target-version = ["py38", "py39", "py310", "py311"]
# black will automatically exclude all files listed in .gitignore
# If you need to exclude additional folders, consider using extend-exclude to avoid disabling the
# default .gitignore behaviour.
Expand Down
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

0 comments on commit 0942c74

Please sign in to comment.