From 7244b78485fd4afa1efc581f41edce692528e3a0 Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 27 Feb 2024 10:00:10 +0100 Subject: [PATCH] restructure pyproject.toml --- pyproject.toml | 12 ++---------- src/rosinenpicker/__init__.py | 5 ----- src/rosinenpicker/data/pydantic_models.py | 2 +- src/rosinenpicker/processing/processors.py | 2 +- src/rosinenpicker/start.py | 12 ++++++------ 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 03d9bc7..eb67b0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,16 +2,8 @@ requires = ["hatchling"] build-backend = "hatchling.build" -[tool.hatch.build.targets.sdist] -exclude = [ - "pdfs/", - "configs/", - "testconfigs/", - ".github/", - "helper/", - "dumpster/", - "*.bat", -] +[tool.hatch.build.targets.wheel] +packages = ["src/rosinenpicker"] [project] name = "rosinenpicker" diff --git a/src/rosinenpicker/__init__.py b/src/rosinenpicker/__init__.py index 4397e93..e69de29 100644 --- a/src/rosinenpicker/__init__.py +++ b/src/rosinenpicker/__init__.py @@ -1,5 +0,0 @@ -import os -import site - -BASE_PATH = os.path.dirname(os.path.abspath(__file__)) -site.addsitedir(BASE_PATH) \ No newline at end of file diff --git a/src/rosinenpicker/data/pydantic_models.py b/src/rosinenpicker/data/pydantic_models.py index 2cfeedc..fe53941 100644 --- a/src/rosinenpicker/data/pydantic_models.py +++ b/src/rosinenpicker/data/pydantic_models.py @@ -1,5 +1,5 @@ from pydantic import BaseModel, DirectoryPath, field_validator, model_validator, NewPath -from processing.patterns import Pattern +from rosinenpicker.processing.patterns import Pattern from typing import Optional class ConfigError(Exception): diff --git a/src/rosinenpicker/processing/processors.py b/src/rosinenpicker/processing/processors.py index 7e8467b..fab18da 100644 --- a/src/rosinenpicker/processing/processors.py +++ b/src/rosinenpicker/processing/processors.py @@ -1,7 +1,7 @@ from pdfminer.high_level import extract_text from docx import Document import re -from processing.patterns import Pattern +from rosinenpicker.processing.patterns import Pattern class DocumentProcessor: text: str diff --git a/src/rosinenpicker/start.py b/src/rosinenpicker/start.py index 9e9826d..dc7db52 100644 --- a/src/rosinenpicker/start.py +++ b/src/rosinenpicker/start.py @@ -1,4 +1,4 @@ -__version__ = '0.1.14' +__version__ = '0.1.15' # see content of __init__.py import os import sys @@ -7,11 +7,11 @@ import shutil as sh import pathlib as pl import pandas as pd -from data.pydantic_models import Config, ConfigStrategy, ConfigError -from data.database import Base, DbRun, DbStrategy, DbProcessedFile, DbMatch -from utils.utils import file_sha256 -from processing.exporter import BaseExporter, CSVExporter, XLSXExporter, HTMLExporter, JSONExporter -from processing.processors import DocumentProcessor, PDFProcessor, TXTProcessor, DOCXProcessor +from rosinenpicker.data.pydantic_models import Config, ConfigStrategy, ConfigError +from rosinenpicker.data.database import Base, DbRun, DbStrategy, DbProcessedFile, DbMatch +from rosinenpicker.utils.utils import file_sha256 +from rosinenpicker.processing.exporter import BaseExporter, CSVExporter, XLSXExporter, HTMLExporter, JSONExporter +from rosinenpicker.processing.processors import DocumentProcessor, PDFProcessor, TXTProcessor, DOCXProcessor from sqlalchemy import create_engine, select from sqlalchemy.orm import sessionmaker, Session import argparse