Skip to content

Commit

Permalink
Update project to use Poetry (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
brennenho authored Aug 10, 2024
2 parents 34bfa0f + 180fdd9 commit a102f48
Show file tree
Hide file tree
Showing 9 changed files with 1,521 additions and 41 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read
Expand All @@ -29,8 +32,9 @@ jobs:
with:
python-version: 3.12

- name: install dev tools
run: pip install -v --no-cache -r requirements.dev.txt
- name: install ruff
run: |
pip install ruff
- name: run ruff
run: |
Expand All @@ -52,11 +56,14 @@ jobs:

- name: install dependencies
run: |
pip install -v --no-cache -r requirements.dev.txt
pip install -v --no-cache -r requirements.txt
pip install poetry
poetry config virtualenvs.in-project true
poetry install
- name: run mypy
run: mypy .
run: |
source .venv/bin/activate
mypy .
tests:
runs-on: ubuntu-latest
Expand All @@ -71,10 +78,13 @@ jobs:
with:
python-version: 3.12

- name: install dev tools
- name: install dependencies
run: |
pip install -v --no-cache -r requirements.dev.txt
pip install -v --no-cache -r requirements.txt
pip install poetry
poetry config virtualenvs.in-project true
poetry install
- name: run pytest
run: pytest
run: |
source .venv/bin/activate
pytest
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: build distributions
run: |
python -m pip install build
python -m build
python -m pip install poetry
poetry build
- name: upload distributions
uses: actions/upload-artifact@v4
Expand Down
2 changes: 0 additions & 2 deletions .mypy.ini

This file was deleted.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Post-it
# :bookmark_tabs: Post-It

A flexible Python data tagging framework for pre-training of AI models.
[![checks](https://github.com/brennenho/post-it/actions/workflows/checks.yml/badge.svg)](https://github.com/brennenho/post-it/actions/workflows/checks.yml)

A flexible data tagging framework for processing and filtering pretraining corpora for AI models.

## Installation

Install from PyPi with `pip install postit`.

## Contributing

- Clone this repo
- Install [Poetry](https://python-poetry.org/docs/)
- Activate Poetry: `poetry shell`
- Install dependencies: `poetry install`
1,461 changes: 1,461 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
39 changes: 22 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"


[project]
[tool.poetry]
name = "postit"
version = "0.0.1"
description = "A flexible Python data tagging framework for pre-training of AI models."
version = "0.0.2"
description = "A flexible data tagging framework for processing and filtering pretraining corpora for AI models."
authors = ["Brennen Ho <post-it@brennen.dev>"]
readme = "README.md"
authors = [
{ name="Brennen Ho", email="post-it@brennen.dev" },
]

[project.urls]
Homepage = "https://github.com/brennenho/post-it"
Issues = "https://github.com/brennenho/post-it/issues"
[tool.poetry.dependencies]
python = "^3.12"
gcsfs = "^2024.6.1"
rich = "^13.7.1"
mmh3 = "^4.1.0"
bitarray = "^2.9.2"

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.2"
ruff = "^0.5.7"
mypy = "^1.11.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff.lint]
extend-select = ["I"]

[tool.ruff.lint.isort]
lines-between-types = 1
no-sections = true
no-sections = true

[tool.mypy]
disable_error_code = ["import-untyped"]
5 changes: 0 additions & 5 deletions requirements.dev.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

0 comments on commit a102f48

Please sign in to comment.