diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..fd04bc46 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +version: 2 + +formats: all + +build: + os: ubuntu-20.04 + tools: + python: "3.9" + +sphinx: + builder: html + configuration: docs/source/conf.py + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + system_packages: true diff --git a/README.md b/README.md index dd8dd3aa..bd458470 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![setup status](https://github.com/arcan1s/ahriman/actions/workflows/run-setup.yml/badge.svg)](https://github.com/arcan1s/ahriman/actions/workflows/run-setup.yml) [![docker image](https://github.com/arcan1s/ahriman/actions/workflows/docker-image.yml/badge.svg)](https://github.com/arcan1s/ahriman/actions/workflows/docker-image.yml) [![CodeFactor](https://www.codefactor.io/repository/github/arcan1s/ahriman/badge)](https://www.codefactor.io/repository/github/arcan1s/ahriman) +[![Documentation Status](https://readthedocs.org/projects/ahriman/badge/?version=latest)](https://ahriman.readthedocs.io/?badge=latest) Wrapper for managing custom repository inspired by [repo-scripts](https://github.com/arcan1s/repo-scripts). diff --git a/docs/source/conf.py b/docs/source/conf.py index 23d83fab..fab6caf8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,19 +10,29 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os + +from pathlib import Path # import sys # sys.path.insert(0, os.path.abspath(".")) +basedir = Path(__file__).resolve().parent.parent.parent +metadata_path = basedir / "src/ahriman/version.py" +metadata = {} +with metadata_path.open() as metadata_file: + exec(metadata_file.read(), metadata) # pylint: disable=exec-used + +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + # -- Project information ----------------------------------------------------- project = "ahriman" -copyright = "2022, ahriman team" +copyright = "2021-2022, ahriman team" author = "ahriman team" # The full version, including alpha/beta/rc tags -release = "2021-2022" +release = metadata["__version__"] # -- General configuration --------------------------------------------------- @@ -56,7 +66,7 @@ exclude_patterns = [] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "alabaster" +html_theme = "default" if on_rtd else "alabaster" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/source/index.rst b/docs/source/index.rst index b6ac1df5..17e77b60 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,8 +1,3 @@ -.. ahriman documentation master file, created by - sphinx-quickstart on Sun Apr 17 18:05:36 2022. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - Welcome to ahriman's documentation! =================================== @@ -10,7 +5,19 @@ Welcome to ahriman's documentation! :maxdepth: 2 :caption: Contents: +Wrapper for managing custom repository inspired by `repo-scripts `_. +Features +-------- + +* Install-configure-forget manager for own repository. +* Multi-architecture support. +* VCS packages support. +* Sign support with gpg (repository, package, per package settings). +* Synchronization to remote services (rsync, s3 and github) and report generation (email, html, telegram). +* Dependency manager. +* Ability to patch AUR packages and even create package from local PKGBUILDs. +* Repository status interface with optional authorization and control options. Indices and tables ================== diff --git a/setup.py b/setup.py index 3c662f81..0c5075c3 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,6 @@ setup( install_requires=[ "inflection", "passlib", - "pyalpm", "requests", "srcinfo", ], @@ -99,6 +98,12 @@ setup( "pydeps", "sphinxcontrib-napoleon", ], + # FIXME technically this dependency is required, but in some cases we do not have access to + # the libalpm which is required in order to install the package. Thus in case if we do not + # really need to run the application we can move it to "optional" dependencies + "pacman": [ + "pyalpm", + ], "s3": [ "boto3", ], diff --git a/tox.ini b/tox.ini index 82e4ee2a..9f880779 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = check, tests -dependencies = -e .[s3,web] +dependencies = -e .[pacman,s3,web] project_name = ahriman [pytest] @@ -10,7 +10,7 @@ spec_test_format = {result} {docstring_summary} [testenv] deps = - -e .[s3,web] + {[tox]dependencies} [testenv:check] deps =