Skip to content

Commit

Permalink
chore: begin process to publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Rizhiy committed Mar 2, 2024
1 parent 2c90f37 commit 7d8172f
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MD013": {
"line_length": 120,
"tables": false
}
}
3 changes: 3 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[formatting]
array_auto_expand = false
reorder_arrays = true
4 changes: 4 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
rules:
line-length:
max: 120
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
[![coverage report](https://gitlab.com/neurotrade1/utils/nt-utils/badges/master/coverage.svg)](https://gitlab.com/neurotrade1/utils/nt-utils/-/commits/master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)


## Installation

Released version: `pip install nt-utils`


## Development

Editable installation:
Expand All @@ -19,12 +17,12 @@ cd nt-utils && \
pip install -e '.[dev,tests]'
```


### Formatting

This repository follows strict formatting style which will be checked by the CI.

To properly format the code, use the `nt-dev` package:

```bash
pip install nt-dev
nt-format
Expand All @@ -35,4 +33,4 @@ nt-format
Before pushing a commit, you can run `nt-test --format` which will try to
format the files and run tests.

This project is *preferentially* `mypy --strict` typed, without enforcement in CI.
This project is _preferentially_ `mypy --strict` typed, without enforcement in CI.
81 changes: 43 additions & 38 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,59 @@ requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "nt-utils"
authors = [{name = "Anton Vasilev", email = "[email protected]"}]
name = "replete"
maintainers = [{ name = "Artem Vasenin", email = "[email protected]" }]
authors = [{ name = "Anton Vasilev" }, { name = "Artem Vasenin" }]
readme = "README.md"
requires-python = ">=3.8"
dynamic = ["version", "description"]
dependencies = [
"python-dateutil",
"docstring-parser",
"xxhash",
"coloredlogs",
]
requires-python = ">=3.9"
dynamic = ["description", "version"]
dependencies = ["coloredlogs", "docstring-parser", "python-dateutil", "xxhash"]

[project.optional-dependencies]
test = [
"nt-dev>=0.34",
"pytest-asyncio",
"types-xxhash",
"types-python-dateutil",
"flaky",
]
dev = [
"nt-utils[test]",
]

[tool.flit.module]
name = "nt_utils"
test = ["flaky", "pytest", "pytest-asyncio", "types-python-dateutil", "types-xxhash"]
dev = ["black", "replete[test]", "ruff"]

[tool.flit.sdist]
include = [
"README.md",
]
exclude = [
".gitignore",
"tests/*",
]
include = ["README.md"]
exclude = [".github", ".gitignore", "tests/*"]

[tool.semantic_release]
version_variable = "nt_utils/__init__.py:__version__"
version_variable = "replete/__init__.py:__version__"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--doctest-modules --no-success-flaky-report"
asyncio_mode = "auto"

[tool.mypy]
files = ["."]

[tool.flake8]
per-file-ignores = [
"__init__.py:F401,F403,F405",
"tests/test_cli.py:W291",
[tool.black]
line-length = 120
skip-magic-trailing-comma = true

[tool.yamlfix]
line_length = 120
section_whitelines = 1

[tool.pyright]
strictParameterNoneValue = false
typeCheckingMode = "basic"

[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
preview = true
select = ["A", "ARG", "B", "BLE", "C4", "COM", "E", "ERA", "F", "FBT", "FIX", "FLY", "FURB", "I", "IC", "INP", "ISC", "LOG", "N", "NPY", "PERF", "PIE", "PT", "PTH", "Q", "R", "RET", "RSE", "S", "SIM", "SLF", "T20", "TCH", "TD", "TID", "TRY", "UP", "W"]
fixable = ["ALL"]
ignore = ["A003", "E203", "FIX002", "FURB113", "N817", "PTH123", "RET503", "S113", "TD002", "TD003", "TRY003", "UP007", "UP035"]
[tool.ruff.per-file-ignores]
"**/__init__.py" = [
"F401", # Allow unused imports in module files
]
"tests/**/*.py" = [
"E501", # Test strings can be long
"S101", # Asserts in tests are fine
"T201", # Prints are useful for debugging
"TCH001",
"TCH002",
"TCH003", # Tests don't need to be super performant, prefer simpler code
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion nt_utils/utils.py → replete/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from concurrent import futures
from typing import TYPE_CHECKING, Any, Callable, Hashable, Iterable, Iterator, Mapping, Sequence, TypeVar, cast

from nt_utils.abc import Comparable
from replete.abc import Comparable

LOGGER = logging.getLogger(__name__)

Expand Down

0 comments on commit 7d8172f

Please sign in to comment.