Skip to content

Commit

Permalink
Documentation: use prettier on markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieucan committed Apr 17, 2024
1 parent 24b122e commit a8fdeb6
Show file tree
Hide file tree
Showing 22 changed files with 599 additions and 681 deletions.
34 changes: 14 additions & 20 deletions HACKING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Getting started with Debsources development
===========================================
# Getting started with Debsources development

You have 2 documented ways to get a local Debsources environment:
either a local deployment directly in your OS, or within a Docker
Expand All @@ -10,24 +9,23 @@ To test the updater, and subsequently run the webapp on it, you will need a
might want to use the data from the Debsources testsuite, which is shipped via a
separate Git submodule rooted at testdata/, so:

$ cd debsources/
$ git submodule update --init
$ cd debsources/
$ git submodule update --init

The testdata Git repository is ~150 MB, so it might take a while to retrieve.

Local Debsources deployment
---------------------------
## Local Debsources deployment

- clone the Debsources Git repository:

$ git clone https://salsa.debian.org/qa/debsources.git
or
or
$ git clone git@salsa.debian.org:qa/debsources.git

- ensure the Python interpreter can find Debsources' Python modules:

$ export PYTHONPATH=`pwd`/debsources/lib:"$PYTHONPATH"
$ python -c 'import debsources' # if this fails, double-check $PYTHONPATH
$ python -c 'import debsources' # if this fails, double-check $PYTHONPATH

- create a PostgreSQL database for use by Debsources, e.g.:

Expand Down Expand Up @@ -67,14 +65,14 @@ or
- run the webapp:

$ bin/debsources-run-app
* Running on http://127.0.0.1:5000/
* Restarting with reloader

- Running on http://127.0.0.1:5000/
- Restarting with reloader

you can now visit the above URL with your browser and verify that everything
is OK.

Docker container
---------------
## Docker container

- Ensure docker is installed and the service is running, then build
the Debsources image (may take a while):
Expand All @@ -96,18 +94,14 @@ Docker container

$ make attach

You're ready for Debsources hacking! How about giving Debsources easy hacks a
go now? <http://deb.li/debsrceasy>

You're ready for Debsources hacking! How about giving Debsources easy hacks a
go now? <http://deb.li/debsrceasy>

Running tests
-------------
## Running tests

See [testing.md](doc/testing.md].


Coding conventions
==================
# Coding conventions

All new Debsources code should be [PEP8][1] compliant and pass [pyflakes][2]
validation. Before submitting patches, please make sure that the lines of code
Expand Down
17 changes: 7 additions & 10 deletions IDEAS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
Ideas for internships, GSoC, Outreach, and friends
==================================================
# Ideas for internships, GSoC, Outreach, and friends

(for inspiration, the open bugs are listed at http://deb.li/debsrcbugs)

Debsources on Mobile
--------------------
## Debsources on Mobile

Enabling Debsources to work on mobile browsers, via an hybrid
(desktop/mobile) design, is an interesting and useful challenge. A
Expand All @@ -20,11 +18,11 @@ with the browser extension), etc). There is a design challenge
involved here, and also a technology choice (e.g. Cordova/PhoneGap
vs. real native).

Support of other operating systems
----------------------------------
## Support of other operating systems

Support of security.debian.org, and other operating systems, poses few
challenges:

- refactoring (adding a table for the different archives, changing
primary keys, lots of UI changes, etc).
- support of the updates coming from different archives through
Expand All @@ -36,20 +34,19 @@ challenges:
- through hard links via a cronjob (involving race conditions and
similar challenges).

Support of other hashing algorithms
-----------------------------------
## Support of other hashing algorithms

In the files table, we currently only compute the sha256 sum. It would
be interesting to have other checksums.

Integrated sources editor
-------------------------
## Integrated sources editor

Raphael Geissert has developed a Firefox/Chrome plugin to allow the
edition of a file directly in Debsources, and to generate a patch
ready to be sent to the maintainer of the modified package.
See http://rgeissert.blogspot.fr/2015/08/updates-to-sourcesdebiannet-editor.html
It would be awesome to:

