Commit Graph

106 Commits

Author SHA1 Message Date
de102f33d9 fix: fix hero mdbook command 2025-01-14 15:34:02 +02:00
2a673553f1 fix hero for git 2025-01-14 11:53:28 +01:00
0b780b6901 fix: correct generator command and templates
- Correct the `generator` command to use a string flag for the path.
- Update templates to use correct heap allocation annotation.
- Remove unnecessary code in templates.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-14 11:41:50 +02:00
dac3b61116 Merge pull request #18 from freeflowuniverse/development_actions
Development actions
2025-01-13 18:59:22 +02:00
81f377a532 test: improve logger test and search functionality
- Improve the logger test to include more specific assertions.
- Add timestamp filtering to the logger search function.
- Fix a bug in the logger search function that prevented it from correctly handling continuation lines.
- Update redisclient tests to use the correct return type.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-13 18:46:13 +02:00
91f8520229 refactor: improve redis client and publisher
- Refactor the redis client to use a mutex for thread safety.
- Improve error handling in context and playbook factory.
- Remove the play_mdbook command and associated tests.
- Add play_publisher command and tests for publishing books.
- Update the repository cache to use a reference to the redis client.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-13 16:52:21 +02:00
da2881f973 refactor: improve rclone client factory
- Refactor the rclone client factory to improve its
  organization and functionality.
- Add support for multiple rclone instances with named
  instances.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-12 18:31:16 +02:00
67fc3b4a99 feat: improve OpenAI client
- Updated the OpenAI client to use environment variables for API keys.
- Improved the configuration and management of OpenAI clients.
- Added retry mechanism to HTTP requests for improved reliability.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-12 16:33:48 +02:00
4619a0759f Merge pull request #16 from freeflowuniverse/development_actions
Development actions
2025-01-12 14:22:58 +02:00
9e52132e4c ... 2025-01-12 13:18:56 +01:00
9083fccb58 test: improve robustness of incremental counter tests
- Replace `lut.incremental!` with a safer check using `if v := lut.incremental`.
- This ensures that the test doesn't panic if `incremental` is unexpectedly nil.
- The new assertions explicitly check for the existence of a value and its correctness.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-12 14:15:18 +02:00
5753e0eb58 refactor: improve collection export
- Remove unnecessary parameter from `errors_report` function.
- Pass `Collection` by mutable reference to `export` function.
- Fix `.collection` file content in export test.
- Update test cases to reflect changes.
- Correct path in test data.
- Use mutable reference for `col` in `Tree.export`.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-01-12 14:06:21 +02:00
Mahmoud Emad
58a1f04a44 test: fix: handle potential null error in ping
- Updated assertions in `ipaddress_test.v` to handle potential null errors returned by the `ping` method.
2025-01-09 13:39:20 +02:00
Mahmoud Emad
3b580dcc1d fix: improve gitea and postgresql installation
- Improve the installation process for Gitea and PostgreSQL.
- Change the location of the Gitea config file to `/etc`.
- Add a health check for the PostgreSQL container.
- Ensure the Gitea user is created only if it doesn't exist.
- Add a restart command for Gitea to ensure it starts after.
- Improve error handling during user creation.
- Simplify PostgreSQL configuration in Gitea actions.
2025-01-09 13:31:57 +02:00
a63bba4558 fixes in gitea
Co-authored-by: omda <mahmmoud.hassanein@gmail.com>
2025-01-08 21:22:49 +02:00
Mahmoud Emad
de7c3ad36c fix: improve gitea installation
- Replace `osal.cmd_add` with explicit `cp` and `chmod`
- commands for more robust installation.
- This ensures gitea is correctly added to the path and
- made executable, providing better error handling.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-08 14:22:34 +02:00
Mahmoud Emad
d7efbeb53f fix: correct typo in Gitea SMTP port configuration
- Corrected a typo in the Gitea SMTP port configuration
- across multiple files: `gitea.vsh`, `gitea_model.v`,
- `server.v`, and `app.ini`.  The incorrect `smpt_port`
- was changed to the correct `smtp_port`.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-08 14:04:29 +02:00
Mahmoud Emad
7086a76a69 refactor: Simplify Gitea installer
- Remove unnecessary and incomplete code in `gitea_actions.v`.
- Simplify the `upload`, `startupcmd`, and `running` functions.
- Use a temporary file for the Gitea configuration.
- Implement a simpler health check using `curl`.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-08 13:41:24 +02:00
Mahmoud Emad
d6cb55abb1 feat: enable Gitea auto-start
- The Gitea installer now automatically starts the Gitea server after installation.
- Updated the installer to include a `start()` function.
- Added PostgreSQL installation and configuration to the Gitea installer.
- Improved error handling and logging.
- Updated configuration file template for better clarity and consistency.
- Renamed some variables for better readability.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-08 12:26:03 +02:00
Mahmoud Emad
e2a2f22571 refactor: improve gitea installer
- Refactor the Gitea installer to use a more robust and.
- configurable approach.  The installer now uses a more.
- flexible configuration system and handles different.
- platforms more effectively.  The installation process.
- is now more modular and easier to maintain.  The.
- previous method was overly simplistic and lacked.
- essential configuration options.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-08 11:43:01 +02:00
Mahmoud Emad
d631cc5af7 refactor: Migrate Gitea to Podman
- Migrate Gitea installation to use Podman containers.
- This simplifies the installation process and improves
- portability.  Removes reliance on direct binary
- downloads and manual installation steps.  The
- Gitea instance is now managed as a container.
- Updates configuration to reflect container-based
- deployment.  Updates version to 'latest' to
- leverage Podman's image management capabilities.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-06 17:12:59 +02:00
Mahmoud Emad
288bfd54d8 refactor: improve zinit process handling
- Improved error handling in `get` method of Zinit struct.
- Changed the return type of `new()` function in `zinit_factory.v` to `!&Zinit`.
- Updated `zinit_global_manager` to hold references to `Zinit` instances.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-06 16:40:52 +02:00
Mahmoud Emad
a19867c00b fix: Improve Postgresql healthcheck
- Remove unnecessary error return in `installed_()`.
- Remove `workdir` from `startupcmd()` as it's not needed.
- Simplify healthcheck to only return boolean.

