Skip to content

Commit

Permalink
fix(deps): Improve and fix dependencies constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Nov 15, 2023
1 parent 98bd82c commit 09bea2a
Show file tree
Hide file tree
Showing 7 changed files with 1,350 additions and 998 deletions.
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
environment-file: conda/dev.yaml
environment-file: conda/release.yaml
channels: nodefaults,conda-forge
channel-priority: strict
activate-environment: sugar
Expand Down
18 changes: 5 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ repos:

- repo: local
hooks:
- id: blue
name: blue
entry: blue
- id: ruff-format
name: ruff-format
entry: ruff format
exclude: |
(?x)(
docs
Expand All @@ -21,23 +21,15 @@ repos:
types:
- python

- id: ruff
name: ruff
- id: ruff-linter
name: ruff-linter
entry: ruff check
language: system
exclude: "docs/"
pass_filenames: true
types:
- python

- id: isort
name: isort
entry: isort
language: system
pass_filenames: true
types:
- python

- id: mypy
name: mypy
entry: mypy
Expand Down
6 changes: 2 additions & 4 deletions conda/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ channels:
- nodefaults
- conda-forge
dependencies:
- pip
- python 3.8.1
- poetry
- nodejs # used by semantic-release
- urllib3 <2 # conflicts with
- docker-compose
- poetry >=1.7
8 changes: 8 additions & 0 deletions conda/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: sugar
channels:
- nodefaults
- conda-forge
dependencies:
- python >=3.8.1,<3.12 # min version supported
- poetry >=1.7
- nodejs >=18.17 # used by semantic-release
2,233 changes: 1,290 additions & 943 deletions poetry.lock

Large diffs are not rendered by default.

79 changes: 44 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,32 @@ exclude = [

[tool.poetry.scripts]
"containers-sugar" = "containers_sugar.__main__:app"
"kxgr" = "containers_sugar.__main__:app"
"sugar" = "containers_sugar.__main__:app"

[tool.poetry.dependencies]
python = "^3.8.1"
Jinja2 = "<3.1.0"
sh = "^2.0.0"
pyyaml = ">=5"
colorama = "^0.4.6"
urllib3 = "<2"
python-dotenv = "^0.21.1"
python = ">=3.8.1,<3.12"
Jinja2 = ">=2"
sh = ">=2.0.0"
pyyaml = ">=6"
colorama = ">=0.4.6"
python-dotenv = ">=0.21.1"

[tool.poetry.group.dev.dependencies]
pytest = "^7"
blue = "^0.9.1"
isort = "^5"
pre-commit = "^2"
mypy = "^1"
ruff = "^0.0.272"
bandit = "^1.7.5"
vulture = "^2.7"
pydocstyle = "^6.3.0"
pytest-cov = "^3.0.0"
pre-commit = ">=3"
mypy = ">=1.6"
ruff = ">=0.1.5"
bandit = ">=1.7.5"
vulture = ">=2.7"
pytest = ">=7"
pytest-cov = ">=3.0.0"
mkdocs = ">=1.2.3,<2"
mkdocs-exclude = ">=1.0.2,<2"
mkdocs-jupyter = ">=0.20.0,<1"
mkdocs-literate-nav = ">=0.4.1,<1"
mkdocs-macros-plugin = ">=0.6.3,<1"
mkdocs-material = ">=8.2.1,<9"
mkdocstrings = ">=0.17.0,<0.18.0"
compose-go = {url = "https://github.com/osl-package-recipes/compose-go/releases/download/v2.20.1/compose_go-2.20.1.tar.gz"}
mkdocs-exclude = ">=1.0.2"
mkdocs-jupyter = ">=0.20.0"
mkdocs-literate-nav = ">=0.4.1"
mkdocs-macros-plugin = ">=0.6.3"
mkdocs-material = ">=8.2.1"
mkdocstrings = ">=0.17.0"
compose-go = ">=1.23.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand All @@ -75,25 +70,39 @@ testpaths = [
"tests",
]

[tool.blue]
line-length = 79 # this is the default

[tool.isort]
ensure_newline_before_comments = true
line_length = 79
multi_line_output = 3
include_trailing_comma = true
skip_glob = ["docs/*", "*.egg-info"]

[tool.mypy]
ignore_missing_imports = true


[tool.ruff]
line-length = 79
force-exclude = true
src = ["./makim", "./tests"]
ignore = ["RUF012"]
exclude = [
"docs",
]
select = [
"E", # pycodestyle
"F", # pyflakes
"D", # pydocstyle
"YTT", # flake8-2020
"PL", # PL
"RUF", # Ruff-specific rules
"I001", # isort
]
# fixable = ["I001"]
fix = true

[tool.ruff.pydocstyle]
convention = "numpy"

[tool.ruff.isort]
# Use a single line between direct and from import
lines-between-types = 1

[tool.ruff.format]
quote-style = "single"

[tool.bandit]
exclude_dirs = ["tests"]
Expand Down

0 comments on commit 09bea2a

Please sign in to comment.