From 7ce589590698e84b2471d45fa98bba98cf884f37 Mon Sep 17 00:00:00 2001 From: Ruh Date: Sun, 1 Feb 2026 10:58:42 +0530 Subject: [PATCH 1/3] Add GitHub Actions workflow for Python package publishing This workflow automates the upload of a Python package to PyPI upon release creation, including build and upload steps. --- .github/workflows/python-publish.yml | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..82f8dbd --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,70 @@ +# This workflow will upload a Python Package to PyPI when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build release distributions + run: | + # NOTE: put your own distribution build steps here. + python -m pip install build + python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + # Dedicated environments with protections for publishing are strongly recommended. + # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules + environment: + name: pypi + # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: + # url: https://pypi.org/p/YOURPROJECT + # + # ALTERNATIVE: if your GitHub Release name is the PyPI project version string + # ALTERNATIVE: exactly, uncomment the following line instead: + # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }} + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ From 7e4763fe13ff2256ce85528efd8b056061e413ee Mon Sep 17 00:00:00 2001 From: Ruh Date: Sun, 1 Feb 2026 11:00:30 +0530 Subject: [PATCH 2/3] Add Dependabot configuration file Configure Dependabot for version updates on a weekly schedule. --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5990d9c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From d18d0c508ea38fa3b0396eb263e23fc745d35fbe Mon Sep 17 00:00:00 2001 From: Ruh Date: Sun, 1 Feb 2026 11:28:27 +0530 Subject: [PATCH 3/3] Add README.md --- README.md | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) diff --git a/README.md b/README.md index e69de29..834b25b 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,194 @@ +# quickstart + +A minimal Python "quickstart" project template to get a small script or package up and running quickly. + +Badges +- Build / CI: ![CI](https://img.shields.io/badge/ci-none-lightgrey) +- Python versions: ![Python](https://img.shields.io/badge/python-3.8%2B-blue) +- License: ![License](https://img.shields.io/badge/license-MIT-green) + +Table of contents +- [About](#about) +- [Prerequisites](#prerequisites) +- [Quick start](#quick-start) +- [Usage](#usage) +- [Development](#development) +- [Testing](#testing) +- [Linting & Formatting](#linting--formatting) +- [Packaging](#packaging) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) + +About +----- +quickstart is a small Python starter project that demonstrates a clean layout and includes common development tasks (venv, install, run, tests, lint). Use it as a scaffold for CLI tools, libraries or small services. + +Prerequisites +------------- +- Python 3.8 or newer (3.11+ recommended) +- Git +- Recommended: pip, virtualenv (or use python -m venv) +- Optional tools: poetry / pipx / tox for alternative workflows + +Quick start +----------- +1. Clone the repo + - Unix / PowerShell + ```bash + git clone https://github.com/Ruh-Al-Tarikh/quickstart.git + cd quickstart + ``` + +2. Create a virtual environment and activate it + - macOS / Linux: + ```bash + python -m venv .venv + source .venv/bin/activate + ``` + - Windows PowerShell: + ```powershell + python -m venv .venv + .\.venv\Scripts\Activate.ps1 + ``` + +3. Install dependencies + - If using requirements.txt: + ```bash + pip install -r requirements.txt + ``` + - If the project uses editable install (package layout): + ```bash + pip install -e . + ``` + +Usage +----- +- Run the main script (example): + ```bash + python -m quickstart + ``` +- Or if a CLI entry point is defined (after pip install -e .): + ```bash + quickstart --help + ``` + +Example +------- +If the repository contains a small module with a function, a minimal usage example might look like: + +```python +from quickstart import say_hello + +def main(): + print(say_hello("World")) + +if __name__ == "__main__": + main() +``` + +Development +----------- +Install developer dependencies (example using requirements-dev.txt): +```bash +pip install -r requirements-dev.txt +``` + +Common dev tasks: +- Run the app locally: python -m quickstart +- Run a REPL with project on path: + ```bash + python -c "import quickstart; print(quickstart.__version__)" + ``` + +Testing +------- +This project uses pytest (adjust to your test runner). + +Install test deps: +```bash +pip install pytest +``` + +Run tests: +```bash +pytest +``` + +For coverage: +```bash +pip install coverage +coverage run -m pytest +coverage report +``` + +Linting & Formatting +-------------------- +Recommended tools: +- black (formatter) +- ruff / flake8 (linter) +- isort (imports) + +Install and run: +```bash +pip install black ruff isort +black . +ruff . +isort . +``` + +Type checking +------------- +If you use type hints, run mypy: +```bash +pip install mypy +mypy quickstart +``` + +Packaging +--------- +If packaging as an installable Python package, include a pyproject.toml (PEP 621) or setup.cfg + setup.py. Example (build wheel and sdist): +```bash +pip install build +python -m build +``` + +Publishing +---------- +To publish to PyPI (example with twine): +```bash +pip install twine +python -m build +twine upload dist/* +``` + +Continuous Integration +---------------------- +Add a GitHub Actions workflow (e.g., .github/workflows/ci.yml) to run tests, lint and build on push/PR. + +Contributing +------------ +Contributions are welcome. Please: +1. Create an issue to discuss major changes. +2. Open a branch: git checkout -b feat/your-feature +3. Make changes with tests. +4. Create a pull request. + +Use conventional commits or describe the change clearly in the PR. + +License +------- +This project is provided under the MIT License. See LICENSE file for details. + +Contact +------- +Created by Ruh-Al-Tarikh. For questions or help, open an issue or contact the maintainer via GitHub. + +Optional files to include in the repo +- requirements.txt +- requirements-dev.txt +- pyproject.toml / setup.cfg or setup.py +- .gitignore (.venv, __pycache__, .pytest_cache) +- tests/ (pytest tests) +- LICENSE (MIT) +- .github/workflows/ci.yml (CI pipeline) \ No newline at end of file