From 068cc5b7d6afac45cb138317ebaba35faa066243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Kalfon?= Date: Tue, 28 Jan 2025 15:04:30 +0100 Subject: [PATCH 1/3] Update __init__.py --- project_name/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project_name/__init__.py b/project_name/__init__.py index e69de29..9b7ff20 100644 --- a/project_name/__init__.py +++ b/project_name/__init__.py @@ -0,0 +1,3 @@ +from importlib.metadata import version + +__version__ = version("project_name") From 4464aee9aed86143d37a554e556e6aa896921486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Kalfon?= Date: Tue, 28 Jan 2025 15:04:47 +0100 Subject: [PATCH 2/3] Delete requirements.txt --- requirements.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b05f2a6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# This template is a low-dependency template. -# By default there is no requirements added here. -# Add the requirements you need to this file. -# or run `make init` to create this file automatically based on the template. -# You can also run `make switch-to-poetry` to use the poetry package manager. From af14898b6ddefdf9c6d7b1bfbc4f2d56050a6947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Kalfon?= Date: Tue, 28 Jan 2025 15:45:44 +0100 Subject: [PATCH 3/3] my own template --- .cursorignore | 21 +++++++ .github/FUNDING.yml | 12 ---- .github/workflows/main.yml | 53 ++++++++++------- .github/workflows/release.yml | 34 ++++++----- .gitignore | 2 + CONTRIBUTING.md | 1 - Containerfile | 4 +- LICENSE | 37 ++++++------ README.md | 19 +----- config/main.yml | 0 data/main/nothing.parquet | 0 data/mine/nothing.parquet | 0 Makefile => makefile | 63 +++++--------------- notebooks/example.ipynb | 0 notebooks/test_notebooks/test.ipynb | 10 ++++ pyproject.toml | 89 +++++++++++++++++++++++++++++ requirements-test.txt | 10 ---- setup.py | 46 --------------- tools/README.md | 3 + 19 files changed, 210 insertions(+), 194 deletions(-) create mode 100644 .cursorignore delete mode 100644 .github/FUNDING.yml create mode 100644 config/main.yml create mode 100644 data/main/nothing.parquet create mode 100644 data/mine/nothing.parquet rename Makefile => makefile (51%) create mode 100644 notebooks/example.ipynb create mode 100644 notebooks/test_notebooks/test.ipynb create mode 100644 pyproject.toml delete mode 100644 requirements-test.txt delete mode 100644 setup.py create mode 100644 tools/README.md diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 0000000..675d8d4 --- /dev/null +++ b/.cursorignore @@ -0,0 +1,21 @@ +*.json +*.csv +*.txt +*.md +*.ipynb +*.Rmd +*.Rproj +*.Rproj.user +*.parquet +*.ckpt +*.h5ad +site/ +*.lamindb +*.lndb +*.out +*.html +*.pdf +*.npy +*.npz +*.whl +*.gz diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 1e9d2a1..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [rochacbruno] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e82e08..17d7d66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,38 +18,45 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.11] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install UV + uses: astral-sh/setup-uv@v3 - name: Install project - run: make install + run: uv sync --all-extras --dev - name: Run linter - run: make lint + run: uv run task lint tests_linux: needs: linter strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.11] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install UV + uses: astral-sh/setup-uv@v3 - name: Install project - run: make install + run: uv sync --all-extras --dev - name: Run tests - run: make test + run: uv run task test - name: "Upload coverage to Codecov" uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} # with: # fail_ci_if_error: true @@ -58,35 +65,39 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.11] os: [macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install UV + uses: astral-sh/setup-uv@v3 - name: Install project - run: make install + run: uv sync --all-extras --dev - name: Run tests - run: make test + run: uv run task test tests_win: needs: linter strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.11] os: [windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install Pip run: pip install --user --upgrade pip + - name: Install UV + run: pip install uv - name: Install project - run: pip install -e .[test] - - name: run tests - run: pytest -s -vvvv -l --tb=long tests + run: uv sync --all-extras --dev + - name: Run tests + run: uv run task test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c38b48e..9af5053 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # by default, it uses a depth of 1 # this fetches all history so that we can read each commit @@ -32,21 +32,19 @@ jobs: deploy: needs: release - runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: ["3.11"] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v3 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Build and publish + run: | + uv build && uv publish -u __token__ -p ${{ secrets.POETRY_TOKEN }} diff --git a/.gitignore b/.gitignore index 2d0fadb..62d9600 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,5 @@ dmypy.json # templates .github/templates/* + +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d0dd72..7b14d02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,7 +87,6 @@ clean: ## Clean unused files. virtualenv: ## Create a virtual environment. release: ## Create a new tag for release. docs: ## Build the documentation. -switch-to-poetry: ## Switch to poetry package manager. init: ## Initialize the project based on an application template. ``` diff --git a/Containerfile b/Containerfile index 83bb605..df32a3d 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,5 @@ -FROM python:3.7-slim +FROM python:3.11-slim COPY . /app WORKDIR /app -RUN pip install . +RUN uv sync --all-extras --dev CMD ["project_name"] diff --git a/LICENSE b/LICENSE index fdddb29..346d86c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,24 +1,21 @@ -This is free and unencumbered software released into the public domain. +MIT License -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +Copyright (c) 2024 jรฉrรฉmie kalfon, laura cantini, gabriel peyrรฉ -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -For more information, please refer to +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 21f444c..153e812 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,6 @@ A low dependency and really simple to start project template for Python Projects. -See also -- [Flask-Project-Template](https://github.com/rochacbruno/flask-project-template/) for a full feature Flask project including database, API, admin interface, etc. -- [FastAPI-Project-Template](https://github.com/rochacbruno/fastapi-project-template/) The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands. - ### HOW TO USE THIS TEMPLATE > **DO NOT FORK** this is meant to be used from **[Use this template](https://github.com/rochacbruno/python-project-template/generate)** feature. @@ -25,28 +21,19 @@ See also ### What is included on this template? -- ๐Ÿ–ผ๏ธ Templates for starting multiple application types: - * **Basic low dependency** Python program (default) [use this template](https://github.com/rochacbruno/python-project-template/generate) - * **Flask** with database, admin interface, restapi and authentication [use this template](https://github.com/rochacbruno/flask-project-template/generate). - **or Run `make init` after cloning to generate a new project based on a template.** -- ๐Ÿ“ฆ A basic [setup.py](setup.py) file to provide installation, packaging and distribution for your project. +- ๐Ÿ“ฆ A basic [pyproject.toml](pyproject.toml) file to provide installation, packaging and distribution for your project. Template uses setuptools because it's the de-facto standard for Python packages, you can run `make switch-to-poetry` later if you want. -- ๐Ÿค– A [Makefile](Makefile) with the most useful commands to install, test, lint, format and release your project. - ๐Ÿ“ƒ Documentation structure using [mkdocs](http://www.mkdocs.org) - ๐Ÿ’ฌ Auto generation of change log using **gitchangelog** to keep a HISTORY.md file automatically based on your commit history on every release. - ๐Ÿ‹ A simple [Containerfile](Containerfile) to build a container image for your project. `Containerfile` is a more open standard for building container images than Dockerfile, you can use buildah or docker with this file. - ๐Ÿงช Testing structure using [pytest](https://docs.pytest.org/en/latest/) -- โœ… Code linting using [flake8](https://flake8.pycqa.org/en/latest/) +- โœ… Code linting using [ruff]() - ๐Ÿ“Š Code coverage reports using [codecov](https://about.codecov.io/sign-up/) -- ๐Ÿ›ณ๏ธ Automatic release to [PyPI](https://pypi.org) using [twine](https://twine.readthedocs.io/en/latest/) and github actions. +- ๐Ÿ›ณ๏ธ Automatic release to [PyPI](https://pypi.org) using [uv] and github actions. - ๐ŸŽฏ Entry points to execute your program using `python -m ` or `$ project_name` with basic CLI argument parsing. - ๐Ÿ”„ Continuous integration using [Github Actions](.github/workflows/) with jobs to lint, test and release your project on Linux, Mac and Windows environments. -> Curious about architectural decisions on this template? read [ABOUT_THIS_TEMPLATE.md](ABOUT_THIS_TEMPLATE.md) -> If you want to contribute to this template please open an [issue](https://github.com/rochacbruno/python-project-template/issues) or fork and send a PULL REQUEST. - -[โค๏ธ Sponsor this project](https://github.com/sponsors/rochacbruno/) diff --git a/config/main.yml b/config/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/data/main/nothing.parquet b/data/main/nothing.parquet new file mode 100644 index 0000000..e69de29 diff --git a/data/mine/nothing.parquet b/data/mine/nothing.parquet new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/makefile similarity index 51% rename from Makefile rename to makefile index 52d91ac..8a01aa5 100644 --- a/Makefile +++ b/makefile @@ -13,39 +13,28 @@ help: ## Show the help. .PHONY: show show: ## Show the current environment. @echo "Current environment:" - @if [ "$(USING_POETRY)" ]; then poetry env info && exit; fi @echo "Running using $(ENV_PREFIX)" @$(ENV_PREFIX)python -V @$(ENV_PREFIX)python -m site .PHONY: install install: ## Install the project in dev mode. - @if [ "$(USING_POETRY)" ]; then poetry install && exit; fi - @echo "Don't forget to run 'make virtualenv' if you got errors." - $(ENV_PREFIX)pip install -e .[test] + $(ENV_PREFIX)uv sync --all-extras --dev .PHONY: fmt fmt: ## Format code using black & isort. - $(ENV_PREFIX)isort project_name/ - $(ENV_PREFIX)black -l 79 project_name/ - $(ENV_PREFIX)black -l 79 tests/ + $(ENV_PREFIX)uv run ruff format project_name/ tests/ .PHONY: lint lint: ## Run pep8, black, mypy linters. - $(ENV_PREFIX)flake8 project_name/ - $(ENV_PREFIX)black -l 79 --check project_name/ - $(ENV_PREFIX)black -l 79 --check tests/ - $(ENV_PREFIX)mypy --ignore-missing-imports project_name/ +#most are due to flashattention... + $(ENV_PREFIX)uv run ruff check --fix project_name/ tests/ .PHONY: test test: lint ## Run tests and generate coverage report. - $(ENV_PREFIX)pytest -v --cov-config .coveragerc --cov=project_name -l --tb=short --maxfail=1 tests/ - $(ENV_PREFIX)coverage xml - $(ENV_PREFIX)coverage html - -.PHONY: watch -watch: ## Run tests on every change. - ls **/**.py | entr $(ENV_PREFIX)pytest -s -vvv -l --tb=long --maxfail=1 tests/ + $(ENV_PREFIX)uv run pytest -v --cov-config .coveragerc --cov=project_name -l --tb=short --maxfail=1 tests/ + $(ENV_PREFIX)uv run coverage xml + $(ENV_PREFIX)uv run coverage html .PHONY: clean clean: ## Clean unused files. @@ -65,13 +54,11 @@ clean: ## Clean unused files. .PHONY: virtualenv virtualenv: ## Create a virtual environment. - @if [ "$(USING_POETRY)" ]; then poetry install && exit; fi @echo "creating virtualenv ..." @rm -rf .venv - @python3 -m venv .venv - @./.venv/bin/pip install -U pip - @./.venv/bin/pip install -e .[test] - @echo + @uv venv + @source .venv/bin/activate + @make install @echo "!!! Please run 'source .venv/bin/activate' to enable the environment !!!" .PHONY: release @@ -79,13 +66,17 @@ release: ## Create a new tag for release. @echo "WARNING: This operation will create s version tag and push to github" @read -p "Version? (provide the next x.y.z semver) : " TAG @echo "$${TAG}" > project_name/VERSION + @sed -i 's/^version = .*/version = "'$${TAG}'"/' pyproject.toml + @sed -i 's/__version__ = .*/__version__ = "'$${TAG}'"/' project_name/__init__.py @$(ENV_PREFIX)gitchangelog > HISTORY.md - @git add project_name/VERSION HISTORY.md + @git add project_name/VERSION HISTORY.md pyproject.toml @git commit -m "release: version $${TAG} ๐Ÿš€" @echo "creating git tag : $${TAG}" @git tag $${TAG} @git push -u origin HEAD --tags @echo "Github Actions will detect the new tag and release the new version." + @mkdocs gh-deploy + @echo "Documentation deployed to https://author_name.github.io/project_name/" .PHONY: docs docs: ## Build the documentation. @@ -93,30 +84,6 @@ docs: ## Build the documentation. @$(ENV_PREFIX)mkdocs build URL="site/index.html"; xdg-open $$URL || sensible-browser $$URL || x-www-browser $$URL || gnome-open $$URL || open $$URL -.PHONY: switch-to-poetry -switch-to-poetry: ## Switch to poetry package manager. - @echo "Switching to poetry ..." - @if ! poetry --version > /dev/null; then echo 'poetry is required, install from https://python-poetry.org/'; exit 1; fi - @rm -rf .venv - @poetry init --no-interaction --name=a_flask_test --author=rochacbruno - @echo "" >> pyproject.toml - @echo "[tool.poetry.scripts]" >> pyproject.toml - @echo "project_name = 'project_name.__main__:main'" >> pyproject.toml - @cat requirements.txt | while read in; do poetry add --no-interaction "$${in}"; done - @cat requirements-test.txt | while read in; do poetry add --no-interaction "$${in}" --dev; done - @poetry install --no-interaction - @mkdir -p .github/backup - @mv requirements* .github/backup - @mv setup.py .github/backup - @echo "You have switched to https://python-poetry.org/ package manager." - @echo "Please run 'poetry shell' or 'poetry run project_name'" - .PHONY: init init: ## Initialize the project based on an application template. @./.github/init.sh - - -# This project has been generated from rochacbruno/python-project-template -# __author__ = 'rochacbruno' -# __repo__ = https://github.com/rochacbruno/python-project-template -# __sponsor__ = https://github.com/sponsors/rochacbruno/ diff --git a/notebooks/example.ipynb b/notebooks/example.ipynb new file mode 100644 index 0000000..e69de29 diff --git a/notebooks/test_notebooks/test.ipynb b/notebooks/test_notebooks/test.ipynb new file mode 100644 index 0000000..c55a287 --- /dev/null +++ b/notebooks/test_notebooks/test.ipynb @@ -0,0 +1,10 @@ +{ + "cells": [], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..98f911a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,89 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "project_name" +version = "0.1.0" +description = "project_description" +readme = "README.md" +requires-python = ">=3.10" +authors = [ + { name = "author_name", email = "author_email@exemplo.com" } +] +dependencies = [ + "ruff>=0.7.1", +] + +[project.urls] +homepage = "https://github.com/author_name/project_urlname/" + +[dependency-groups] +dev = [] + +[project.scripts] +project_name = "project_name.__main__:main" + +[project.optional-dependencies] +test = [ + "pip-tools", + "pytest", + "coverage", + "flake8", + "black", + "isort", + "pytest-cov", + "mypy", + "gitchangelog", + "codecov", + "mkdocs>=1.5.3", + "mkdocs-git-revision-date-localized-plugin>=1.0.0", + "mkdocstrings>=0.22.0", + "mkdocs-git-authors-plugin>=0.4.0", + "mkdocs-jupyter>=0.2.0", + "mkdocstrings-python>=0.10.0", +] + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-ra -q -vv" +pythonpath = ["/tests"] + +[tool.ruff] +line-length = 88 +indent-width = 4 +target-version = "py311" + +[tool.ruff.lint] +select = ["E", "F", "I"] +ignore = ["E501", "E203", "E266", "E265", "F401", "F403", "E722", "E741", "E731", "E721"] + +[tool.taskipy.tasks] +lint = "uvx ruff check --fix tests/ project_name/" +install = "uv sync --all-extras --dev" +fmt = "uvx ruff format hackaton_owkin_gbm/ tests/" +test = """ + uvx --extra test pytest -s -v --cov-config .coveragerc --cov=hackaton_owkin_gbm -l --tb=short --maxfail=1 tests/ + uvx --extra test coverage xml + uvx --extra test coverage html + """ +show = """ + python -V + python -m site + """ +clean = """ + find . -type d -name "__pycache__" -exec rm -rf {} + + find . -type f -name "*.pyc" -delete + find . -type f -name ".coverage" -delete + find . -type f -name "coverage.xml" -delete + find . -type d -name "htmlcov" -exec rm -rf {} + + find . -type d -name ".pytest_cache" -exec rm -rf {} + + find . -type d -name ".mypy_cache" -exec rm -rf {} + + find . -type d -name "dist" -exec rm -rf {} + + find . -type d -name "build" -exec rm -rf {} + + find . -type d -name "*.egg-info" -exec rm -rf {} + + """ +docs = """ + mkdocs build + python -c "import webbrowser; webbrowser.open('site/index.html')" + """ \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index e89ee5c..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -# These requirements are for development and testing only, not for production. -pytest -coverage -flake8 -black -isort -pytest-cov -mypy -gitchangelog -mkdocs diff --git a/setup.py b/setup.py deleted file mode 100644 index 7547627..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Python setup.py for project_name package""" -import io -import os -from setuptools import find_packages, setup - - -def read(*paths, **kwargs): - """Read the contents of a text file safely. - >>> read("project_name", "VERSION") - '0.1.0' - >>> read("README.md") - ... - """ - - content = "" - with io.open( - os.path.join(os.path.dirname(__file__), *paths), - encoding=kwargs.get("encoding", "utf8"), - ) as open_file: - content = open_file.read().strip() - return content - - -def read_requirements(path): - return [ - line.strip() - for line in read(path).split("\n") - if not line.startswith(('"', "#", "-", "git+")) - ] - - -setup( - name="project_name", - version=read("project_name", "VERSION"), - description="project_description", - url="https://github.com/author_name/project_urlname/", - long_description=read("README.md"), - long_description_content_type="text/markdown", - author="author_name", - packages=find_packages(exclude=["tests", ".github"]), - install_requires=read_requirements("requirements.txt"), - entry_points={ - "console_scripts": ["project_name = project_name.__main__:main"] - }, - extras_require={"test": read_requirements("requirements-test.txt")}, -) diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000..dbf270a --- /dev/null +++ b/tools/README.md @@ -0,0 +1,3 @@ +# Tools used for the project + +typically other packages as gitmodules that cannot be installed easily with uv \ No newline at end of file