Commit Graph
100 Commits
Author SHA1 Message Date
Gustavo Henrique Santos Souza de Miranda fcbf465c43 Merge branch 'staging' into test/entryservice-unit-test 2025-07-20 18:08:11 -03:00
Gustavo Henrique Miranda 4dda85d8a3 Merge pull request #62 from gmbrax/fix/model-entry-nullable-fields
fix the entry model to not allow the title nor the date to be null
2025-07-20 17:53:27 -03:00
Gustavo Henrique Santos Souza de Miranda 5a28afc540 fix the entry model to not allow the title nor the date to be null 2025-07-20 17:34:57 -03:00
Gustavo Henrique Santos Souza de Miranda 77e191f480 test(entry_service): add test for creating an entry without photos
This commit adds a unit test to ensure that the EntryService's
`create` method correctly handles cases where an empty list of photos
is provided.

It verifies that the entry is created successfully and that the
`photos` relationship is an empty list, confirming the feature's
flexibility.
2025-07-20 16:03:45 -03:00
Gustavo Henrique Santos Souza de Miranda 3c7925cb1c test(entry_service): add a failure case test for create method
This commit adds a unit test for an important "unhappy path" in the
EntryService's `create` method.

It specifically verifies that the method gracefully returns `None`
when provided with a `travel_diary_id` that does not exist in the
database, ensuring the initial guard clause works as expected.
2025-07-20 15:21:49 -03:00
Gustavo Henrique Santos Souza de Miranda c4dceda942 test(entry_service): add unit test for creating a new entry
This commit introduces the first unit test for the EntryService,
covering the "happy path" for the `create` method.

