Skip to content

Commit

Permalink
Refactor registration-library Python package
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-winkler committed Oct 18, 2024
1 parent ec9f077 commit c967354
Show file tree
Hide file tree
Showing 27 changed files with 11 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# VSCode
.vscode/
19 changes: 6 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "registration-library"
version = "0.0.1"
Expand All @@ -7,6 +11,7 @@ authors = [
]
description = "Common Library of the Resource Registration Building Block to harvest and register resources"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
Expand All @@ -22,7 +27,6 @@ dependencies = [
"psycopg2-binary",
"pika"
]
license = {file = "LICENSE"}

[project.optional-dependencies]
dev = [
Expand All @@ -44,21 +48,10 @@ Issues = "https://github.com/EOEPCA/registration-library/issues"
minversion = "6.0"
addopts = "-q --import-mode=importlib --no-header -rfE --disable-warnings --log-level=INFO"
testpaths = [
"tests",
"test",
"integration",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["src/registration-library"]


[tool.black]
line-length = 120
target-version = ["py38"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions tests/base/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import pytest

import requests
from lib.base.download import access_token

from registration_library.base.download import access_token

# Test if the function returns the existing token if it is not expired
def test_access_token_existing_valid_token(monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion tests/base/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import pytest
import zipfile
from lib.base.file import (
from registration_library.base.file import (
zip_directory,
delete_file,
unzip_file,
Expand Down

0 comments on commit c967354

Please sign in to comment.