Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0.0 #61

Merged
merged 133 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
faf60d0
acacore.init - fix missing reference_files export
MatteoCampinoti94 Oct 15, 2024
7e464ea
models.file:File.from_file - accept str and PathLike arguments for pa…
MatteoCampinoti94 Oct 15, 2024
6cc868a
models.file:OriginalFile,ConvertedFile - add models for new database …
MatteoCampinoti94 Oct 15, 2024
03522dd
models.file,.history - remove DBField
MatteoCampinoti94 Oct 17, 2024
7049fd4
poetry - use orjson ^3.10.7
MatteoCampinoti94 Oct 17, 2024
81c4eaa
utils.functions:image_size - use Pillow as fallback if a ValueError e…
MatteoCampinoti94 Oct 17, 2024
e9bed81
tests.database - remove databases tests
MatteoCampinoti94 Oct 17, 2024
06fb22f
workflows.test - separate pytest and coverage steps
MatteoCampinoti94 Oct 17, 2024
ed06767
workflows.test - run linting on all files
MatteoCampinoti94 Oct 17, 2024
05e8597
workflows.test - remove echo from version test that prevented it from…
MatteoCampinoti94 Oct 17, 2024
972212d
tests.siegfried - remove unnecessary parentheses
MatteoCampinoti94 Oct 17, 2024
e585513
database - rewrite database from scratch to be simpler and easier to use
MatteoCampinoti94 Oct 17, 2024
b02b793
models.history:HistoryEntry - rename to Event
MatteoCampinoti94 Oct 17, 2024
36e6e03
models.history:Event.command_event - rename to from_command
MatteoCampinoti94 Oct 17, 2024
1c9f1cf
models.history,utils.click - update docstrings using HistoryEntry
MatteoCampinoti94 Oct 17, 2024
699db12
models.history - rename to event
MatteoCampinoti94 Oct 17, 2024
39a8f6b
database.database:Database - add tables and views methods to get a li…
MatteoCampinoti94 Oct 21, 2024
b3dc938
database.database:Database.is_open - add method to check if connectio…
MatteoCampinoti94 Oct 21, 2024
bfbd2e5
database.table_keyvalue:KeysTable - add name property
MatteoCampinoti94 Oct 21, 2024
a220c75
database.files_db:FilesDB - add methods to check if database is initi…
MatteoCampinoti94 Oct 21, 2024
4fe92c3
database.files_db:FilesDB - do not create tables at init
MatteoCampinoti94 Oct 21, 2024
a7abcc0
database.files_db:FilesDB.upgrade - add placeholder method
MatteoCampinoti94 Oct 21, 2024
9c9def4
database.files_db:FilesDB.version - ensure return type is Version
MatteoCampinoti94 Oct 21, 2024
e394650
tests.databases:version1 - remove unused test file
MatteoCampinoti94 Oct 21, 2024
fb0fbd6
siegfried.siegfried:SiegfriedMatch.match_class - can only be list
MatteoCampinoti94 Oct 22, 2024
2e75958
models.reference_files:CustomSignature.operator - use Literal type
MatteoCampinoti94 Oct 22, 2024
59c5823
models.reference_files:CustomSignature.match - add method to match ag…
MatteoCampinoti94 Oct 22, 2024
ea42242
models.file:BaseFile,OriginalFile,MasterFile,ConvertedFile - split Fi…
MatteoCampinoti94 Oct 22, 2024
c8eae3d
models.file:MasterFile - add fields and methods to MasterFile
MatteoCampinoti94 Oct 22, 2024
210509c
models.file:ConvertedFile - add from_file class method
MatteoCampinoti94 Oct 22, 2024
f91d307
models.file:MasterFile - subclass ConvertedFile instead of BaseFile
MatteoCampinoti94 Oct 22, 2024
ffcd856
database.files_db:FilesDB - fix incorrect name for access files table
MatteoCampinoti94 Oct 22, 2024
6505990
database.files_db:FilesDB - add index on original_uuid column in mast…
MatteoCampinoti94 Oct 22, 2024
1090ed1
models.file:MasterFile.from_file,.get_action - pass actions as dict[s…
MatteoCampinoti94 Oct 22, 2024
2bf38a4
models.file - do not use implicit None types
MatteoCampinoti94 Oct 22, 2024
0372526
models.reference_files:IgnoreAction - ensure reason is not an empty o…
MatteoCampinoti94 Oct 22, 2024
cecbfc7
models.reference_files - remove unnecessary PyCharm inspection except…
MatteoCampinoti94 Oct 22, 2024
c761bfa
models.reference_files:CustomSignature.match - fix incorrect variable…
MatteoCampinoti94 Oct 22, 2024
bf9972c
models.reference_files:IgnoreAction._validate_mode - fix missing pare…
MatteoCampinoti94 Oct 22, 2024
0a5dbfe
database.cursors:Cursors - rename entries to row
MatteoCampinoti94 Oct 22, 2024
e70916a
database.cursors:Cursor._rows - rename to _row
MatteoCampinoti94 Oct 22, 2024
a571a04
models.file:get_identifier - use auxiliary function to get an action …
MatteoCampinoti94 Oct 23, 2024
3a765f8
utils.log:setup_logger - fix shadowed file names
MatteoCampinoti94 Oct 23, 2024
ac54480
utils.click - fix FilesDB imports and tables and shadowed names
MatteoCampinoti94 Oct 23, 2024
934cdf6
tests.conftest,.siegfried - move siegfried_folder fixture to conftest
MatteoCampinoti94 Oct 24, 2024
bf77305
tests.models_file - add tests for file models
MatteoCampinoti94 Oct 24, 2024
eb2e221
tests.linting - remove unused tests
MatteoCampinoti94 Oct 24, 2024
ec08a23
tests.models_file - use all files, account for special reidentify and…
MatteoCampinoti94 Oct 24, 2024
f859e53
models.event,.file - fix incorrect UUID type
MatteoCampinoti94 Oct 24, 2024
ae81720
tests.models_event - add tests for event model
MatteoCampinoti94 Oct 24, 2024
839f28e
database.table_view - add ignore parameter to be passed to underlying…
MatteoCampinoti94 Oct 24, 2024
66d4b67
database.database - add `__enter__` and `__exit__` methods
MatteoCampinoti94 Oct 24, 2024
ebf84c2
database.files_db:FilesDB.identification_warnings - ignore "root" field
MatteoCampinoti94 Oct 24, 2024
f28a425
database.files_db:ActionCount.action - can be None
MatteoCampinoti94 Oct 24, 2024
ebf2735
database.files_db:FilesDB.signatures_count - fix missing signature in…
MatteoCampinoti94 Oct 24, 2024
fab9305
database.table,.table_view - add `__len__` method
MatteoCampinoti94 Oct 24, 2024
178bce2
tests.database - add database tests
MatteoCampinoti94 Oct 24, 2024
42db98e
database.database:Database.exit - remove unnecessary call to is_open
MatteoCampinoti94 Oct 25, 2024
e26d597
database = use private type variables (with leading underscore)
MatteoCampinoti94 Oct 25, 2024
c6d8921
database - remove unnecessary explicit TypeAlias type
MatteoCampinoti94 Oct 25, 2024
e8843c0
Merge branch 'main' into dev-matca
MatteoCampinoti94 Oct 29, 2024
7d484ad
Merge branch 'main' into dev-matca
MatteoCampinoti94 Oct 29, 2024
e1ae92a
models.file:BaseFile.suffix - do not lower
MatteoCampinoti94 Nov 1, 2024
edac5f8
models.file:BaseFile.stem - get stem based on suffixes
MatteoCampinoti94 Nov 1, 2024
5173f4e
models.file:OriginalFile.original_name - rename to original_path and …
MatteoCampinoti94 Nov 1, 2024
d75b678
models.event:Event - rename uuid to file_uuid and add file_type to di…
MatteoCampinoti94 Nov 6, 2024
0f982c7
database.files_db:EventPath.relative_path - rename to file_relative_path
MatteoCampinoti94 Nov 6, 2024
0b626b3
database.files_db:FilesDB - update log_paths view to get paths for bo…
MatteoCampinoti94 Nov 6, 2024
29cf023
tests.database:insert_select - update initialization of Event object
MatteoCampinoti94 Nov 6, 2024
11d95dd
database.files_db:FilesDB.log,.log_paths - fix incorrect index and jo…
MatteoCampinoti94 Nov 6, 2024
438c85d
models.event:Event.from_command - rename uuid parameter to file and u…
MatteoCampinoti94 Nov 6, 2024
3b7f0ff
models.event:Event.log - add file type to log, fix incorrect variable…
MatteoCampinoti94 Nov 6, 2024
32c6ac6
tests.models_event - fix incorrect parameter names
MatteoCampinoti94 Nov 6, 2024
b04df7e
tests.models_file - fix incorrect field name
MatteoCampinoti94 Nov 6, 2024
0171603
Merge branch 'main' into dev-matca
MatteoCampinoti94 Nov 6, 2024
ce2bcd1
database.upgrade - remove old upgrade functions, use only Connection …
MatteoCampinoti94 Nov 6, 2024
0bc49ac
database.files:FilesDB.upgrade - check if database is initialized and…
MatteoCampinoti94 Nov 6, 2024
24f0c13
database.files:FilesDB - check database version at init if it is init…
MatteoCampinoti94 Nov 6, 2024
b177e52
database.files:FilesDB.is_initialised - check version as well
MatteoCampinoti94 Nov 6, 2024
83390ab
poetry - use orjson ^3.10.11
MatteoCampinoti94 Nov 6, 2024
0ffb40e
poetry - use pillow ^11.0.0
MatteoCampinoti94 Nov 6, 2024
81f7bdb
database.files:FilesDB.all_files - add view with all files
MatteoCampinoti94 Nov 6, 2024
0c3db11
database.files:FilesDB.all_files - format SQL select statement
MatteoCampinoti94 Nov 6, 2024
0bd7adb
database.files:FilesDB.init - create all_files view
MatteoCampinoti94 Nov 6, 2024
3e393df
tests.database - test all_files view
MatteoCampinoti94 Nov 6, 2024
c6388ee
database.upgrade:get_db_version - catch OperationError exceptions
MatteoCampinoti94 Nov 12, 2024
750fe9f
version - major 3.3.2 > 4.0.0
MatteoCampinoti94 Nov 12, 2024
51a7052
database.files_db:FilesDB - add init parameters to check version and …
MatteoCampinoti94 Nov 12, 2024
4196e9e
database.upgrade:get_db_version - fix version number not being JSON-p…
MatteoCampinoti94 Nov 12, 2024
a1331ff
database.upgrade - fix incorrect import
MatteoCampinoti94 Nov 12, 2024
b53d9d9
database.upgrade:get_db_version - fix incorrect return
MatteoCampinoti94 Nov 12, 2024
3db208c
utils.click:start_program - fix incorrect table name
MatteoCampinoti94 Nov 12, 2024
f23aa42
models.event:Event.file_type - add "access" and "statutory"
MatteoCampinoti94 Nov 20, 2024
2172527
models.reference_files:MasterConvertAction - add model for master con…
MatteoCampinoti94 Nov 20, 2024
4b940ef
Merge branch 'main' into v4
MatteoCampinoti94 Nov 21, 2024
1bfd08d
databases.files_db:FilesDB - only check initialisation if `check_init…
MatteoCampinoti94 Nov 21, 2024
14c36fb
databases.files_db:FilesDB.init - allow to run as class method with a…
MatteoCampinoti94 Nov 21, 2024
aeed57d
models.file.MasterFile - add processed property
MatteoCampinoti94 Nov 22, 2024
c089daf
tests.models_file:master_file - add processed property to test
MatteoCampinoti94 Nov 22, 2024
01bfbba
models.file:Masterfile.from_file - pass actions as `dict[str, MasterC…
MatteoCampinoti94 Nov 25, 2024
9737d03
models.file:Masterfile.get_action - allow to set both actions at once
MatteoCampinoti94 Nov 25, 2024
f41aa33
models.file:Masterfile.get_action - support Siegfried file classes
MatteoCampinoti94 Nov 25, 2024
709c15a
models.file:Masterfile.get_action - fix incomplete docstring
MatteoCampinoti94 Nov 25, 2024
bd7dc90
tests.models_file:master_file - update actions
MatteoCampinoti94 Nov 25, 2024
d8d6487
tests.models_file:master_file - better test
MatteoCampinoti94 Nov 25, 2024
d8f24f1
models.file:BaseFile.identify_custom - do not reset puid if there is …
MatteoCampinoti94 Nov 26, 2024
38fe40a
models.reference_files:MasterConvertAction - name field is optional
MatteoCampinoti94 Nov 26, 2024
ae5eda6
models.file:OriginalFile.identify - use separate method to identify f…
MatteoCampinoti94 Nov 27, 2024
3d9912e
models.file:ignore_if - do not modify input file, return new action a…
MatteoCampinoti94 Nov 27, 2024
0d97e1e
models.file - use class explicitly in from_file methods
MatteoCampinoti94 Nov 27, 2024
0bc027f
models.file:OriginalFile.identify - reorder parameters and skip if ne…
MatteoCampinoti94 Nov 27, 2024
58615e8
models.file:MasterFile.identify - use separate method to identify fil…
MatteoCampinoti94 Nov 27, 2024
48d97b8
models.file - add missing docstrings
MatteoCampinoti94 Nov 27, 2024
4abb0ce
models.file:BaseFile.from_file - add missing docstring
MatteoCampinoti94 Nov 27, 2024
7445252
models.file:OriginalFile.from_file - invert position of `custom_signa…
MatteoCampinoti94 Nov 27, 2024
725f57f
tests.models_file - adjust arguments
MatteoCampinoti94 Nov 27, 2024
ff5fd30
models.reference_files:RenameAction - remove unused action
MatteoCampinoti94 Nov 27, 2024
854128e
reference_files.get:get_master_actions - add function to get master a…
MatteoCampinoti94 Nov 27, 2024
ef4b64b
reference_files - export get_master_actions
MatteoCampinoti94 Nov 27, 2024
1b62d72
tests.reference_files - add test for `reference_files.get_master_acti…
MatteoCampinoti94 Nov 27, 2024
76ba244
tests.models_file:test_master_file - use actual master actions
MatteoCampinoti94 Nov 27, 2024
63abc1f
database.files_db - add docstrings
MatteoCampinoti94 Nov 27, 2024
b23d7ac
database.column - add docstrings
MatteoCampinoti94 Nov 27, 2024
0a97b9f
database.cursor - add docstrings
MatteoCampinoti94 Nov 27, 2024
6369609
database.files_db - update docstring
MatteoCampinoti94 Nov 27, 2024
98b0310
database.database - add docstrings
MatteoCampinoti94 Nov 27, 2024
3b1ae94
database.table - add docstrings
MatteoCampinoti94 Nov 27, 2024
d4662bb
database.table_keyvalue - add docstrings
MatteoCampinoti94 Nov 27, 2024
ec1fa86
database.table_view - add docstrings
MatteoCampinoti94 Nov 27, 2024
b43db44
database.database:Database.create_view - add ignore parameter
MatteoCampinoti94 Nov 27, 2024
55e3620
database.table_view - fix missing docstring param
MatteoCampinoti94 Nov 27, 2024
2b2b685
models.file:OriginalFile.get_action - if action is from alternatives,…
MatteoCampinoti94 Nov 27, 2024
fc624ad
poetry - use pydantic ^2.10.2, packaging ^24.2, orjson ^3.10.12
MatteoCampinoti94 Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
poetry-version: ${{ env.POETRY_VERSION }}
- run: poetry install
- name: ruff check
run: poetry run ruff check acacore
run: poetry run ruff check
- name: ruff format
run: poetry run ruff format --check acacore
run: poetry run ruff format --check

version:
name: Test Version
Expand All @@ -41,7 +41,6 @@ jobs:
version_package="${version_package%\"}"
version_package="${version_package#*\"}"
test "$version_project" = "$version_package"
echo $?

pytest:
name: pytest
Expand All @@ -60,9 +59,9 @@ jobs:
- uses: actions/setup-go@v5
- run: poetry install
- run: go install github.com/richardlehane/siegfried/cmd/sf@latest
- name: Unit test
- name: pytest
env:
GOPATH: /home/runner/go
run: |
poetry run coverage run -m pytest
poetry run coverage report -m --fail-under=80 --skip-empty --skip-covered
run: poetry run coverage run -m pytest
- name: coverage
run: poetry run coverage report -m --fail-under=80 --skip-empty --skip-covered
1 change: 1 addition & 0 deletions acacore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from . import database
from . import exceptions
from . import models
from . import reference_files
from . import siegfried
from . import utils
2 changes: 1 addition & 1 deletion acacore/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.3.3"
__version__ = "4.0.0"
7 changes: 1 addition & 6 deletions acacore/database/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
from . import upgrade
from .base import Column
from .base import model_to_columns
from .base import SelectColumn
from .base import Table
from .files_db import FileDB
from .files_db import FilesDB
Loading
Loading