- 21 Jul, 2022 2 commits
-
-
Anton Hvornum authored
-
Anton Hvornum authored
-
- 17 Jul, 2022 4 commits
-
-
David Runge authored
docs/conf.py: Add sphinxcontrib.programoutput to extensions and add the rendering of repod.conf(5) to the list of man pages. docs/repod/man/index.rst: Add rendered repod.conf man page to the man page section in the documentation.
-
David Runge authored
docs/repod/man/repod_conf.rst: Add a man page for repod.conf.
-
David Runge authored
poetry.lock: Update poetry lock file for added sphinxcontrib-programoutput.
-
David Runge authored
pyproject.toml: Add sphinxcontrib-programoutput to dev dependencies.
-
- 16 Jul, 2022 4 commits
-
-
David Runge authored
repod/cli/argparse.py: Change the arguments for `repod-file package import`, `repod-file management import`, `repod-file management export`, `repod-file syncdb export`, `repod-file syncdb import` to include indicators for whether to target staging or testing repository and to clarify that repositories are targetted by name, instead of targetting paths. repod/cli/cli.py: Change `repod_file_package()`, `repod_file_management()` and `repod_file_syncdb()` to require a Settings instance as well as clearly specifying which repository is targetted (stable, staging or testing). tests/cli/test_cli.py: Change tests for `repod_file_package()`, `repod_file_management()` and `repod_file_syncdb()` to reflect the changes in functionality. Change integration tests to target the previously setup repositories for output and input instead of relying on dummy directories.
-
David Runge authored
repod/config/settings.py: Add `Settings.get_repo_path()` to retrieve a stable, staging or testing directory management or package repo of a tracked `PackageRepo` by name. tests/conftest.py: Add `usersettings` fixture to provide a UserSettings instance in tests. tests/config/test_settings.py: Add parametrized tests for `Settings.get_repo_path()`.
-
David Runge authored
repod/common/enums.py: Add RepoTypeEnum with the members MANAGEMENT and PACKAGE to distinguish repository types.
-
David Runge authored
repod/config/settings.py: Rename PackageRepo._management_repo_dir to PackageRepo._stable_management_repo_dir and add PackageRepo._staging_maangement_repo_dir and PackageRepo._testing_management_repo_dir to provide the absolute paths to stable, staging and testing directories of a repository. tests/config/test_settings.py: Change `test_ensure_non_overlapping_repositories()` to also provide test cases in which staging and testing management repository directories reside in stable management repository directories. tests/conftest.py: Change fixture `packagerepo_in_tmp_path` to also populate the `_stable_management_repo_dir`, `_staging_management_repo_dir` and `_testing_management_repo_dir` private attributes.
-
- 13 Jul, 2022 8 commits
-
-
David Runge authored
repod/files/common.py: Change `compression_type_of_tarfile()` to ignore typing issues more specifically.
-
David Runge authored
repod/cli/cli.py: Change `repod_file()` to create an instance of `UserSettings` or `SystemSettings` (depending on ArgumentParser) to expose the configured repositories. Use `unittest.mock.patch` to override the default of `repod.config.settings.CUSTOM_CONFIG` if a custom configuration file is provided. tests/cli/test_cli.py: Change tests for `repod_file()` to also mock and check for calls to `SystemSettings` or `UserSettings`. Change `transform_databases()` to use a custom configuration file when calling `repod-file` to not interact with the user system (e.g. automatically create repository directories).
-
David Runge authored
repod/config/settings.py: Add `CUSTOM_CONFIG` global which can be used to set a configuration file override. Change `PackageRepo.validate_name()` to not raise on name being an absolute Path or a directory structure, as this way an override of the default base locations is enabled. Change `read_toml_configuration_settings()` to only read an override configuration file, if it is specified using `CUSTOM_CONFIG`. Change `Settings.consolidate_repositories_with_defaults()` to properly handle `repo.name` being an absolute path when setting `repo._management_repo_dir`. tests/config/test_settings.py: Change `test_read_toml_configuration_settings_user()` to also test the case where a custom configuration file is provided. Remove obsolete/ invalid test cases from `test_package_repo()`.
-
David Runge authored
repod/config/defaults.py: Add default values DEFAULT_ARCHITECTURE and DEFAULT_NAME to provide default CPU architecture and name. Sort globals alphabetically. repod/config/settings.py: Add global `DIR_MODE` to provide a default octal string for directory permissions. Add `to_absolute_path()` to provide the means to turn a relative path into an absolute one using a provided base. Add `create_and_validate_directory()` to create directories and ensure that they are directories and writable. Add `Settings.validate_management_repo()` to create a default `ManagementRepo` if none is defined. Add `Settings.validate_repositories()` to create a default `PackageRepo` if none is defined. Add `Settings.consolidate_and_create_repositories()` which calls the new classmethods `consolidate_repositories_with_defaults()`, `ensure_non_overlapping_repositories()` and `create_repository_directories()` to consolidate and validate `PackageRepos` and create all relevant directories for them. Add default values for private attributes inherited from `Settings` to `SystemSettings` and `UserSettings`. Add `get_default_managementrepo()` to generate a default `ManagementRepo` based on `SettingsTypeEnum`. Change `Architecture` to be an optional CompressionTypeEnum, which allows for easier overrides when deriving from it in PackageRepo and Settings. Change `PackageRepo` to also derive from `DatabaseCompression` to allow per repository overrides. Change `PackageRepo` to add private attributes which are populated during validation of a `Settings` instance and used to define the absolute paths to all relevant repository locations. Change `raise_on_path_equals_other()` and `raise_on_path_in_other()` to fix formatting of f-string. Change `Settings` to carry private attributes, which must be overriden by derivative classes to set the default locations for repositories (e.g. per-user or system-wide configuration). Remove the `package_repo_base` and `source_repo_base` attributes, as they are superseded by the use of private attributes. Change `get_default_packagerepo()` to use default values instead of hardcoding them. Fix `read_toml_configuration_settings()` to properly combine the dicts created from reading TOML files. Remove `PackagePool.validate_package_pool()` as relevant validation takes place in the `Settings` validation. Remove `SourcePool.validate_source_pool()` as relevant validation takes place in the `Settings` validation. Remove `ManagementRepo.validate_directory()` as relevant validation takes place in the `Settings` validation. Remove `PackageRepo.validate_unique_package_pool_source_pool()` and `PackageRepo.validate_unique_management_repo_directory()` as relevant validation takes place in the `Settings` validation. Remove `Settings.validate_package_repo_base_source_repo_base()` as it is superseded by the new `consolidate_and_create_repositories()` root_validator. Remove `Settings.validate_existing_paths_for_repositories()` as it is superseded by the new `consolidate_and_create_repositories()` root_validator. Remove validators and additional attributes from `UserSettings` and `SystemSettings` as they are superseded by validation and defaults on the `Settings` class. Remove unneeded `UserManagementRepo` and `SystemManagemenRepo`. Remove superseded and functionally over-complex `validate_directory()`. tests/config/test_settings.py: Add tests for new `Settings` classmethods, helper methods and validators. tests/conftest.py: Add new fixture `packagerepo_in_tmp_path` which provides a PackageRepo with all attributes and private attributes populated.
-
David Runge authored
repod/config/__init__.py: expose SystemSettings and UserSettings instead of Settings, as the more specific versions provide respective default paths. repod/config/settings.py: Change `ManagementRepo` to only optionally require a URL, as it should be possible to add an upstream later. Add debug messages to `read_toml_configuration_settings()`. Change `Settings.repositories` to not default to an empty list, but to unset. Remove `Settings.validate_repositories()`, as its only purpose was to raise on no repositories defined. Add validators for `UserSettings.repositories` and `SystemSettings.repositories` that add a default PackageRepo if none is defined. Add `get_default_packagerepo()` to return a default PackageRepo depending on provided `SettingsTypeEnum`. tests/config/test_settings.py: Change tests for `SystemSettings` and `UserSettings` to not fail if no repository is set by patching the output of `get_default_packagerepo()` (the default directories are not created yet when trying to validate them). Add test for `get_default_packagerepo()`.
-
David Runge authored
repod/config/defaults.py: Rename PACKAGE_POOL to PACKAGE_POOL_BASE and SOURCE_POOL to SOURCE_POOL_BASE. Turn PACKAGE_POOL_BASE and SOURCE_POOL_BASE into dicts, that provide user or system specific values based on SettingsTypeEnum key.
-
David Runge authored
tests/conftest.py: Change `empty_toml_file` and `empty_toml_files_in_dir` fixtures to use `.conf` as file suffix, which reflects the current use of config files.
-
David Runge authored
repod/cli/argparse.py: Add the `-c`/ `--config` option to allow providing an override configuration file loction.
-
- 06 Jul, 2022 1 commit
-
-
David Runge authored
repod/cli/argparse.py: Add top-level `-s`/ `--system` option to indicate targetting system mode.
-
- 04 Jul, 2022 6 commits
-
-
David Runge authored
repod/config/settings.py: Add `DatabaseCompression` model which defaults to `DEFAULT_DATABASE_COMPRESSION`. Derive `Settings` also from `DatabaseCompression`.
-
David Runge authored
repod/config/defaults.py: Change `SETTINGS_LOCATION`, `SETTINGS_OVERRIDE_LOCATION`, `PACKAGE_REPO_BASE`, `SOURCE_REPO_BASE` and `MANAGEMENT_REPO` to distinguish between system and user level configuration with the help of SettingsTypeEnum. repod/config/settings.py: Remove the `directory` default value from `ManagementRepo`. Remove the `package_repo_base` and `source_repo_base` default values from `Settings`. Add SystemManagementRepo, UserManagementRepo, SystemSettings and UserSettings to distinguish between system and user-level configurations and defaults. tests/config/test_settings.py: Extend tests to cover user and system level setups.
-
David Runge authored
repod/common/enums.py: Add Enum SettingsTypeEnum to distinguish user-level and system-level Settings objects.
-
David Runge authored
.gitlab-ci.yml: Add python-pyxdg to list of packages when running against system dependencies.
-
David Runge authored
poetry.lock: Update poetry lock file after adding pyxdg.
-
David Runge authored
pyproject.toml: Add pyxdg to project dependencies to be able to rely on XDG compliant directories for configuration defaults.
-
- 01 Jul, 2022 15 commits
-
-
David Runge authored
pyproject.toml: Update project version to 0.1.0
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for 0.1.0.
-
David Runge authored
README.md: Update installation instructions to include using pip. Add information on optional dependencies which are implicitly preferred over the project's default. Remove information on how to build documentation (the info can be found in the contribution guidelines).
-
David Runge authored
docs/repod/installation.rst: Change update instructions in documentation to mention pypi package and installing via pip. Add information on optional dependencies which are preferred over the internal or default functionality.
-
David Runge authored
pyproject.toml: Set project version to 0.1.0-alpha1 for a release.
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for 0.1.0-alpha1 with date.
-
David Runge authored
tox.ini: Add building of man pages to documentation target.
-
David Runge authored
docs/repod/man/index.rst: Add main include file for all manuals and include the sphinx-argparse rendered manual of repod-file directly. docs/index.rst: Add main include file for manuals to TOC. docs/repod/tooling.rst: Link to the manuals section for further information.
-
David Runge authored
docs/conf.py: Add sphinx-argparse to the list of extensions. Add a man page setup for repod-file.
-
David Runge authored
docs/repod/man/repod_file.rst: Add sphinx-argparse integration for repod-file's ArgumentParser.
-
David Runge authored
repod/cli/argparse.py: Add `sphinx_repod_file()` to return `ArgumentParser.repod_file()` as sphinx-argparse can not call it. tests/cli/test_argparse.py: Add test for `sphinx_repod_file()`.
-
David Runge authored
poetry.lock: Update poetry lock file to include sphinx-argparse.
-
David Runge authored
pyproject.toml: Add sphinx-argparse to development dependencies, so that it can be used when rendering documentation.
-
David Runge authored
docs/packages/contents.rst, docs/repositories/management_repository.rst: Include all JSON schema files from docs/schema. tox.ini: Export all JSON schema files to docs/schema.
-
David Runge authored
.gitignore: Replace `docs/package/schema` and `docs/repositories/schema` with `docs/schema`.
-