Skip to content

Commit

Permalink
minor version bump to 0.3.0, add contributors to README, run_build.sh…
Browse files Browse the repository at this point in the history
… script for easier uploading to pypi
  • Loading branch information
ryancurrah committed Nov 8, 2017
1 parent f0543b6 commit 489c611
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.coverage
*.egg-info
.DS_Store
dist/
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
## 0.2.1 (January, 4, 2017)
## 0.3.0 (November, 8, 2017)
### Fixed
* Prevent wasted CPU cycles on long searches by sleeping for 1 second after each result check

### Changed
* Bind some vars to make them visible in case of exception

## 0.2.1 (January, 4, 2017)
### Fixed
* Tests failing in Python 3

## 0.2.0 (January, 4, 2017)
### Added

* More test coverage

### Changed

* Splunk class version method is now a property
* Updated README with correct usage and how to install
* Setup.py adds more packaging information

### Fixed

* Bad Splunk logins are now caught and handled for real this time

## 0.1.0 (January, 3, 2017)

* Initial release
79 changes: 41 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Easily create Splunk searches from Python and get the result as a Python object

# Installation instructions

The [searchsplunk](https://pypi.python.org/pypi/searchsplunk) PyPi package can be installed from pip.
[Searchsplunk](https://pypi.python.org/pypi/searchsplunk) can be installed from PyPi.

```bash
pip install searchsplunk
Expand All @@ -30,90 +30,93 @@ print json.dumps(result, sort_keys=True, indent=2)
"fields": [
{
"name": "_bkt"
},
},
{
"name": "_cd"
},
},
{
"name": "_indextime"
},
},
{
"name": "_kv"
},
},
{
"name": "_raw"
},
},
{
"name": "_serial"
},
},
{
"name": "_si"
},
},
{
"name": "_sourcetype"
},
},
{
"name": "_subsecond"
},
},
{
"name": "_time"
},
},
{
"name": "host"
},
},
{
"name": "index"
},
},
{
"name": "linecount"
},
},
{
"name": "openstack_uid"
},
},
{
"name": "source"
},
},
{
"name": "sourcetype"
},
},
{
"name": "splunk_server"
}
],
"init_offset": 0,
"messages": [],
"preview": false,
],
"init_offset": 0,
"messages": [],
"preview": false,
"results": [
{
"_bkt": "main~1122~25B521A6-9612-407D-A1BA-F8KJSEBB7628",
"_cd": "1122:290410720",
"_indextime": "1435071966",
"_kv": "1",
"_raw": "somefile contents",
"_serial": "0",
"_bkt": "main~1122~25B521A6-9612-407D-A1BA-F8KJSEBB7628",
"_cd": "1122:290410720",
"_indextime": "1435071966",
"_kv": "1",
"_raw": "somefile contents",
"_serial": "0",
"_si": [
"splunkserv",
"splunkserv",
"main"
],
"_sourcetype": "salt:grains",
"_time": "2015-06-23T11:06:05.000-04:00",
"host": "server-7654.acme.com",
"index": "main",
"linecount": "17",
"openstack_uid": "e0303456c-d5a3-789f-ab68-8f27561ffa0f",
"source": "/etc/salt/grains",
"sourcetype": "salt:grains",
],
"_sourcetype": "salt:grains",
"_time": "2015-06-23T11:06:05.000-04:00",
"host": "server-7654.acme.com",
"index": "main",
"linecount": "17",
"openstack_uid": "e0303456c-d5a3-789f-ab68-8f27561ffa0f",
"source": "/etc/salt/grains",
"sourcetype": "salt:grains",
"splunk_server": "splunkmaster"
}
]
}
```

## Contributors

- [pkeeper](https://github.com/pkeeper)

## Author

[Ryan Currah]([email protected])

## License

GPL v2

31 changes: 31 additions & 0 deletions run_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Creates a pip package and uploads to PyPi
set -e

pip install -U pip setuptools twine

echo "PyPi username: "
read PYPI_USERNAME

echo "PyPi password: "
read -s PYPI_PASSWORD

cat > ~/.pypirc << EOF
[distutils]
index-servers =
pypi
[pypi]
username=${PYPI_USERNAME}
password=${PYPI_PASSWORD}
EOF

chmod 600 ~/.pypirc

# Build new package
python setup.py sdist

# Upload new package
twine upload dist/*

rm -f ~/.pypirc
2 changes: 1 addition & 1 deletion searchsplunk/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Reports the version of the module
"""
__version__ = '0.2.1'
__version__ = '0.3.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='searchsplunk',
version='0.2.1',
version='0.3.0',
description='Splunk search client',
long_description=long_description,
author='Ryan Currah',
Expand Down

0 comments on commit 489c611

Please sign in to comment.