diff --git a/compiled_starters/python/.codecrafters/run.sh b/compiled_starters/python/.codecrafters/run.sh index 4b29480..b616c2a 100755 --- a/compiled_starters/python/.codecrafters/run.sh +++ b/compiled_starters/python/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec pipenv run python3 -m app.main "$@" +exec uv run --quiet -m app.main "$@" \ No newline at end of file diff --git a/compiled_starters/python/.gitignore b/compiled_starters/python/.gitignore index db38cf4..3e79d88 100644 --- a/compiled_starters/python/.gitignore +++ b/compiled_starters/python/.gitignore @@ -1,2 +1,177 @@ # Database files used for testing *.db + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +#uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +.idea/ + +# Ruff stuff: +.ruff_cache/ + +# PyPI configuration file +.pypirc \ No newline at end of file diff --git a/compiled_starters/python/.python-version b/compiled_starters/python/.python-version new file mode 100644 index 0000000..6324d40 --- /dev/null +++ b/compiled_starters/python/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/compiled_starters/python/Pipfile b/compiled_starters/python/Pipfile deleted file mode 100644 index 9094160..0000000 --- a/compiled_starters/python/Pipfile +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -sqlparse = "*" - -[dev-packages] - -[requires] -python_version = "3" diff --git a/compiled_starters/python/Pipfile.lock b/compiled_starters/python/Pipfile.lock deleted file mode 100644 index 6502b34..0000000 --- a/compiled_starters/python/Pipfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "d0bd22c9dd51a7f096ebc44bea576441d58271e112323978592f974786d665b3" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "sqlparse": { - "hashes": [ - "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", - "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" - ], - "index": "pypi", - "version": "==0.4.1" - } - }, - "develop": {} -} diff --git a/compiled_starters/python/README.md b/compiled_starters/python/README.md index b38e375..b587eff 100644 --- a/compiled_starters/python/README.md +++ b/compiled_starters/python/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `python (3.13)` installed locally +1. Ensure you have `uv` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.py`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/compiled_starters/python/codecrafters.yml b/compiled_starters/python/codecrafters.yml index bd98df7..995338c 100644 --- a/compiled_starters/python/codecrafters.yml +++ b/compiled_starters/python/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Python version used to run your code # on Codecrafters. # -# Available versions: python-3.13 -buildpack: python-3.13 +# Available versions: python-3.14 +buildpack: python-3.14 diff --git a/compiled_starters/python/pyproject.toml b/compiled_starters/python/pyproject.toml new file mode 100644 index 0000000..f818004 --- /dev/null +++ b/compiled_starters/python/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "codecrafters-sqlite" +version = "0.1.0" +requires-python = ">=3.14" +dependencies = [ + "sqlparse>=0.5.3", +] diff --git a/compiled_starters/python/uv.lock b/compiled_starters/python/uv.lock new file mode 100644 index 0000000..04db4f0 --- /dev/null +++ b/compiled_starters/python/uv.lock @@ -0,0 +1,23 @@ +version = 1 +revision = 3 +requires-python = ">=3.14" + +[[package]] +name = "codecrafters-sqlite" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "sqlparse" }, +] + +[package.metadata] +requires-dist = [{ name = "sqlparse", specifier = ">=0.5.3" }] + +[[package]] +name = "sqlparse" +version = "0.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272", size = 84999, upload-time = "2024-12-10T12:05:30.728Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/5c/bfd6bd0bf979426d405cc6e71eceb8701b148b16c21d2dc3c261efc61c7b/sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca", size = 44415, upload-time = "2024-12-10T12:05:27.824Z" }, +] diff --git a/compiled_starters/python/your_program.sh b/compiled_starters/python/your_program.sh index 0fa36a5..6f090df 100755 --- a/compiled_starters/python/your_program.sh +++ b/compiled_starters/python/your_program.sh @@ -12,4 +12,4 @@ set -e # Exit early if any commands fail # # - Edit this to change how your program runs locally # - Edit .codecrafters/run.sh to change how your program runs remotely -exec pipenv run python3 -m app.main "$@" +exec uv run --quiet -m app.main "$@" diff --git a/dockerfiles/python-3.14.Dockerfile b/dockerfiles/python-3.14.Dockerfile new file mode 100644 index 0000000..d4f618d --- /dev/null +++ b/dockerfiles/python-3.14.Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1.7-labs +FROM astral/uv:python3.14-alpine + +# Ensures the container is re-built if dependency files change +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="pyproject.toml,uv.lock" + +# Prevents Python from buffering stdout and stderr +ENV PYTHONUNBUFFERED=1 + +ENV PYTHONPATH=/app:$PYTHONPATH + +WORKDIR /app + +# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses +COPY --exclude=.git --exclude=README.md . /app + +# Force environment creation +RUN uv sync \ No newline at end of file diff --git a/solutions/python/01-dr6/code/.codecrafters/run.sh b/solutions/python/01-dr6/code/.codecrafters/run.sh index 4b29480..b616c2a 100755 --- a/solutions/python/01-dr6/code/.codecrafters/run.sh +++ b/solutions/python/01-dr6/code/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec pipenv run python3 -m app.main "$@" +exec uv run --quiet -m app.main "$@" \ No newline at end of file diff --git a/solutions/python/01-dr6/code/.gitignore b/solutions/python/01-dr6/code/.gitignore index db38cf4..3e79d88 100644 --- a/solutions/python/01-dr6/code/.gitignore +++ b/solutions/python/01-dr6/code/.gitignore @@ -1,2 +1,177 @@ # Database files used for testing *.db + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +#uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +.idea/ + +# Ruff stuff: +.ruff_cache/ + +# PyPI configuration file +.pypirc \ No newline at end of file diff --git a/solutions/python/01-dr6/code/.python-version b/solutions/python/01-dr6/code/.python-version new file mode 100644 index 0000000..6324d40 --- /dev/null +++ b/solutions/python/01-dr6/code/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/solutions/python/01-dr6/code/Pipfile b/solutions/python/01-dr6/code/Pipfile deleted file mode 100644 index 9094160..0000000 --- a/solutions/python/01-dr6/code/Pipfile +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -sqlparse = "*" - -[dev-packages] - -[requires] -python_version = "3" diff --git a/solutions/python/01-dr6/code/Pipfile.lock b/solutions/python/01-dr6/code/Pipfile.lock deleted file mode 100644 index 6502b34..0000000 --- a/solutions/python/01-dr6/code/Pipfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "d0bd22c9dd51a7f096ebc44bea576441d58271e112323978592f974786d665b3" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "sqlparse": { - "hashes": [ - "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", - "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" - ], - "index": "pypi", - "version": "==0.4.1" - } - }, - "develop": {} -} diff --git a/solutions/python/01-dr6/code/README.md b/solutions/python/01-dr6/code/README.md index b38e375..b587eff 100644 --- a/solutions/python/01-dr6/code/README.md +++ b/solutions/python/01-dr6/code/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `python (3.13)` installed locally +1. Ensure you have `uv` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.py`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/solutions/python/01-dr6/code/codecrafters.yml b/solutions/python/01-dr6/code/codecrafters.yml index bd98df7..995338c 100644 --- a/solutions/python/01-dr6/code/codecrafters.yml +++ b/solutions/python/01-dr6/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Python version used to run your code # on Codecrafters. # -# Available versions: python-3.13 -buildpack: python-3.13 +# Available versions: python-3.14 +buildpack: python-3.14 diff --git a/solutions/python/01-dr6/code/pyproject.toml b/solutions/python/01-dr6/code/pyproject.toml new file mode 100644 index 0000000..f818004 --- /dev/null +++ b/solutions/python/01-dr6/code/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "codecrafters-sqlite" +version = "0.1.0" +requires-python = ">=3.14" +dependencies = [ + "sqlparse>=0.5.3", +] diff --git a/solutions/python/01-dr6/code/uv.lock b/solutions/python/01-dr6/code/uv.lock new file mode 100644 index 0000000..04db4f0 --- /dev/null +++ b/solutions/python/01-dr6/code/uv.lock @@ -0,0 +1,23 @@ +version = 1 +revision = 3 +requires-python = ">=3.14" + +[[package]] +name = "codecrafters-sqlite" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "sqlparse" }, +] + +[package.metadata] +requires-dist = [{ name = "sqlparse", specifier = ">=0.5.3" }] + +[[package]] +name = "sqlparse" +version = "0.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272", size = 84999, upload-time = "2024-12-10T12:05:30.728Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/5c/bfd6bd0bf979426d405cc6e71eceb8701b148b16c21d2dc3c261efc61c7b/sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca", size = 44415, upload-time = "2024-12-10T12:05:27.824Z" }, +] diff --git a/solutions/python/01-dr6/code/your_program.sh b/solutions/python/01-dr6/code/your_program.sh index 0fa36a5..6f090df 100755 --- a/solutions/python/01-dr6/code/your_program.sh +++ b/solutions/python/01-dr6/code/your_program.sh @@ -12,4 +12,4 @@ set -e # Exit early if any commands fail # # - Edit this to change how your program runs locally # - Edit .codecrafters/run.sh to change how your program runs remotely -exec pipenv run python3 -m app.main "$@" +exec uv run --quiet -m app.main "$@" diff --git a/starter_templates/python/code/.codecrafters/run.sh b/starter_templates/python/code/.codecrafters/run.sh index 4b29480..b616c2a 100755 --- a/starter_templates/python/code/.codecrafters/run.sh +++ b/starter_templates/python/code/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec pipenv run python3 -m app.main "$@" +exec uv run --quiet -m app.main "$@" \ No newline at end of file diff --git a/starter_templates/python/code/.gitignore b/starter_templates/python/code/.gitignore new file mode 100644 index 0000000..fe2425e --- /dev/null +++ b/starter_templates/python/code/.gitignore @@ -0,0 +1,174 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +#uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +.idea/ + +# Ruff stuff: +.ruff_cache/ + +# PyPI configuration file +.pypirc \ No newline at end of file diff --git a/starter_templates/python/code/.python-version b/starter_templates/python/code/.python-version new file mode 100644 index 0000000..6324d40 --- /dev/null +++ b/starter_templates/python/code/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/starter_templates/python/code/Pipfile b/starter_templates/python/code/Pipfile deleted file mode 100644 index 9094160..0000000 --- a/starter_templates/python/code/Pipfile +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -sqlparse = "*" - -[dev-packages] - -[requires] -python_version = "3" diff --git a/starter_templates/python/code/Pipfile.lock b/starter_templates/python/code/Pipfile.lock deleted file mode 100644 index 6502b34..0000000 --- a/starter_templates/python/code/Pipfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "d0bd22c9dd51a7f096ebc44bea576441d58271e112323978592f974786d665b3" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "sqlparse": { - "hashes": [ - "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", - "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" - ], - "index": "pypi", - "version": "==0.4.1" - } - }, - "develop": {} -} diff --git a/starter_templates/python/code/pyproject.toml b/starter_templates/python/code/pyproject.toml new file mode 100644 index 0000000..f818004 --- /dev/null +++ b/starter_templates/python/code/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "codecrafters-sqlite" +version = "0.1.0" +requires-python = ">=3.14" +dependencies = [ + "sqlparse>=0.5.3", +] diff --git a/starter_templates/python/code/uv.lock b/starter_templates/python/code/uv.lock new file mode 100644 index 0000000..04db4f0 --- /dev/null +++ b/starter_templates/python/code/uv.lock @@ -0,0 +1,23 @@ +version = 1 +revision = 3 +requires-python = ">=3.14" + +[[package]] +name = "codecrafters-sqlite" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "sqlparse" }, +] + +[package.metadata] +requires-dist = [{ name = "sqlparse", specifier = ">=0.5.3" }] + +[[package]] +name = "sqlparse" +version = "0.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272", size = 84999, upload-time = "2024-12-10T12:05:30.728Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/5c/bfd6bd0bf979426d405cc6e71eceb8701b148b16c21d2dc3c261efc61c7b/sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca", size = 44415, upload-time = "2024-12-10T12:05:27.824Z" }, +] diff --git a/starter_templates/python/config.yml b/starter_templates/python/config.yml index 22a0370..08c1bd5 100644 --- a/starter_templates/python/config.yml +++ b/starter_templates/python/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: python (3.13) - user_editable_file: app/main.py + required_executable: "uv" + user_editable_file: "app/main.py"