Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
70 changes: 70 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -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/
194 changes: 194 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)