Skip to content

Commit 491e3db

Browse files
committed
Add notes on how to run tests
1 parent d5c3570 commit 491e3db

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# About
2-
The Python client API for LabKey Server lets you query, insert and update data on a LabKey Server from a Python client.
1+
Python API for LabKey Server. Lets you query, insert, and update data on a LabKey Server using Python.
32

4-
# Release Notes
3+
## Release Notes
54

65
Changes in the current release:
76

@@ -14,7 +13,7 @@ Changes in the current release:
1413
- PEP standards - the latest version follows PEP code styling standards
1514
- New [samples](./samples)
1615

17-
# Installation
16+
## Installation
1817
To install, simply use `pip`:
1918

2019
```bash
@@ -23,10 +22,10 @@ $ pip install labkey
2322

2423
**Note:** For users who installed this package before it was published to PyPI (before v0.3.0) it is recommended you uninstall and reinstall the package rather than attempting to upgrade. This is due to a change in the package's versioning semantics.
2524

26-
# Credentials
25+
## Credentials
2726
As of v0.4.0 this API no longer supports using a ``.labkeycredentials.txt`` file, and now uses the .netrc files similar to the other labkey APIs. Additional .netrc [setup instructions](https://www.labkey.org/wiki/home/Documentation/page.view?name=netrc) can be found at the link.
2827

29-
## Set Up a netrc File
28+
### Set Up a netrc File
3029

3130
On a Mac, UNIX, or Linux system the netrc file should be named ``.netrc`` (dot netrc) and on Windows it should be named ``_netrc`` (underscore netrc). The file should be located in your home directory and the permissions on the file must be set so that you are the only user who can read it, i.e. it is unreadable to everyone else.
3231

@@ -49,7 +48,7 @@ password mypassword
4948
```
5049
Note that the netrc file only deals with connections at the machine level and should not include a port or protocol designation, meaning both "mymachine.labkey.org:8888" and "https://mymachine.labkey.org" are incorrect.
5150

52-
# Supported Functions
51+
## Supported Functions
5352

5453
- **labkey.query.select_rows()** - Query and get results sets from LabKey Server.
5554
- **labkey.query.execute_sql()** - Execute SQL (LabKey SQL dialect) through the query module on LabKey Server.
@@ -59,7 +58,7 @@ Note that the netrc file only deals with connections at the machine level and sh
5958
- **labkey.experiment.load_batch()** - Retreive assay data (batch level) from LabKey Server.
6059
- **labkey.experiment.save_batch()** - Save assay data (batch level) on LabKey Server.
6160

62-
# Examples
61+
## Examples
6362

6463
Sample code is available in the [samples](https://github.com/LabKey/labkey-api-python/tree/experiment/samples) directory.
6564

@@ -86,9 +85,22 @@ else:
8685
print('select_rows: Failed to load results from ' + schema + '.' + table)
8786
```
8887

89-
# Supported Versions
88+
## Supported Versions
9089
Python 2.6+ and 3.4+ are fully supported.
9190
LabKey Server v13.3 and later.
9291

93-
# Contributing
94-
This library and the LabKey Server are maintained by the LabKey Software Foundation. If you have any questions or need support, please use the [LabKey Server support forum](https://www.labkey.org/wiki/home/page.view?name=support).
92+
## Contributing
93+
This library and the LabKey Server are maintained by the LabKey Software Foundation. If you have any questions or need support, please use the [LabKey Server support forum](https://www.labkey.org/wiki/home/page.view?name=support
94+
95+
### Testing
96+
If you are looking to contribute please run the tests before issuing a PR. For now you need to manually get the dependencies:
97+
98+
```bash
99+
$ pip install mock
100+
```
101+
102+
Then, to run the tests:
103+
104+
```bash
105+
$ python test/test_labkey.py
106+
```

0 commit comments

Comments
 (0)