Co-authored-by: mariobassem12 <mariobassem12@gmail.com>
2025-01-06 15:43:33 +02:00
Mahmoud Emad
51fb692f15 fix: Use container name instead of the server name 2025-01-06 15:29:20 +02:00
Mahmoud Emad
f6b08bb1bc refactor: Migrate PostgreSQL installer to Podman
- Replaced the previous systemd-based PostgreSQL installer with a
Podman-based solution. This simplifies the installation process
and improves compatibility across different Linux distributions.
- The new installer uses Podman containers to manage the
PostgreSQL database, eliminating the need for complex systemd
configurations and package management.
- This change enhances portability and reduces the risk of
conflicts with existing system packages.  The destroy_ function
now cleanly removes the Podman container.  The installed_ and
check functions now verify the container's health.

Co-authored-by: mario <mariobassem12@gmail.com>
2025-01-06 15:26:06 +02:00
Mahmoud Emad
5c0acf5678 refactor: Update PostgreSQL installer
- Updated PostgreSQL installer to use volume path instead of server path.
- Updated connection string to include user, password, host, and port.
- Updated import statements to use herolib instead of crystallib.
- Updated readme files to reflect changes.

Co-authored-by: mariobeh <mariobassem12@gmail.com>
2025-01-06 13:38:47 +02:00
Mahmoud Emad
704ad6d3ac refactor: remove unused imports
- Remove unused imports from postgresql and podman modules.

