diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 26daa0b..91a7aa7 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -55,3 +55,41 @@ jobs: echo "published=${{ steps.release.outputs.new_release_published }}" >> $GITHUB_OUTPUT echo "New release: ${{ steps.release.outputs.new_release_version }}" fi + + publish: + name: publish to pypi + runs-on: ubuntu-latest + needs: versioning + if: needs.versioning.outputs.new_release_published == 'true' + environment: + name: pypi + url: https://pypi.org/p/leetcode-py + permissions: + id-token: write + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Set up Python + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version: "3.13" + + - name: Install Poetry + uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1 + with: + version: latest + virtualenvs-create: true + virtualenvs-in-project: true + + - name: Update version in pyproject.toml + run: | + poetry version ${{ needs.versioning.outputs.new_release_version }} + + - name: Build package + run: poetry build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 + with: + verbose: true diff --git a/README.md b/README.md index 5ee0760..ba2846d 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,9 @@ A modern Python LeetCode practice environment that goes beyond basic problem sol - 🚀 **Modern Python**: PEP 585/604 type hints, Poetry, and professional tooling - 📊 **Quality Assurance**: 95%+ test coverage, security scanning, automated linting -Includes all **75 Grind problems** - the most essential coding interview questions curated for maximum impact. - ## 🎯 What's Included -**Current**: All 75 problems from [Grind 75](https://www.techinterviewhandbook.org/grind75/) - the most essential coding interview problems curated by the creator of Blind 75. +**Current**: All 75 problems from [Grind 75](https://www.techinterviewhandbook.org/grind75/) - the most essential coding interview questions curated by the creator of Blind 75. **Future**: Planned expansion to all 169 Grind problems for comprehensive interview preparation. diff --git a/poetry.lock b/poetry.lock index 9d67ee4..2598c1b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -653,7 +653,7 @@ version = "0.21" description = "Simple Python interface for Graphviz" optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["main"] files = [ {file = "graphviz-0.21-py3-none-any.whl", hash = "sha256:54f33de9f4f911d7e84e4191749cac8cc5653f815b06738c54db9a15ab8b1e42"}, {file = "graphviz-0.21.tar.gz", hash = "sha256:20743e7183be82aaaa8ad6c93f8893c923bd6658a04c32ee115edb3c8a835f78"}, @@ -2251,4 +2251,4 @@ dev = ["black (>=19.3b0) ; python_version >= \"3.6\"", "pytest (>=4.6.2)"] [metadata] lock-version = "2.1" python-versions = "^3.13" -content-hash = "436edf031cba51092142ade6fa349b92e21874b6a48f54a2ea3928a88aa5a9c0" +content-hash = "e8769741fb13e346d2f8b7a6bc97b1a3042f1b2a0cfafbaa2125279ab454c9af" diff --git a/pyproject.toml b/pyproject.toml index e86293b..68c5bab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,28 @@ [tool.poetry] -name = "leetcode-py" -version = "0.1.0" -description = "LeetCode solutions in Python" -authors = ["Your Name "] +name = "leetcode-py-sdk" +version = "0.1.0" # use git tag instead +description = "Modern Python LeetCode practice environment with automated problem generation, beautiful data structure visualizations, and comprehensive testing" +authors = ["Wisaroot Lertthaweedech "] +license = "Apache-2.0" readme = "README.md" +homepage = "https://github.com/wisarootl/leetcode-py" +repository = "https://github.com/wisarootl/leetcode-py" +keywords = ["leetcode", "algorithms", "data-structures", "interview-prep", "coding-practice"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Education", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", +] +packages = [{include = "leetcode_py"}] [tool.poetry.dependencies] python = "^3.13" +graphviz = "^0.21" requests = "^2.32.5" typer = "^0.17.0" @@ -17,7 +33,6 @@ loguru = "^0.7.3" [tool.poetry.group.dev.dependencies] black = "^25.1.0" cookiecutter = "^2.6.0" -graphviz = "^0.21" ipykernel = "^6.30.1" isort = "^6.0.1" jupytext = "^1.16.6"