Skip to content
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

Feature/lower minimum python version #2

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package_name_here/subfolder/pandas-thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@

d = {"col1": [1, 2], "col2": [3, 4]}
df = pd.DataFrame(data=d)
print(df)
349 changes: 176 additions & 173 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["jvilders <60934195+jvilders@users.noreply.github.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
python = "^3.10"
pydantic = "^2.7.1"
pandas = "^2.2.2"

Expand All @@ -16,24 +16,24 @@ pre-commit = "^3.7.1"
mypy = "^1.10.0"
pandas-stubs = "^2.2.2.240514"
poethepoet = "^0.26.1"
tomli = { version = "^2.0.1", python = "<3.11" }

[tool.poe.tasks.lint]
help = "Lint all python files"
help = "Lint provided python files"
cmd = "ruff check --fix"

[tool.poe.tasks.format]
help = "Format all python files"
help = "Format provided python files"
cmd = "ruff format"

[tool.poe.tasks.typecheck]
help = "Typecheck all python files"
cmd = "mypy ."
help = "Typecheck provided python files"
cmd = "mypy"

[tool.poe.tasks.build]
help = "Builds the package"
cmd = "python scripts/build.py"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Poetry's [recommended install instructions](https://python-poetry.org/docs/#inst
# Installation

- Use the python version specified in the `.python-version` file with `pyenv`
- Run `poetry install`
- Run `poetry install --sync`
- Activate the poetry environment by running `poetry shell`
- If applicable, point your IDE towards the python interpreter inside the virtual environment, so that it can use the installed packages for type checking
- Run `pre-commit install` to set up the pre-commit hooks
Expand Down
2 changes: 0 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ exclude = [
line-length = 100
indent-width = 4

# Assume Python 3.12
target-version = "py312"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
Expand Down
8 changes: 7 additions & 1 deletion scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
import os
import shutil
import subprocess
import tomllib
import sys

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

from pathlib import Path


Expand Down