#3931 How can I start
Opened 6 years ago by rriya. Modified 10 months ago

Hello,
I was trying to get started with pagure, but I am not able to figure out the files. I believe there must be a doc file which can guide the newbies where to start from. I am not able to understand which is the very first file from where i should start understanding the code and also not able to find some specific code files. Can someone guide me regarding files? Is there any specific pattern? I am looking for the code for "Settings Option".


Hi @rriya

Pagure is using the Flask framework being familiar with it will help you. I recommend reading the following tutorial for that.

The source code is available here and it is a good idea to look at the tests to understand how things are working

Hope that helps

Hello @cverna

Thanks for your input, it really helped :)

The code is then divided into three part (more or less):

  • the ui which is the part responsible what the interface most people interact with pagure with.
  • the api which is responsible for the API of pagure
  • the lib which contains all the code related to the database model (see model.py), the workers (see tasks.py) and in general all the logic that is not specific to the web-framework and may be used both in the UI and API (most of this logic will be found in query.py)

After that:
- the static folder contains all the "static" files, (JS, image, CSS files) served/used in the web UI
- the templates folder contains the html templates used to build the web UI
- the themes folder contains the html template, static files and definitions for the different themes of pagure
- the cli folder contains the code for the pagure-admin command-line utility
- the hooks folder contains the files and code related to the different git hook one can enable on a pagure project
the internal folder contains the code for the internal API endpoints, to be used only by the UI or potentially tools running on the server (ie they are not for public consumption).

Hoping this helps :)

I think we may want to document this in our doc as well, thanks for the suggestion :)

Metadata Update from @pingou:
- Issue tagged with: RFE, doc, easyfix

6 years ago

Metadata Update from @wombelix:
- Issue assigned to wombelix

2 years ago

Todo: Add further information to the Contribution / Development part of the Documentation to make it easier for new Contributor to understand the pagure Codebase.

Metadata Update from @wombelix:
- Issue set to the milestone: 5.13

2 years ago

Metadata Update from @wombelix:
- Issue set to the milestone: 6.x (was: 5.13)

10 months ago

Metadata Update from @wombelix:
- Assignee reset

10 months ago

Log in to comment on this ticket.

Metadata