Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 1.82 KB

CONTRIBUTING.md

File metadata and controls

79 lines (54 loc) · 1.82 KB

Server monitor agent contributing guide

Development

Create a virtual environment:

python -m venv .venv

Install runtime dependencies and development dependencies:

# Windows
.venv\Scripts\activate.ps1

# Linux
source .venv/bin/activate

# install dependencies
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt -r requirements.txt

# check for outdated packages
pip list --outdated

Create and upload release

Generate the distribution package archives.

python -X dev -m build

Upload archives to Test PyPI first.

python -X dev -m twine upload --repository testpypi dist/*

When uploading use a token created at https://test.pypi.org/manage/account/#api-tokens

Go to the test project page and check that it looks ok.

Then create a new virtual environment, install the dependencies, and install from Test PyPI.

python -m venv .venv-test
source .venv-test/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt

SERVER_MONITOR_AGENT_VERSION='0.5.0'
pip install --index-url https://test.pypi.org/simple/ --no-deps server-monitor-agent==$SERVER_MONITOR_AGENT_VERSION

Test the installed package.

server-monitor-agent --version
server-monitor-agent --help
server-monitor-agent memory
server-monitor-agent cpu
server-monitor-agent systemd-service --help
server-monitor-agent consul-report aws

If the package seems to work as expected, upload it to the live PyPI.

python -X dev -m twine upload dist/*

When uploading use a token created at https://pypi.org/manage/account/#api-tokens

Go to the live project page and check that it looks ok.

Done!