Skip to content

Commit

Permalink
bumped the minimum supported python version to 3.12 for better perfor…
Browse files Browse the repository at this point in the history
…mance
  • Loading branch information
CommanderStorm committed Apr 28, 2024
1 parent a6552d0 commit baee4d8
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/data-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -34,7 +34,7 @@ jobs:
#- name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: "3.10"
# python-version: ${{ matrix.python-version }}
# - name: setup uv
# run: curl -LsSf https://astral.sh/uv/install.sh | sh
# - name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- name: setup uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install python dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- name: setup uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install python dependencies
Expand Down
126 changes: 63 additions & 63 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
skips = ["B101"]

[tool.mypy]
python_version = "3.10"
python_version = "3.12"
ignore_missing_imports = true
disallow_incomplete_defs = true
no_implicit_optional = true
Expand Down Expand Up @@ -32,32 +32,32 @@ warn_untyped_fields = true
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 120
indent-width = 4
Expand All @@ -66,46 +66,46 @@ target-version = "py310"
[tool.ruff.lint]
select = ["E", "W", "RUF", "UP", "D"]
ignore = [
#### modules
"EM", # no formatting in exceptions (why is this a rule?)
"C90", # mccabe complexity
"DJ", # django
"TD", # too many todos/fixmes
#### modules
"EM", # no formatting in exceptions (why is this a rule?)
"C90", # mccabe complexity
"DJ", # django
"TD", # too many todos/fixmes

#### rules
"SIM108", # ternary operator should be used without a concearn for the code complexity
"G004", # while if all parameters had
#### rules
"SIM108", # ternary operator should be used without a concearn for the code complexity
"G004", # while if all parameters had

# docstrings
"D100", # Missing docstring in public module => too much work
"D101", # Missing docstring in public class => too much work
"D104", # Missing docstring in public package => too much work
"D107", #docstring in `__init__`
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
"D400", # Gramar police much? (First line should end with a period)
"D415", # Gramar police much? (First line should end with a period, question mark, or exclamation point)
# docstrings
"D100", # Missing docstring in public module => too much work
"D101", # Missing docstring in public class => too much work
"D104", # Missing docstring in public package => too much work
"D107", #docstring in `__init__`
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
"D400", # Gramar police much? (First line should end with a period)
"D415", # Gramar police much? (First line should end with a period, question mark, or exclamation point)

# formatter conflicts
"W191", # tab-indentation
"E501", # line-too-long
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
# formatter conflicts
"W191", # tab-indentation
"E501", # line-too-long
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation

# deprecated
"ANN101", # enforeces classmethods calasses have types
"ANN102", # enforeces self has a type
# deprecated
"ANN101", # enforeces classmethods calasses have types
"ANN102", # enforeces self has a type
]

# Allow fix for all enabled rules (when `--fix`) is provided.
Expand Down
7 changes: 4 additions & 3 deletions resources/documentation/Dependencys.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To get started with docker, you can follow the [official tutorial](https://docs.

#### Python3

The data processing scripts are written in python, and they implicitly depend on a recent version of python (~3.10).
The data processing scripts are written in python, and they implicitly depend on a recent version of python (~3.12).
If you don't meet this requirement, head over to the [python website](https://www.python.org/downloads/) and download
the latest version.

Expand All @@ -44,7 +44,7 @@ the latest version.
#### Python3

The server does have some scripts, which are written in python, and they implicitly depend on a recent version of
python (>=3.10).
python (>=3.12).
If you don't meet this requirement, head over to the [python website](https://www.python.org/downloads/) and download
the latest version.

Expand Down Expand Up @@ -79,4 +79,5 @@ Setting NodeJS up is a bit more complicated than setting up python/rust, but it

- On linux, you can get it through your favorite package manager.
You normally should need to install `nodejs` and `pnpm`.
- On WSL, use [this guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl) and [this guide](https://pnpm.io/installation)
- On WSL, use [this guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl)
and [this guide](https://pnpm.io/installation)

0 comments on commit baee4d8

Please sign in to comment.