Co-authored-by: mariobassem <mariobassem12@gmail.com>
2025-01-06 13:30:25 +02:00
Mahmoud Emad
61b210d7e0 refactor: improve Podman installer
- Refactor Podman installer to use a more robust approach
- Improve error handling and clarify the installation/removal
- Update example usage to reflect changes

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-06 12:51:46 +02:00
Mahmoud Emad
624639f87e refactor: simplify podman installer
- Simplify the Podman installer code.
- Remove unnecessary functions and improve code structure.
- Update the installer to support more platforms.
- Improve error handling and logging.
- Update Podman version to 4.9.3.
2025-01-06 12:16:29 +02:00
f7309f2433 wip: fix gitea & postgresql installers
Co-authored-by: omda <mahmmoud.hassanein@gmail.com>
2025-01-05 19:29:54 +02:00
Mahmoud Emad
d5d5eab855 refactor: Improve parser_line.v code clarity
- Changed the conditional check in `next_start`, `next_start_lf`, and `ensure_last_is_paragraph` functions to improve readability.  The original `!is` check was slightly less clear.  This change uses the `!` operator more consistently and makes the intention clearer.
2025-01-05 16:10:43 +02:00
67c3cc3579 Merge branch 'development' of github.com:freeflowuniverse/herolib into development 2025-01-05 14:02:14 +01:00
315c694ac9 waiting for gitea 2025-01-05 14:02:11 +01:00
Mahmoud Emad
b2adba48af test: remove unnecessary println statements
- Remove `println` statements from `currency_test.v`.

Co-authored-by: 3mmario <mariobassem12@gmail.com>
2025-01-05 12:02:51 +02:00
Mahmoud Emad
663f9f347a test: improve dbfs tests
- Remove a placeholder panic in `dbfs_test.v`.
- Improve `namedb_test.v` by using `get_from_id` to
  retrieve public keys by ID and then using `get` to
  retrieve the data associated with the public key.  This
  better reflects the intended usage and clarifies the test.

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-05 11:43:31 +02:00
a19480ecfd refactor: standardize imports and clean up commented code across modules 2025-01-03 00:29:37 +02:00
Mahmoud Emad
4c01c88b85 WIP: Building hero
- The work is still in progress

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-02 19:01:37 +02:00
Mahmoud Emad
2e14b7b7af fix: improve git url parsing and deployment
- Improve the parsing of Git URLs to correctly handle paths and branches.
- Fix an issue where the `griddriver` installer was not correctly
- installed.
- Fix a bug in the `IPAddress` `ping` function.
- Update the `GitLocation` struct to correctly handle branches and
- tags.
- Fix a bug in the `GitRepo` `checkout` function.
- Improve the `gitlocation_from_url` function to handle various Git
- URL formats.
- Update the `livekit` installer to use the correct source command.
- Update the `golang` installer to use the correct `go version`
- command.
- Update the `griddriver` installer to use the correct version
- command.

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-02 13:35:36 +02:00
36f41150c2 postgresql & new docs 2025-01-01 17:44:06 +01:00
b927fc5b5d ggolang install ok 2025-01-01 15:25:58 +01:00
914e1f5073 had to cleanup a lot in relation to optional returns 2025-01-01 13:40:24 +01:00
cffd5e2f9c fixed installers 2025-01-01 10:16:41 +01:00
023adb4ec7 ... 2024-12-31 17:23:25 +01:00
7eded9ff28 fixes 2024-12-31 18:19:16 +02:00
849e1f1f2f add delete script for vm_caddy && fixes 2024-12-31 18:06:24 +02:00
694def6336 fixes in vm_caddy example 2024-12-31 17:37:58 +02:00
b5fde070b3 fixes 2024-12-31 15:14:13 +02:00
4233f9c3d1 fix imports 2024-12-31 15:11:57 +02:00
92335f8828 fixes for formatting 2024-12-31 11:00:02 +01:00
8400bfc4ee Merge branch 'main_openai_fixes' into development_actions
* main_openai_fixes:
  wip: add tests for openai client
  fix crystallib imports
  fixes in openai client

# Conflicts:
#	examples/hero/generation/openapi_generation/example_actor/actor.v
#	examples/hero/openapi/actor.vsh
#	examples/hero/openapi/server.vsh
2024-12-31 10:23:20 +01:00