-
Notifications
You must be signed in to change notification settings - Fork 2
fix: cli #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cli #78
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,37 @@ | ||
[project] | ||
[tool.poetry] | ||
name = "pysatl-experiment" | ||
version = "0.1.0" | ||
description = "package for PySATL math statistics experiments" | ||
authors = [ | ||
{name = "Ivan Pokhabov", email = "vanek3372@gmail.com"}, | ||
] | ||
license = {text = "MIT"} | ||
authors = ["Ivan Pokhabov <vanek3372@gmail.com>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
requires-python = ">=3.10,<3.13" | ||
dependencies = [ | ||
"numpy>=1.25.1", | ||
"scipy>=1.11.2", | ||
"matplotlib>=3.8.0", | ||
"tqdm>=4.66.2", | ||
"fpdf2>=2.7.8", | ||
"jinja2>=3.1.5", | ||
"xhtml2pdf>=0.2.17", | ||
"pandas>=2.2.1", | ||
"sqlalchemy>=2.0.36", | ||
"python-rapidjson==1.20", | ||
"jsonschema==4.23.0", | ||
"rich==13.9.4", | ||
"click>=8.2.1", | ||
"dacite==1.9.2", | ||
"pysatl-criterion @ ./pysatl_criterion" | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
package-mode = true | ||
packages = [{include = "pysatl_experiment"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.10,<3.13" | ||
numpy = ">=1.25.1" | ||
scipy = ">=1.11.2" | ||
matplotlib = ">=3.8.0" | ||
tqdm = ">=4.66.2" | ||
fpdf2 = ">=2.7.8" | ||
jinja2 = ">=3.1.5" | ||
xhtml2pdf = ">=0.2.17" | ||
pandas = ">=2.2.1" | ||
sqlalchemy = ">=2.0.36" | ||
python-rapidjson = "==1.20" | ||
jsonschema = "==4.23.0" | ||
rich = "==13.9.4" | ||
click = ">=8.2.1" | ||
dacite = "==1.9.2" | ||
pysatl-criterion = {path = "./pysatl_criterion"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Там точно @ не нужна? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Не нужна There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Верю :) |
||
|
||
[tool.poetry.group.dev.dependencies] | ||
markdown = "3.8" | ||
mkdocs = "1.6.1" | ||
mkdocs-material = "9.6.14" | ||
mdx-truly-sane-lists = "1.3" | ||
pymdown-extensions = "10.15" | ||
jinja2 = "3.1.6" | ||
mike = "2.1.3" | ||
isort = "6.0.1" | ||
coveralls = "4.0.1" | ||
|
@@ -52,6 +43,13 @@ pytest-mock = "3.14.1" | |
pre-commit = "4.2.0" | ||
mypy = "^1.15.0" | ||
|
||
[tool.poetry.scripts] | ||
experiment = "pysatl_experiment.cli.cli.cli:cli" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.isort] | ||
line_length = 120 | ||
profile = "black" | ||
|
@@ -70,25 +68,16 @@ extend-ignore = [ | |
"E241", "E272", "E221", "B007", "B904", "S603", "S607", "S608", "NPY002" | ||
] | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
[tool.ruff.lint.per-file-ignores] | ||
"tests/**/*.py" = [ | ||
"S101", "S104", "S311", "S105", "S106", "S110" | ||
] | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 12 | ||
|
||
[tool.ruff.lint.isort] | ||
lines-after-imports = 2 | ||
|
||
[tool.flake8] | ||
ignore = ["E121", "E123", "E126", "E24", "E203", "E704", "W503", "W504"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А это почему исчезло? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. flake8 линтер и ruff линтер, делают одно и тоже. В PySATL'e используют ruff There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Я про сами коды варнингов (например, https://www.flake8rules.com/rules/E121.html). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Так даже не было же в зависимостях flake8, это мертвый код изначально? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Хотя он есть в pre-commit'e, но я не очень понимаю как это должно работать There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ладно, пока так оставим. |
||
max-line-length = 120 | ||
max-complexity = 12 | ||
exclude = [".git", "__pycache__", ".eggs", "user_data", ".venv", ".env"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"tests/**/*.py" = [ | ||
"S101", "S104", "S311", "S105", "S106", "S110" | ||
] | ||
|
||
[tool.poetry.scripts] | ||
experiment = "pysatl_experiment.cli.cli.cli:cli" | ||
[tool.mypy] | ||
ignore_missing_imports = true |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from pysatl_experiment.cli.cli.cli import cli | ||
|
||
|
||
if __name__ == "__main__": | ||
cli() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from pathlib import Path | ||
|
||
from click import group, version_option | ||
|
||
|
||
@group() | ||
@version_option() | ||
def cli() -> None: | ||
""" | ||
PySATL-Experiment CLI. | ||
""" | ||
|
||
_create_experiments_dir() | ||
|
||
|
||
def _create_experiments_dir() -> None: | ||
""" | ||
Create experiments directory. | ||
""" | ||
# pysatl-experiment/.experiments | ||
folder_path = Path(__file__).resolve().parents[2] / ".experiments" | ||
folder_path.mkdir(parents=False, exist_ok=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Оставлю здесь заметку на потом.