File: contributing.rst

package info (click to toggle)
python-laspy 2.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,928 kB
  • sloc: python: 9,065; makefile: 20
file content (81 lines) | stat: -rw-r--r-- 1,255 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
Contributing
============

Setup
-----

To work on laspy, as it often recommended in python projects,
a virtual env should be used, eg:

.. code-block:: console

    python -m venv .venv
    source .venv/bin/activate # bash/zsh
    .venv/Scripts/Activate.ps1 # windows powershell

To install ``laspy`` in *development mode*:

.. code-block:: console

    pip install -e .[dev]

The ``[dev]`` option will install all the extra tools needed
to run tests, format files and get coverage.

To install with optional dependencies

.. code-block:: console

    pip install -e .[dev,lazrs,pyproj]


Commands
--------

Running Tests
_____________

.. code-block:: console

    pytest


Formatting
__________

.. code-block:: console

    black .

Coverage
_________

.. code-block:: console

    coverage run

    # get report in the CLI
    coverage report

    # get report as a nice navigable html
    coverage html

However, the commands above will only give the coverage for
the set of optional dependencies installed.

Getting a more complete is possible (but takes more time);



.. code-block:: console

    nox -s coverage
    coverage combine

    # get report in the CLI
    coverage report

    # get report as a nice navigable html
    coverage html