- integrate it in Debsources' code base, so that users don't require
to install the browser extension,
- and improve it to support e.g. multi-file editing (that needs
Expand Down
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Development
===========
# Development

* **source code** is available using [Git][1]:
- **source code** is available using [Git][1]:

$ git clone https://salsa.debian.org/qa/debsources.git
or $ git clone git@salsa.debian.org:qa/debsources.git

or $ git clone git@salsa.debian.org:qa/debsources.git

and browsable [on the Web][2].

* please report **bugs** to the [Debian Bug Tracking System][6] (short URL:
- please report **bugs** to the [Debian Bug Tracking System][6] (short URL:
<http://deb.li/debsrcbugs>), against the `qa.debian.org` pseudo-package,
using a subject line that begins with "debsources:".

Expand All @@ -19,10 +19,10 @@ Development
(`bin/debsources-reportbug` in the Debsources' Git repo is a convenience
script that does the above for you)

* for discussions about Debsources please **contact** the
- for discussions about Debsources please **contact** the
[debian-qa-debsources mailing list][4] or the `#debian-debsources` IRC channel on [OFTC][5]

* opportunities for new contributors (AKA **easy hacks**) are [available][7] as
- opportunities for new contributors (AKA **easy hacks**) are [available][7] as
well (short URL: <http://deb.li/debsrceasy>)

[1]: http://git-scm.com/
Expand All @@ -32,15 +32,11 @@ Development
[6]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=qa.debian.org;tag=debsources
[7]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?package=qa.debian.org;include=subject:debsources;tag=newcomer


To get started with Debsources development, have a look at the [HACKING](HACKING.md) file.

# Dependencies

Dependencies
============

Webapp
------
## Webapp

Debian packages:

Expand All @@ -56,9 +52,7 @@ Debian packages:
- python-magic
- tango-icon-theme


Infrastructure
--------------
## Infrastructure

(work in progress, likely incomplete)

Expand All @@ -74,8 +68,7 @@ Debian packages:
- python-sqlalchemy
- sloccount

Other
-----
## Other

To re-generate the documentation:

Expand Down
7 changes: 3 additions & 4 deletions contrib/bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
Generating Bootstrap
====================
# Generating Bootstrap

We use bootstrap's customizer to ensure our bootstrap is the small and also
stays with the aesthetics of debian.

The file `config.json` contains related configuration.

How To Generate
-----------------
## How To Generate

- Go to https://getbootstrap.com/customize/

- Upload the new `config.json` file, making sure you change the one in
`/contrib/bootstrap` to match.

- Download the `bootstrap.zip` file

```sh
BASE=/path/to/debsouces/repo # make sure this points to top level
unzip ~/Downloads/bootstrap.zip -d /tmp # Download location may vary
Expand Down
30 changes: 15 additions & 15 deletions doc/archiving-a-suite.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Archiving a suite

How to mark a suite as sticky (ensuring its packages remain around) *before* it
How to mark a suite as sticky (ensuring its packages remain around) _before_ it
gets removed from the mirror network.

1) edit `lib/debsources/consts.py`, setting `archived: True` on the relevant suite
1. edit `lib/debsources/consts.py`, setting `archived: True` on the relevant suite
(if it exists there otherwise, e.g., `*-lts` variants, don't bother)

2) on the DB: set to `t` the column `sticky` of the relevant suite, e.g.:
2. on the DB: set to `t` the column `sticky` of the relevant suite, e.g.:

```sql
update suites_info set sticky = 't' where name = 'squeeze';
```
```sql
update suites_info set sticky = 't' where name = 'squeeze';
```

3) archive the suite using the archiver `add` action, e.g.:
3. archive the suite using the archiver `add` action, e.g.:

```shell
bin/debsources-suite-archive add squeeze
```
```shell
bin/debsources-suite-archive add squeeze
```

or, more precisely on sources.d.o machine:
or, more precisely on sources.d.o machine:

```shell
sudo -u debsources PYTHONPATH=./lib bin/debsources-suite-archive add squeeze -vvv --single-transaction no
```
```shell
sudo -u debsources PYTHONPATH=./lib bin/debsources-suite-archive add squeeze -vvv --single-transaction no
```

4) run `bin/debsources-suite-archive list` and check that the given suite is
4. run `bin/debsources-suite-archive list` and check that the given suite is
marked as both available and indexed, i.e., `True` on both columns
4 changes: 2 additions & 2 deletions doc/bugs.debian.org-usertag.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
A list of Debian bugs related, for various reasons, to Debsources and/or
sources.debian.org is available at:

https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=debsources;users=zack@debian.org
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=debsources;users=zack@debian.org

To add a bug to that list (please ask qa-debsources@lists.alioth.debian.org first):

bts user zack@debian.org , usertag XXXXXX debsources
bts user zack@debian.org , usertag XXXXXX debsources
Loading

0 comments on commit a8fdeb6

Please sign in to comment.