Skip to content

Commit

Permalink
Exchange to pyproject.toml
Browse files Browse the repository at this point in the history
Update pyproject.toml

Update imports to relative
  • Loading branch information
cehune committed Sep 12, 2024
1 parent afb18dd commit 4873bf6
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "file_auto_expiry"
version = "0.0.1"
description = "WATCloud project containing scripts to check if directories / files are expired"
readme = "README.md"
requires-python = ">=3.7, <4"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3",
]

[tool.setuptools]
package-dir = {""= "src"}

[tool.setuptools.packages.find]
where = ["src"] # Tell setuptools to find packages in the "src" directory

[project.optional-dependencies]
dev = ["check-manifest"]
test = ["coverage"]
27 changes: 0 additions & 27 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/file_auto_expiry/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from utils.interface import *
from data.expiry_constants import SECS_PER_DAY
from .utils.interface import *
from .data.expiry_constants import SECS_PER_DAY
import time
import typer
app = typer.Typer()
Expand Down
9 changes: 5 additions & 4 deletions src/file_auto_expiry/utils/expiry_checks.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os
import stat
from data.expiry_constants import *
from data.expiry_constants import DIRECTORIES_TO_IGNORE
from data.tuples import *
from utils.file_creator import *
from ..data.expiry_constants import *
from ..data.expiry_constants import DIRECTORIES_TO_IGNORE
from ..data.tuples import *
from .file_creator import *


def is_expired(path, expiry_threshold):
""" Interface function to return if a file-structure is expired or not.
Expand Down
2 changes: 1 addition & 1 deletion src/file_auto_expiry/utils/file_creator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import pwd
from data.tuples import *
from ..data.tuples import *

def get_file_creator(path):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/file_auto_expiry/utils/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import json
import datetime
import time
from data.expiry_constants import *
from data.tuples import *
from utils.expiry_checks import is_expired
from ..data.expiry_constants import *
from ..data.tuples import *
from .expiry_checks import is_expired

def get_file_creator(path):
"""
Expand Down

0 comments on commit 4873bf6

Please sign in to comment.