aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/DEVELOPMENT.md
blob: e88be2fb4c49cc9974c8995b060e2ac2fe7dd825 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Workspace setup
---------------

* Create a virtual Python environment: `make venv`
* Use the virtual environment: `. .venv/bin/activate`
    * Deactivate the environment when you're done: `deactivate`
* Make sure basic tests work: `make test`

Development
-----------

* Run unit tests: `make test/unit`
* There're three integration tests: `local`, `docker` and `example`.
Run them using

      make test/local
      sudo make test/docker
      make test/example

    * The `example` test uses the forges' APIs and might easily hit rate
limits.
Set environment variables described in [examples/cgitize.toml] to use "access
tokens" and get much higher rate limits.
    * Run both unit tests and the `local` test using

          make test

[examples/cgitize.toml]: examples/cgitize.toml

Upgrading dependencies
----------------------

* Upgrade virtual environment packages: `make venv/upgrade`
* Upgrade base Docker images.
    * Find the current base images using `git grep -P 'FROM \w+:'`
* Upgrade the [cmark-gfm] version used in the [cgitize-frontend Docker image].

[cmark-gfm]: https://github.com/github/cmark-gfm
[cgitize-frontend Docker image]: docker/frontend/Dockerfile

Releases
--------

* Make a git tag for a new minor version using `make tag`.
You can then review it and push using `git push --tags`.
* For a new major version, update the version in the docker-compose definition
in docker/README.md.