Merge pull request #44 from IntersectMBO/upgrade_in_venv
fix(readme): update pip install command for safety
fix(readme): update pip install command for safety
Change pip install instructions to use -U and --require-virtualenv flags. This ensures users upgrade Cardonnay if already installed and prevents accidental global installations outside a virtual environment.
Merge pull request #42 from IntersectMBO/simplify_make_install
Mention `cardano-submit-api` as an optional dependency in the README to inform users about its availability and potential use.
fix(makefile): remove install_dev target and update install
fix(makefile): remove install_dev target and update install
The Makefile no longer includes a separate install_dev target. The install target now installs development dependencies by default using requirements-dev.txt.
docs(readme): add PyPI badge and update install command
Added a PyPI version badge to the README for better visibility of the latest release. Updated the installation instructions to use `pip install cardonnay` instead of `make install` for clarity and to align with standard Python package installation practices.
refactor: unify workdir argument naming across modules
Standardize the naming of the work directory argument from `work_dir` to `workdir` across all CLI modules and function signatures. This improves consistency and reduces confusion when passing or referencing the work directory parameter. Also, update all internal variable names and usage to match the new convention.
feat: add submit_api_port to InstanceInfo and extraction logic
- Introduce `get_submit_api_port` to extract the Submit API port from the `run-cardano-submit-api` file using regex. - Add `submit_api_port` field to `InstanceInfo` model. - Populate `submit_api_port` in `get_testnet_info` if available, otherwise set to None.
fix(inspect_instance): normalize supervisor.conf line endings
Replace set(readlines()) with a set comprehension that strips trailing carriage return and newline characters from each line in supervisor.conf. This ensures consistent line comparison regardless of platform-specific line endings and prevents subtle bugs when checking for program entries.
fix(instance): make start_pid optional if not positive
Previously, start_pid was always set as an integer, even if its value was not positive, which could lead to confusion or errors when a valid PID was not available. This change updates the InstanceInfo model to allow start_pid to be None, and ensures that get_testnet_info sets start_pid to None if it is not greater than zero. This improves clarity and correctness in representing the absence of a process ID.
feat: add pydantic models for structured JSON output
Refactor instance, pool, faucet, and config inspection commands to use pydantic models for structured JSON output. Update helpers to support printing pydantic models as JSON. Refactor CLI and inspect logic to return model-based data, improving type safety and consistency. Update README examples to match new output format. Add pydantic as a required dependency.
fix(cli): prevent create with custom workdir if default running
If a custom work directory is specified and there are running instances in the default workdir, the command now aborts with an error. This prevents conflicts and ensures users stop default instances before proceeding with a custom workdir.
refactor: rename cli_utils to ca_utils across codebase
Renamed the `cli_utils` module to `ca_utils` throughout the codebase for consistency and clarity.
feat(json): support Path and datetime in JSON output
fix(makefile): use 'command -v' instead of 'type' for twine check