File: CONTRIBUTING.md

package info (click to toggle)
python-rdflib-endpoint 0.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 744 kB
  • sloc: python: 1,197; sh: 21; makefile: 5
file content (82 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ๐Ÿ› ๏ธ Contributing

This section is for if you want to run the package in development, and get involved by making a code contribution.

> Requirements: [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to easily handle scripts and virtual environments.

## ๐Ÿ“ฅ๏ธ Clone

Clone the repository:

```sh
git clone https://github.com/vemonet/rdflib-endpoint
cd rdflib-endpoint
```

## ๐Ÿช Install pre-commit hooks

```sh
./scripts/install.sh
```

## ๐Ÿš€ Run example API

The API will be automatically reloaded when the code is changed:

```sh
./scripts/dev.sh
```

Access the YASGUI interface at http://localhost:8000

## โ˜‘๏ธ Run tests

Make sure the existing tests still work by running the test suite and linting checks. Note that any pull requests to the fairworkflows repository on github will automatically trigger running of the test suite:

```sh
uv run pytest
```

To display all `print()`:

```sh
uv run pytest -s
```

## ๐Ÿงน Code formatting

The code will be automatically formatted when you commit your changes using `pre-commit`. But you can also run the script to format the code yourself:

```sh
./scripts/fmt.sh
```

### โ™ป๏ธ Reset the environment

Upgrade `uv`:

```sh
uv self update
```

Clean `uv` cache:

```sh
uv cache clean
```

## ๐Ÿท๏ธ Release process

> [!IMPORTANT]
>
> Get a PyPI API token at [pypi.org/manage/account](https://pypi.org/manage/account).

Run the release script providing the version bump: `fix`, `minor`, or `major`

```sh
./scripts/release.sh fix
```

> [!NOTE]
>
> This will generate the changelog, commit the new version and changelog, create a tag and push the tag, which will trigger the creation of a new release on GitHub.