It verifies that a new entry is correctly persisted to the database,
including its relationship with associated Photo objects. The test
leverages fixtures to create an isolated, in-memory database
populated with the necessary dependencies.
2025-07-20 03:35:22 -03:00
Gustavo Henrique Miranda 4d87ae1b90 Merge pull request #61 from gmbrax/fix/relative-imports
Fix/relative imports
2025-07-20 03:27:31 -03:00
Gustavo Henrique Mirandaandcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> e1add84537 Update src/pilgrim/database.py
Remove Debug message

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-20 03:23:37 -03:00
Gustavo Henrique Santos Souza de Miranda 2ba1cbd0a6 Fix the declarative_base import to the newer way 2025-07-20 03:10:13 -03:00
Gustavo Henrique Santos Souza de Miranda eed16f34c1 Simplify the pyproject.toml 2025-07-20 02:47:05 -03:00
Gustavo Henrique Santos Souza de Miranda 06ee08b201 Fix all imports to be absolute and not relative 2025-07-20 02:46:46 -03:00
Gustavo Henrique Miranda 78e45e26fd Update pylint_sonarqube.yml
Fix the ruff error on the sonarcloud scan
2025-07-19 19:06:53 -03:00
Gustavo Henrique Miranda cc68bbcf2e Update pylint_sonarqube.yml
Add the missing parameters for SonarQube
2025-07-19 18:56:19 -03:00
Gustavo Henrique Miranda 9a698596b1 Update and rename pylint.yml to pylint_sonarqube.yml
Add RUFF and SonarQube scanning
2025-07-19 18:52:53 -03:00
Gustavo Henrique Miranda 0cbcbd3a8d Update CHANGELOG.md
Revert the markdown format missing from the last update
2025-07-19 17:40:01 -03:00
Gustavo Henrique Miranda a1e718c1fc Update CHANGELOG.md
Added info for the next alpha version 0.0.4
2025-07-19 17:34:05 -03:00
Gustavo Henrique Miranda 8919e158bc Merge pull request #60 from gmbrax/fix/Importing-duplicate-images
Fix the bug that collides the hash if identical images
2025-07-19 03:23:54 -03:00
Gustavo Henrique Santos Souza de Miranda 9e4b08234f Fix the bug that collides the hash if identical images 2025-07-19 00:16:29 -03:00
Gustavo Henrique Miranda 44ff390695 Merge pull request #59 from gmbrax/fix/remove-stale-hashing-methods
Refactor the edit and add photo modal and remove the hashing methods out of the modals
2025-07-18 02:41:29 -03:00
Gustavo Henrique Santos Souza de Miranda ca53ac7778 Remove the unused import and unused variable 2025-07-18 02:37:07 -03:00
Gustavo Henrique Santos Souza de Miranda 0567495ff9 Refactor the edit and add photo modal and remove the hashing methods out of the modals 2025-07-18 02:27:16 -03:00
Gustavo Henrique Miranda 18ff157eb7 Merge pull request #58 from gmbrax/fix/edit-photo-not-working
Fix the photo edit to properly pass the original photo hash that was missing
2025-07-18 01:39:13 -03:00
Gustavo Henrique Santos Souza de Miranda a9d39f415a Fix the photo edit to properly pass the original photo hash that was missing 2025-07-18 00:03:13 -03:00
Gustavo Henrique Miranda b14d775d87 Merge pull request #56 from gmbrax/fix/sidebar-layout
Improve the CSS and the code for the photo sidebar
2025-07-17 21:43:31 -03:00
Gustavo Henrique Santos Souza de Miranda 1d08f4e40d Change the CSS to better distribute the elements of the sidebar 2025-07-17 21:39:05 -03:00
Gustavo Henrique Santos Souza de Miranda 165bc10a63 Change the CSS to fit the text better and also limited the width of the sidebar 2025-07-17 20:48:59 -03:00
Gustavo Henrique Santos Souza de Miranda 71d5491233 Improve the CSS and the code for the photo sidebar 2025-07-17 20:32:54 -03:00
Gustavo Henrique Miranda a59af26c9d Merge pull request #55 from gmbrax/feat/use-a-toml-for-config
Feat/use a toml for config
2025-07-16 22:50:30 -03:00
Gustavo Henrique Santos Souza de Miranda 23ef60b55a Improve exception handling, remove debug print statements 2025-07-16 18:28:42 -03:00
Gustavo Henrique Mirandaandcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> 4436d5e081 Update src/pilgrim/utils/directory_manager.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-16 18:12:32 -03:00
Gustavo Henrique Santos Souza de Miranda a13c56a3a3 Fix the NewDiaryModal not accessing the toml file properly to set the auto_open flag 2025-07-16 17:24:45 -03:00
Gustavo Henrique Santos Souza de Miranda 967c7e4ce6 Fix the Database no being put on the right path according with the config.toml 2025-07-16 16:39:31 -03:00
Gustavo Henrique Santos Souza de Miranda bdaa37e355 Add the database file path now is read by the configuration file 2025-07-16 16:01:34 -03:00
Gustavo Henrique Santos Souza de Miranda a540347127 Add Tomli_w library to pyproject.toml 2025-07-16 15:31:19 -03:00
Gustavo Henrique Santos Souza de Miranda fe35cb93bd Move get_database_path from database.py to directory_manager.py 2025-07-16 15:30:47 -03:00
Gustavo Henrique Santos Souza de Miranda 3843be6e13 Add the tomli library and create the config_manager.py to manage the configuration file and also add the dependency injection on the ui.py via the Application class 2025-07-16 02:55:52 -03:00
Gustavo Henrique Miranda 0adb230dd7 Merge pull request #52 from gmbrax/fix/move-create-diary-to-modal
Change to call the method in the super class on the _on_screen_resume  method
2025-07-16 01:30:35 -03:00
Gustavo Henrique Santos Souza de Miranda 167c2d8928 Change to call the method in the super class on the _on_screen_resume method 2025-07-16 00:50:07 -03:00
Gustavo Henrique Miranda 5b0f894c88 Merge pull request #50 from gmbrax/fix/bump-version
Bump the version to 0.0.4 on about_screen.py and pyproject.toml
2025-07-16 00:42:42 -03:00
Gustavo Henrique Santos Souza de Miranda 2b851fc7c7 Add the use of importlib.metadata.version to keep the version string in sync with the pyproject.toml 2025-07-16 00:39:28 -03:00
Gustavo Henrique Santos Souza de Miranda a3123fe322 Bump the version to 0.0.4 on about_screen.py and pyproject.toml 2025-07-16 00:25:37 -03:00
Gustavo Henrique Miranda 1beeb39b95 Merge pull request #47 from gmbrax/fix/move-create-diary-to-modal
Fix/move create diary to modal
2025-07-15 18:14:09 -03:00
Gustavo Henrique Miranda 4f153c5a5b Merge branch 'development' into fix/move-create-diary-to-modal 2025-07-15 17:25:06 -03:00
Gustavo Henrique Santos Souza de Miranda f838a5b421 Add the auto-open option to the new_diary_modal.py 2025-07-15 15:51:30 -03:00
Gustavo Henrique Santos Souza de Miranda 18760e174c Add a functionality that automatically opens the diary after creation, Change the responsibility of diary creation to the new_diary_modal.py instead of the diary_list_screen.py 2025-07-15 02:14:53 -03:00
Gustavo Henrique Miranda 3bef353939 Merge pull request #42
Fixed the edit diary modal to accept the key "enter" and automatically the function
2025-07-14 18:24:14 -03:00
Gustavo Henrique Miranda a80ecc24f5 Merge pull request #43
Fixed the new diary modal to accept the key "enter" and automatically the function
2025-07-14 18:23:58 -03:00
Gustavo Henrique Miranda 7f193d0fbb Merge pull request #44 from gmbrax/dependabot/pip/textual-approx-eq-4.0.0
origin/dependabot/pip/textual-approx-eq-4.0.0
2025-07-14 18:17:49 -03:00
Gustavo Henrique Miranda 7dfeec20f1 Merge pull request #45 from gmbrax/dependabot/pip/typing-extensions-4.14.1
origin/dependabot/pip/typing-extensions-4.14.1
2025-07-14 18:17:32 -03:00
Gustavo Henrique Miranda d1545ad2e2 Merge branch 'staging' into dependabot/pip/typing-extensions-4.14.1 2025-07-14 18:17:15 -03:00
Gustavo Henrique Miranda 7dbb89b692 Merge pull request #40 from gmbrax/fix/add-enter-binding-edit-diary
Fix/add enter binding edit diary
2025-07-14 16:11:29 -03:00
Gustavo Henrique Miranda 33987507ac Merge pull request #41 from gmbrax/fix/add-enter-binding-on-create-diary
Fix/add enter binding on create diary
2025-07-14 16:11:17 -03:00
Gustavo Henrique Miranda ff97929dc0 Merge pull request #39 from gmbrax/dependabot/pip/textual-approx-eq-4.0.0
Dependabot/pip/textual approx eq 4.0.0
2025-07-14 16:02:45 -03:00
Gustavo Henrique Miranda 5d26c5394d Merge branch 'development' into dependabot/pip/textual-approx-eq-4.0.0 2025-07-14 16:02:35 -03:00
Gustavo Henrique Santos Souza de Miranda f174fd1d8a Fixed the edit diary modal to accept the key "enter" and automatically the function 2025-07-14 02:23:29 -03:00
Gustavo Henrique Santos Souza de Miranda c98a106d97 Fixed the new diary modal to accept the key "enter" and automatically the function 2025-07-14 02:06:25 -03:00
Gustavo Henrique Miranda 417bc0d3e5 Merge pull request #36
Fixed the bindings to properly work and changed some bindings to avoid conflicts with the system
2025-07-14 00:46:23 -03:00
Gustavo Henrique Miranda 1312674186 Merge pull request #35 from gmbrax/fix/bindings-not-properly-working
Fixed the bindings to properly work and changed some bindings to avoid conflicts with the system
2025-07-13 23:06:14 -03:00
Gustavo Henrique Santos Souza de Miranda afc6908f37 Fixed the bindings to properly work and changed some bindings to avoid conflicts with the system 2025-07-13 22:53:39 -03:00
Gustavo Henrique Miranda 2983be09b6 Merge pull request #33 from gmbrax/fix/force-rename-entry
Fixed the new entry creation flow by prompting for a title if none is  set.
2025-07-12 19:29:55 -03:00
Gustavo Henrique Miranda 8129ae77a6 Merge branch 'staging' into fix/force-rename-entry 2025-07-12 19:11:56 -03:00
Gustavo Henrique Miranda 8e04c5b3c7 Merge pull request #32 from gmbrax/fix/create-a-new-entry-on-open
Corrected the behavior to create a new entry upon opening a diary
2025-07-12 13:31:25 -03:00
Gustavo Henrique Santos Souza de Miranda b704a524c8 Fixed the new entry creation flow by prompting for a title if none is set. 2025-07-12 02:55:39 -03:00
Gustavo Henrique Santos Souza de Miranda 63db2517f3 Corrected the behavior to create a new entry upon opening a diary 2025-07-11 17:46:00 -03:00
Gustavo Henrique Miranda fcaf17b593 Update README.md 2025-07-08 19:01:26 -03:00
Gustavo Henrique Miranda 1e07ea49df Update README.md 2025-07-08 19:01:11 -03:00
Gustavo Henrique Miranda 60311bc714 Update README.md
changed the pip install to point to testpypi instead of the pypi and also added a way to get the dependencies from pypi
2025-07-08 18:59:33 -03:00
Gustavo Henrique Santos Souza de Miranda 5657645801 Merge branch 'docs/Update-Changelog' into staging
Added information about the version 0.0.2 and 0.0.3 on the changelog.md
2025-07-08 03:49:41 -03:00
Gustavo Henrique Santos Souza de Miranda 71cb79aa40 Updated CHANGELOG.md with release notes for versions 0.0.2 and 0.0.3. 2025-07-08 03:49:01 -03:00
Gustavo Henrique Miranda 7d882b5f21 Merge pull request #31 from gmbrax/fix/binding-not-working
Merge fix/binding-not-working to staging
2025-07-08 03:44:34 -03:00
Gustavo Henrique Santos Souza de Miranda 4f1740f575 Added on_footer_action handler to manage footer action clicks in EditEntryScreen. 2025-07-08 01:20:37 -03:00
Gustavo Henrique Miranda cc723bdbbb Merge pull request #30
Fixed the bug that didn't update the status bar when the use entered any new text.
2025-07-08 00:49:52 -03:00
Gustavo Henrique Miranda b73c4e12c8 Merge pull request #29
Added third-party library license details to `AboutScreen`.
2025-07-08 00:41:01 -03:00
Gustavo Henrique Miranda cc7f0ec53d Merge pull request #27 from gmbrax/dependabot/pip/typing-extensions-4.14.1
Bump typing-extensions from 4.14.0 to 4.14.1
2025-07-07 23:59:49 -03:00
Gustavo Henrique Miranda 3620889e71 Merge pull request #28 from gmbrax/dependabot/pip/textual-approx-eq-3.6.0
Update textual requirement from ~=3.3.0 to ~=3.6.0
2025-07-07 23:59:25 -03:00
Gustavo Henrique Santos Souza de Miranda 095c6f6ad5 Added third-party library license details to AboutScreen. 2025-07-07 23:06:49 -03:00
Gustavo Henrique Santos Souza de Miranda 8de20547c2 updated the pyproject.toml to remove an unsued dependency "Textual-Dev" 2025-07-07 22:50:51 -03:00
Gustavo Henrique Santos Souza de Miranda 0499229e07 Fixed the bug that didn't update the status bar when the use entered any new text. 2025-07-07 22:49:46 -03:00
Gustavo Henrique Santos Souza de Miranda 6af035c050 Merge branch 'staging'
Changed the pyproject.toml to removed the extraneous textual-dev and also changed the license to BSD tpcha
2025-07-07 02:54:05 -03:00
Gustavo Henrique Santos Souza de Miranda 6cf28e7470 Updated pyproject.toml with indentation adjustments, updated URLs, and license change to BSD. 2025-07-07 02:52:43 -03:00
Gustavo Henrique Miranda 11345203e5 Create CHANGELOG.md 2025-07-07 02:07:47 -03:00
Gustavo Henrique Miranda 543916a1a1 Update README.md 2025-07-07 02:06:28 -03:00
Gustavo Henrique Miranda 483c4b8529 Merge pull request #26 from gmbrax/staging
Staging
2025-07-07 02:01:27 -03:00
Gustavo Henrique Miranda 6724a66fed Merge pull request #24
Fix/binding not working
2025-07-06 03:38:20 -03:00
Gustavo Henrique Miranda a731d2adae Merge pull request #25
Merge fix/wrong-database-access to staging
2025-07-06 03:37:37 -03:00
Gustavo Henrique Santos Souza de Miranda 4dd5126d41 Changed back to use the entry_service.py and not call the database directly from the ui. 2025-07-06 03:26:06 -03:00
Gustavo Henrique Miranda 42c5471ba7 Merge branch 'development' into fix/binding-not-working 2025-07-06 03:10:24 -03:00
Gustavo Henrique Santos Souza de Miranda 8a10fddb14 Refactored bindings to use Binding class for consistency across modal and screen components. 2025-07-06 03:04:18 -03:00
Gustavo Henrique Miranda ad9d6ae3b5 Merge pull request #20 from gmbrax/feat/photo-copying-system-dir
Merging feat/photo-copying-system-dir to staging
2025-07-06 01:37:30 -03:00
Gustavo Henrique Miranda 20c56e2c1b Merge pull request #19 from gmbrax/feat/photo-copying-system-dir
Feat/photo copying system dir
2025-07-06 01:18:12 -03:00
Gustavo Henrique Santos Souza de Miranda 090bbeda1a Implemented directory management and improved TravelDiary and Photo handling logic.
- Added `DirectoryManager` utility for consistent directory operations.
- Introduced directory name sanitization and uniqueness enforcement for `TravelDiary`.
- Updated `TravelDiaryService` with enhanced creation, update, and deletion workflows, including filesystem management.
- Improved `PhotoService` to hash files, copy photos to specific diary directories, and manage updates safely.
- Refined error handling and cascaded changes across related entities (e.g., `Entry` relationships).
2025-07-06 01:07:25 -03:00
Gustavo Henrique Miranda b1e83aabbb Merge pull request #18 from gmbrax/feat/XDG-Compliance
Applying the XDG Compliance Branch to the Stagin Branch
2025-07-05 09:23:52 -03:00
Gustavo Henrique Miranda eb511ad756 Merge pull request #17 from gmbrax/feat/photo-reference-system
Feat/photo reference system
2025-07-05 09:19:02 -03:00
Gustavo Henrique Miranda 6438ef68a3 Merge pull request #16 from gmbrax/feat/XDG-Compliance
Feat/xdg compliance
2025-07-05 08:09:42 -03:00
Gustavo Henrique Santos Souza de Miranda ef8bc6cc0f Merge branch 'feat/photo-reference-system' into development 2025-07-05 07:47:02 -03:00
Gustavo Henrique Santos Souza de Miranda d114357d50 Changed the base directory where the data generated by the program to be at the home directory and also added a check to ensure the creation of the program directory 2025-07-05 07:29:09 -03:00
Gustavo Henrique Santos Souza de Miranda 394f813f6f Added few checks to the reference to avoid malformed or invalid reference from being saved. 2025-07-05 07:26:47 -03:00
Gustavo Henrique Santos Souza de Miranda bf29745265 Merge branch 'feat/photo-reference-system' into development 2025-07-05 06:51:13 -03:00
Gustavo Henrique Santos Souza de Miranda a9756b058e Changed some texts to be in english and also removed some debug messages. 2025-07-05 06:48:24 -03:00
Gustavo Henrique Miranda af7e25be53 Merge pull request #15 from gmbrax/feat/photo-reference-system
Feat/photo reference system
2025-07-05 06:28:53 -03:00