From 7b6075bd2c488af51eba5d4d257722717427149a Mon Sep 17 00:00:00 2001 From: dariocazzani Date: Sun, 3 May 2026 11:32:22 -0400 Subject: [PATCH] Prepare project metadata for PyPI publication - Add LICENSE (MIT) with dual-author copyright - Add CHANGELOG.md in Keep-a-Changelog format - Add CONTRIBUTING.md with minimal contributor expectations - Add src/devol/py.typed marker for downstream type checkers - Fill in pyproject.toml project metadata (readme, license, license-files, authors, keywords, classifiers, urls) - Move pytest from required deps to the dev extra - Add docs/superpowers/ to .gitignore for local-only notes --- .gitignore | 3 +++ CHANGELOG.md | 27 +++++++++++++++++++++++++++ CONTRIBUTING.md | 37 +++++++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ pyproject.toml | 35 +++++++++++++++++++++++++++++++++-- src/devol/py.typed | 0 uv.lock | 4 +--- 7 files changed, 122 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 src/devol/py.typed diff --git a/.gitignore b/.gitignore index d43b8fc..a64756b 100644 --- a/.gitignore +++ b/.gitignore @@ -221,3 +221,6 @@ __marimo__/ data/ mnist_checkpoints/ benchmark_results/ + +# Local-only working notes (specs, brainstorming docs, etc.) +docs/superpowers/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cbb3f3d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +While on `0.x`, minor releases may include breaking changes. The public API is +the set of symbols exported from `devol.__all__`; anything else is internal. + +## [Unreleased] + +### Added + +- Project metadata for PyPI publication (license, authors, classifiers, URLs). +- `LICENSE` file (MIT). +- `py.typed` marker so downstream type checkers pick up `devol`'s inline hints. +- `CONTRIBUTING.md` with minimum expectations for patches. +- This changelog. + +### Changed + +- Moved `pytest` from required dependencies to the `dev` extra. + +## [0.1.0] + +Initial development version. Not yet released to PyPI. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..99f57d3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing + +Thanks for your interest in devol. This is a small project, so the process is light. + +## Before you start + +For anything non-trivial, open an issue first to discuss the change. Bug fixes, typo fixes, and small quality-of-life improvements can go straight to a PR. + +## Development setup + +```bash +git clone https://github.com/LabStrangeLoop/devol.git +cd devol +uv sync --extra dev +``` + +## Before you open a PR + +Please make sure these all pass locally: + +```bash +uv run pytest +uv run ruff check +uv run ruff format --check +uv run mypy src/ +``` + +## Pull requests + +- One logical change per PR. +- Include a short description of the "why" — what problem does this solve? +- If you add behavior, add tests. +- Add a line to `CHANGELOG.md` under `[Unreleased]` describing user-visible changes. + +## Questions + +Open an issue with the `question` label, or start a discussion. No wrong questions. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a46c983 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Dario Cazzani, Aleksandr Yeganov + +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 above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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/pyproject.toml b/pyproject.toml index 0ea401f..1900610 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,33 @@ name = "devol" version = "0.1.0" description = "Diffusion Evolution Algorithm - Evolution through iterative denoising" +readme = "README.md" +license = "MIT" +license-files = ["LICENSE"] requires-python = ">=3.11" +authors = [ + {name = "Dario Cazzani", email = "dariocazzani@gmail.com"}, + {name = "Aleksandr Yeganov", email = "ayeganov@gmail.com"}, +] +keywords = [ + "evolution", + "optimization", + "diffusion", + "evolutionary-algorithms", + "black-box-optimization", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Operating System :: OS Independent", + "Typing :: Typed", +] dependencies = [ "gymnasium[classic-control]>=1.2.1", "matplotlib>=3.10.7", @@ -10,16 +36,21 @@ dependencies = [ "pydantic>=2.0.0", "pydantic-settings>=2.0.0", "pydantic-yaml>=1.6.0", - "pytest>=8.4.2", "torch>=2.9.0", "torchvision>=0.24.0", ] +[project.urls] +Homepage = "https://github.com/LabStrangeLoop/devol" +Repository = "https://github.com/LabStrangeLoop/devol" +Issues = "https://github.com/LabStrangeLoop/devol/issues" +Changelog = "https://github.com/LabStrangeLoop/devol/blob/main/CHANGELOG.md" + [project.optional-dependencies] dev = [ "ruff>=0.1.0", "mypy>=1.7.0", - "pytest>=7.0.0", + "pytest>=8.0.0", ] examples = [ "matplotlib>=3.8.0", diff --git a/src/devol/py.typed b/src/devol/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/uv.lock b/uv.lock index 24d0569..0a11ea2 100644 --- a/uv.lock +++ b/uv.lock @@ -135,7 +135,6 @@ dependencies = [ { name = "pydantic" }, { name = "pydantic-settings" }, { name = "pydantic-yaml" }, - { name = "pytest" }, { name = "torch" }, { name = "torchvision" }, ] @@ -168,8 +167,7 @@ requires-dist = [ { name = "pydantic", specifier = ">=2.0.0" }, { name = "pydantic-settings", specifier = ">=2.0.0" }, { name = "pydantic-yaml", specifier = ">=1.6.0" }, - { name = "pytest", specifier = ">=8.4.2" }, - { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" }, { name = "rich", marker = "extra == 'benchmark'", specifier = ">=13.0.0" }, { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.1.0" }, { name = "torch", specifier = ">=2.9.0" },