{"id":34298165,"url":"https://github.com/pagure/pagure","last_synced_at":"2025-12-17T05:02:55.234Z","repository":{"id":15027726,"uuid":"17753500","full_name":"Pagure/pagure","owner":"Pagure","description":"pagure is a light-weight git-centered forge based on pygit2. (MIRROR)","archived":false,"fork":false,"pushed_at":"2025-05-07T11:36:00.000Z","size":34621,"stargazers_count":208,"open_issues_count":1,"forks_count":45,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-07T12:39:14.813Z","etag":null,"topics":["git","pagure","python","server"],"latest_commit_sha":null,"homepage":"https://pagure.io/pagure","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pagure.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-14T17:04:54.000Z","updated_at":"2025-05-07T11:36:05.000Z","dependencies_parsed_at":"2023-12-06T18:30:22.703Z","dependency_job_id":"e1043946-2a00-4fba-a08f-5257eb263b3f","html_url":"https://github.com/Pagure/pagure","commit_stats":null,"previous_names":[],"tags_count":142,"template":false,"template_full_name":null,"purl":"pkg:github/Pagure/pagure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pagure%2Fpagure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pagure%2Fpagure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pagure%2Fpagure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pagure%2Fpagure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pagure","download_url":"https://codeload.github.com/Pagure/pagure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pagure%2Fpagure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27777507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","pagure","python","server"],"created_at":"2025-12-17T05:02:54.253Z","updated_at":"2025-12-17T05:02:55.227Z","avatar_url":"https://github.com/Pagure.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pagure\n======\n\n:Author:  Pierre-Yves Chibon \u003cpingou@pingoured.fr\u003e\n\nPagure is a git-centered forge, python based using pygit2.\n\nWith pagure you can host your project with its documentation, let your users\nreport issues or request enhancements using the ticketing system and build your\ncommunity of contributors by allowing them to fork your projects and contribute\nto it via the now-popular pull-request mechanism.\n\nHomepage: https://pagure.io/pagure\n\nSee it at work: https://pagure.io\n\nPlayground version: https://stg.pagure.io\n\nIf you have any questions or just would like to discuss about pagure,\nfeel free to drop by `our Matrix room \u003chttps://matrix.to/#/#pagure:fedora.im\u003e`_.\n\n\nAbout its name\n==============\n\nThe name Pagure is taken from the French word 'pagure'. Pagure in French is used as the\ncommon name for the crustaceans from the `Paguroidea \u003chttps://en.wikipedia.org/wiki/Hermit_crab\u003e`_\nsuperfamily, which is basically the family of the Hermit crabs.\n\nOriginating from French it is pronounced with a strong 'g' as you can hear\non `this recording \u003chttps://pagure.io/how-do-you-pronounce-pagure/raw/master/f/pingou.ogg\u003e`_.\n\n\nGet it running\n==============\n\nThere are several options when it comes to a development environment.\nThey are: Docker Compose, Vagrant, and manual. Choose an option below.\n\n\nDocker Compose\n^^^^^^^^^^^^^^\nDocker Compose will provide you with a container which you can develop on.\nInstall it `with these instructions \u003chttps://docs.docker.com/compose/install/\u003e`_.\n\nFor more information about docker-compose cli, see: https://docs.docker.com/compose/reference/.\n\nTo build and run the containers, use the following command:\n\n  .. code-block::\n\n    ./dev/docker-start.sh\n\nOnce all the containers have started, you can access pagure on http://localhost:5000.\nTo stop the containers, press ``Ctrl+C``.\n\nOnce the containers are up and running, run this command to populate the\ncontainer with test data and create a new account:\n\n  .. code-block::\n\n    docker-compose -f dev/docker-compose.yml exec web python3 dev-data.py --all\n\nYou can then log in with any of the created users, by example:\n\n- username: pingou\n- password: testing123\n\n\nVagrant\n^^^^^^^\n\nFor a more thorough introduction to Vagrant, see\nhttps://fedoraproject.org/wiki/Vagrant.\n\nAn example Vagrantfile is provided as ``Vagrantfile.example``. To use it,\njust copy it and install Vagrant. Instructions for Fedora:\n\n  .. code-block::\n\n    cp dev/Vagrantfile.example Vagrantfile\n    sudo dnf install ansible libvirt vagrant-libvirt vagrant-sshfs vagrant-hostmanager\n    vagrant up\n\nOn Ubuntu, install Vagrant directly `from the website \u003chttps://www.vagrantup.com/downloads.html\u003e`_\nthen run these commands instead:\n\n  .. code-block::\n\n    cp dev/Vagrantfile.example Vagrantfile\n    sudo add-apt-repository ppa:ansible/ansible\n    sudo apt update\n    sudo apt install ansible libvirt0 openssh-server qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev\n    vagrant plugin install vagrant-libvirt vagrant-sshfs vagrant-hostmanager\n\nIf you get this error ``Block in synced_folders: Internal error. Invalid: sshfs``,\nwhen you run ``vagrant up`` , you need to install vagrant sshfs plugin, which can be done by:\n\n  .. code-block::\n\n    vagrant plugin install vagrant--sshfs\n\nand then:\n\n  .. code-block::\n\n    vagrant up\n\nThe default ``Vagrantfile`` forwards ports from the host to the guest,\nso you can interact with the application as if it were running on your\nhost machine.\n\n  .. note::\n\n    ``vagrant-hostmanager`` will automatically maintain /etc/hosts for you so you\n    can access the development environment from the host using its hostname, which\n    by default is ``pagure-dev.example.com``. You can choose not to use this\n    functionality by simply not installing the ``vagrant-hostmanager`` plugin, but\n    if you want Pagure to provide valid URLs in the UI for git repositories, you\n    will need to adjust Pagure's configuration found in ~/pagure.cfg on the guest.\n\nWhen the vagrant VM is up and running, connect to it with:\n\n  .. code-block::\n\n    vagrant ssh\n\nThis will log you into the VM as the user ``vagrant`` which has a couple of aliases\npreconfigured:\n\n  .. code-block::\n\n    pstart            # Starts pagure, the workers and other tasks\n    pstop             # Stops all those tasks again\n    pstatus           # Shows pagure status\n\nThe Vagrant pagure doesn't have its own log file, use ``journalctl -f`` to\nshow the pagure output. The verbosity can be configured in the pagure config file\nwith the ``LOGGING`` parameter.\n\n\nRunning the unit-tests in container\n***********************************\n\nTo run the unit-tests, there are containers available with all the dependencies needed.\n\n  .. note::\n\n    All build, test and shell activities executed via ``run-tests-container.py`` will automatically be logged.\n    Every container has it's own ``dev/results_\u003ctest-container-name\u003e`` folder, every run creates separate\n    files with the current unix timestamp as prefix. You should cleanup this folder from time to time.\n\nFirst you will need to have podman and git installed on your workstation:\n\n  .. code-block::\n\n    sudo dnf install podman git\n\nUse the following command to run all tests on all container images, if the images not exist on your system, they will be build:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py\n\nIf you wish to execute the test suite on a centos based container run the following command:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py --centos\n\nContainer images are separated from the pagure source that will be tested.\nTherefore they will only automatically build if they not exist.\n\nA manual rebuild should be done from time to time to include new package versions.\nAlso if you work on any changes in the pagure spec file, the tox config or any requirements.txt file,\nperform a rebuild to ensure your changed will taken into account.\n\n  .. code-block::\n\n    ./dev/run-tests-container.py --rebuild # all base and code container\n    ./dev/run-tests-container.py --rebuild-code # code container only\n\nYou can also run a single test case:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py tests/test_pagure_flask_ui_priorities.py\n\nOr a single test:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py tests/test_pagure_flask_ui_priorities.py:PagureFlaskPrioritiestests.test_ticket_with_no_priority\n\nYou can also get ``run-tests-container.py`` help:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py --help\n\nBy default, tests run against the git repo and the active branch in the current folder.\nTo override this behavior and run the tests on your remote development branch in your fork:\n\n  .. code-block::\n\n    ./dev/run-tests-container.py --repo https://pagure.io/forks/\u003cusername\u003e/pagure.git --branch \u003cname of branch to test\u003e\n\n\nRunning the unit-tests in tox\n*****************************\n\nYou can run the tests using tox. This allows you to run the tests on local version of the code.\n\n  .. note::\n\n    This way of running tests could help you test your local changes,\n    but the output could be different then from the containerized tests.\n    Always check your branch after push with containerized tests as well.\n\n* Install the needed system libraries:\n\n  .. code-block::\n\n    sudo dnf install libgit2-devel redis gcc tox python-alembic\n\n  .. note::\n\n    You can also install any missing python interpreter.\n    For example `sudo dnf install python35`\n\n* Run the whole test suite:\n\n  .. code-block::\n\n     tox\n\n* Or just single environment:\n\n  .. code-block::\n\n     tox -e py39\n\n* Or single module:\n\n  .. code-block::\n\n     tox tests/test_style.py\n\n\nManually\n^^^^^^^^\n\n* Install the needed system libraries:\n\n  .. code-block::\n\n    sudo dnf install git python3 python3-devel libgit2-devel redis \\\n                     libjpeg-devel gcc libffi-devel redhat-rpm-config\n\n  .. note::\n\n    Do note the version of libgit2 that you install, for example\n    in ``libgit2-0.26.8-1`` you need to keep in mind the ``0.26``\n\n  .. note::\n\n    On RHEL and derivative (CentOS, Scientific Linux) there is no\n    `python3` package. Just `python36` or `python34` available in\n    EPEL 7 (EPEL 6 only has `python34`). Choose the one you prefer\n    (3.6 is newer and generally a better choice).\n\n* Retrieve the sources:\n\n  .. code-block::\n\n    git clone https://pagure.io/pagure.git\n    cd pagure\n\n* Install dependencies\n\n  * create the virtual environment (use `python3.X` explicitly on EPEL):\n\n    .. code-block::\n\n      python3 -m venv pagure_env\n      source ./pagure_env/bin/activate\n\n  * Install the correct version of pygit2:\n\n    .. code-block::\n\n      pip install pygit2==\u003cversion of libgit2 found\u003e.*\n\n    So in our example:\n\n    .. code-block::\n\n      pip install pygit2==0.26.*\n\n  * Install the rest of the dependencies:\n\n    .. code-block::\n\n      pip install -r requirements.txt\n\n* Create the folder that will receive the projects, forks, docs, requests and\n  tickets' git repo:\n\n  .. code-block::\n\n    mkdir -p lcl/{repos,remotes,attachments,releases}\n\n* Copy and edit the alembic.ini file (especially the ``script_location`` key):\n\n  .. code-block::\n\n    cp files/alembic.ini .\n    vim alembic.ini\n\n* Set the ``script_location`` to ``alembic``, ie: the folder where the revisions\n  are stored, relative to the location of the ``alembic.ini`` file.\n\n* Create the inital database scheme:\n\n  .. code-block::\n\n    python createdb.py --initial alembic.ini\n\n* Enable and start redis server:\n\n  .. code-block::\n\n    sudo systemctl enable redis\n    sudo systemctl start redis\n\n* Start a worker, in one terminal:\n\n  .. code-block::\n\n    ./runworker.py\n\n* Run the application, in another terminal:\n\n  .. code-block::\n\n    ./runserver.py\n\n\n* To get some profiling information you can also run it as:\n\n  .. code-block::\n\n    ./runserver.py --profile\n\n\nThis will launch the application at http://127.0.0.1:5000\n\n* To run unit-tests on pagure\n\n  * Install the dependencies:\n\n    .. code-block::\n\n        pip install -r requirements-testing.txt\n\n  * Run it:\n\n    .. code-block::\n\n        pytest tests/\n\n    .. note::\n\n        While testing for worker tasks, pagure uses celery in /usr/bin/\n        Celery then looks for eventlet (which we use for testing only) at\n        system level and not in virtual environment. You will need to\n        install eventlet outside of your virtual environment if you are\n        using one.\n\n    .. note::\n\n        This will also work in vagrant.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagure%2Fpagure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpagure%2Fpagure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagure%2Fpagure/lists"}