- 08 Mar, 2021 2 commits
-
-
David Runge authored
repo_management/defaults.py: Add the IntEnum `RepoDbMemberType` to distinguish different members (files) in a repository database (e.g. 'desc' or 'files' files).
-
David Runge authored
repo_management/files.py: Add iterator method `_read_db_file_member()` to yield the members of a provided tarfile.TarFile. The members are filtered by name using a regular expression, which can be overridden. tests/test_file.py: Change `create_db_file()` to also create 'desc' and 'files' files below the created temporary directories. Assert, that all tested methods return a value. Add test for `_read_db_file_member()`.
-
- 07 Mar, 2021 5 commits
-
-
David Runge authored
repo_management/files.py: Add `_read_db_file()` to open a db file and return it as tarfile.Tarfile. The method assumes gzip-compressed databases by default, but can be used with other compression algorithms. tests/test_file.py: Add fixtures and tests for `_read_db_file()`.
-
David Runge authored
repo_management/defaults.py: Add the IntEnmu `FieldType` which tracks the required type for an attribute when converting from 'desc' or 'files' files to pydantic models. Extend the DESC_JSON and FILES_JSON globals by introducing a dict per key, that describes the name and the required type, when converting to pydantic models. repo_management/convert.py: Rename `_files_data_to_dict()` to `_read_files_data_to_model()` and return a pydantic model (`models.Files`) instead of a custom dict. Add `_desc_data_to_model()` which allows for conversion of a 'desc' data file (represented as io.StringIO) to a pydantic model (`models.PackageDesc`). tests/test_convert.py: Add another test for raising RuntimeError in `_read_files_data_to_model()`. Add a parametrized test for `_desc_data_to_model()`.
-
David Runge authored
repo_management/models.py: Add pydantic models for all headers in 'desc' and 'files' files (found in a repository database per pkgbase). The models describe the attribute names in use when reading data from the respective files and whether they are required or not.
-
David Runge authored
poetry.lock: Update the lock file to include the latest version of pydantic.
-
David Runge authored
pyproject.toml: Add pydantic to dependencies, as it will be used to validate configuration and internal typing.
-
- 06 Mar, 2021 10 commits
-
-
David Runge authored
.gitlab-ci.yml: Add Gitlab CI integration, that runs tox's linter and coverage targets in a lint stage.
-
David Runge authored
tests/test_convert.py: Add initial tests for the convert module by adding a parametrized test for `_files_data_to_dict()`.
-
David Runge authored
repo_management/defaults.py: Add the basic defaults module, providing data that translates keywords found in the 'desc' and 'files' files of a binary repository database to those used in JSON files, representing the same data. repo_management/convert.py: Add the convert module, and introduce the simple private method (reimplementing a subset of the features from db2json) `_files_data_to_dict()`, which translates the contents of a `files` file to a typed dict.
-
David Runge authored
tox.ini: Add tox integration for testing (linting and coverage) in virtual environments using poetry.
-
David Runge authored
poetry.lock: Add lock file with all dependencies currently used to test the project.
-
David Runge authored
pyproject.toml: Add a pyproject.toml for describing the project, configuring all currently required dependencies and development dependencies. The configuration adds entries for the code formatter black, the import sorting tool isort and for the coverage report generation tool coverage.
-
David Runge authored
.gitignore: Add a ignore file for git, with many default entries for python projects related files, that should never end up in version control.
-
David Runge authored
.mypy.ini: As mypy can not yet be configured through pyproject.toml, add a specific configuration file for it.
-
David Runge authored
.flake8: As flake8 can not yet be configured in a pyproject.toml, use a specific file for it. Set the maximum complexity to 10 (can even be lower) and add default exclusions for project unrelated files.
-
David Runge authored
.editorconfig: Add editorconfig integration, that covers .py, .rst and .yml files.
-
- 28 Dec, 2019 2 commits
-
-
Alad Wenter authored
-
Alad Wenter authored
-
- 27 Dec, 2019 2 commits
-
-
Alad Wenter authored
-
Alad Wenter authored
-
- 12 Oct, 2019 1 commit
-
-
Alad Wenter authored
Signed-off-by:
Alad Wenter <alad@archlinux.org>
-
- 09 Oct, 2019 18 commits
-
-
Maxim Baz authored
-
Maxim Baz authored
-
Jan Alexander Steffens (heftig) authored
-
Jan Alexander Steffens (heftig) authored
-
Jan Alexander Steffens (heftig) authored
-
Jan Alexander Steffens (heftig) authored
-
Jan Alexander Steffens (heftig) authored
Using 'black'. No config needed for it (yet).
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-
Maxim Baz authored
-