Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Pilosov
f480cb3f12 add documentation 2023-03-19 17:16:47 -06:00
Michael Pilosov
8e51024b2c updated instructions for build, new pkgs 2023-03-19 17:14:06 -06:00
2 changed files with 22 additions and 8 deletions

View File

@ -8,20 +8,31 @@ A Python library that announces a server to a host.
pip install announce-server pip install announce-server
``` ```
## Development
To install the developer dependencies required for testing and publishing:
```bash
pip install -e .[dev,pub]
```
## Build ## Build
To build the package, run: To build the package, run:
```bash ```bash
pip install -e .[dev] rm -rf dist/ build/ .eggs/ .pytest_cache/ src/announce_server.egg-info/
pip install -m build python -m build --sdist --wheel
```
To publish:
```bash
twine upload dist/*
``` ```
## Test ## Test
To run the tests, install the package with the `[dev]` option: To run the tests, call:
```bash ```bash
pip install -e .[dev]
pytest pytest
``` ```
@ -30,7 +41,7 @@ pytest
```python ```python
from announce_server.announce import announce_server from announce_server.announce import announce_server
@announce_server(name="server_name", ip="server_ip", port=8000, host_ip="host_server_ip", host_port=5000) @announce_server(name="server_name", ip="server_ip", port=8000, host_ip="host_server_ip", host_port=5000, retry_interval=5)
def your_function(): def your_function():
pass pass

View File

@ -31,13 +31,16 @@ where = src
[options.extras_require] [options.extras_require]
dev = dev =
build
setuptools_scm
pytest pytest
pytest-mock pytest-mock
pytest-asyncio pytest-asyncio
pytest-cov pytest-cov
# asynctest; python_version<'3.8'
pub =
build
wheel
setuptools_scm
twine
[coverage:run] [coverage:run]
source = announce_server source = announce_server