Skip to content

Commit

Permalink
Update Python package references
Browse files Browse the repository at this point in the history
  • Loading branch information
lowell80 committed Mar 26, 2022
1 parent 864369b commit c081fbe
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 33 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
- id: ksconf-check
name: Kintyre Splunk CONF - Check syntax
name: Ksconf Splunk CONF - Check syntax
description: Check that all .conf files are syntactically valid
entry: ksconf check -q
language: python
files: (\.conf|(local|default)\.meta)$

- id: ksconf-sort
name: Kintyre Splunk CONF - Sort conf files
name: Ksconf Splunk CONF - Sort conf files
description: Sort all stanzas and keys in .conf files. Files can be skipped by adding a comment with KSCONF-NO-SORT
entry: ksconf sort -i -q
language: python
files: (\.conf|(local|default)\.meta)$

- id: ksconf-xml-format
### WORST CASE: Move this into it's own ksconf-precommit repo, that intalls 'kintyre-splunk-conf' and 'lxml'.... ;-( Probably easier than making pre-commit specific tags/branches or some junk like that...
### WORST CASE: Move this into it's own ksconf-precommit repo, that intalls 'ksconf' and 'lxml'.... ;-( Probably easier than making pre-commit specific tags/branches or some junk like that...
# Apparently additional_dependencies only works on pre-commit-config not in hooks?!
#additional_dependencies: lxml (unclear if this is supported for all languages)
# I wonder what would happen if I set lxml as a build requirement instead of an install requirement. Since 'pip install .' would likely install both?!?!
name: Kintyre Splunk CONF - Normalize XML
name: Ksconf Splunk CONF - Normalize XML
description: Normalize and apply consistent XML indentation and CDATA usage for XML dashboards and navigation files.
entry: ksconf xml-format -q
language: python
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ install:
pyenv rehash
pip install wheel
# Since pyenv can be cached across OSX builds, uninstall first for a fresh build
if pip show kintyre-splunk-conf; then pip uninstall -y kintyre-splunk-conf; fi
if pip show ksconf; then pip uninstall -y ksconf; fi
fi
- pip install $EXTRA_PKGS -r requirements-ci.txt
- pip install .
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Kintyre's Splunk CONFiguration tool

[![Build](https://github.com/Kintyre/ksconf/actions/workflows/build.yml/badge.svg)](https://github.com/Kintyre/ksconf/actions/workflows/build.yml)
[![PyPI](https://img.shields.io/pypi/v/kintyre-splunk-conf.svg)](https://pypi.org/project/kintyre-splunk-conf/)
[![PyPI](https://img.shields.io/pypi/v/ksconf.svg)](https://pypi.org/project/ksconf/)
[![codecov](https://codecov.io/gh/Kintyre/ksconf/branch/master/graph/badge.svg)](https://codecov.io/gh/Kintyre/ksconf)
[![Coverage Status](https://coveralls.io/repos/github/Kintyre/ksconf/badge.svg?branch=master)](https://coveralls.io/github/Kintyre/ksconf?branch=master)
[![Windows Build status](https://ci.appveyor.com/api/projects/status/rlbgstkpf17y8nxh/branch/master?svg=true)](https://ci.appveyor.com/project/lowell80/ksconf/branch/master)
[![Documentation Status](https://readthedocs.org/projects/ksconf/badge/?version=latest)](https://ksconf.readthedocs.io/en/latest/?badge=latest)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kintyre-splunk-conf.svg)](https://pypi.org/project/kintyre-splunk-conf/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/kintyre-splunk-conf.svg)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ksconf.svg)](https://pypi.org/project/ksconf/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/ksconf.svg)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Snyk Score](https://snyk.io/advisor/python/kintyre-splunk-conf/badge.svg)](https://snyk.io/advisor/python/kintyre-splunk-conf)
[![Snyk Score](https://snyk.io/advisor/python/ksconf/badge.svg)](https://snyk.io/advisor/python/ksconf)
[![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/)


Expand All @@ -31,7 +31,7 @@ more than one layer of "default" are all supported tasks which are not native to

**Python:**

pip install kintyre-splunk-conf
pip install ksconf

**Confirm installation** with the following command:

Expand Down
3 changes: 3 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Ksconf v0.10.0 (DRAFT)
**Python 3 ONLY**

* Ksconf v0.10 and later requires Python 3.7 or newer.
* The offical Python package was renamed ``ksconf``.
The ``kintyre-splunk-conf`` package continue to be released in parallel at least until the version 1.0 release.
You can continue updating the ``kintyre-splunk-conf`` package and it will install the ``ksconf`` package.
* Remove ``six`` built-in dependency.
* Refactor the ``combine`` logic into more reusable classes.
The core layer combining logic now lives in :py:class:`~ksconf.combine.LayerCombine`,
Expand Down
4 changes: 2 additions & 2 deletions docs/source/common
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.. _GitHub Releases: https://github.com/Kintyre/ksconf/releases
.. _argcomplete: https://argcomplete.readthedocs.io/en/latest/
.. _gitlint: https://jorisroovers.github.io/gitlint/
.. _kintyre-splunk-conf-wheel: https://pypi.org/project/kintyre-splunk-conf/#files
.. _kintyre-splunk-conf: https://pypi.org/project/kintyre-splunk-conf
.. _ksconf-wheel: https://pypi.org/project/ksconf/#files
.. _ksconf: https://pypi.org/project/ksconf
.. _ksconf app for splunk: https://splunkbase.splunk.com/app/4383/
.. _ksconf repo: https://github.com/Kintyre/ksconf
.. _pre-commit: https://pre-commit.com/
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dyn/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ksconf
{check,combine,diff,package,filter,promote,merge,minimize,snapshot,sort,rest-export,rest-publish,unarchive,xml-format}
...
Ksconf: Kintyre Splunk CONFig tool
KSCONF: Ksconf Splunk CONFig tool
This utility handles a number of common Splunk app maintenance tasks in a small
and easy to deploy package. Specifically, this tool deals with many of the
Expand Down
1 change: 0 additions & 1 deletion docs/source/dyn/ksconf_subcommands.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
:ref:`ksconf package <ksconf_cmd_package>`,alpha,Create a Splunk app .spl file from a source directory
:ref:`ksconf promote <ksconf_cmd_promote>`,beta,"Promote .conf settings between layers using either batch or interactive mode. Frequently this is used to promote conf changes made via the UI (stored in the ``local`` folder) to a version-controlled directory, such as ``default``. "
:ref:`ksconf rest-export <ksconf_cmd_rest-export>`,beta,Export .conf settings as a curl script to apply to a Splunk instance later (via REST)
:ref:`ksconf rest-publish <ksconf_cmd_rest-publish>`,alpha,Publish .conf settings to a live Splunk instance via REST
:ref:`ksconf snapshot <ksconf_cmd_snapshot>`,alpha,Snapshot .conf file directories into a JSON dump format
:ref:`ksconf sort <ksconf_cmd_sort>`,stable,Sort a Splunk .conf file creating a normalized format appropriate for version control
:ref:`ksconf unarchive <ksconf_cmd_unarchive>`,beta,Install or upgrade an existing app in a git-friendly and safe way
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To install as a **python package**, run the following:

.. code-block:: shell
pip install kintyre-splunk-conf
pip install ksconf
To install the **Splunk app**, download the latest `KSCONF App for Splunk`_ release. Note that a
Expand Down
6 changes: 3 additions & 3 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ Quick Install

.. code-block:: sh
pip install kintyre-splunk-conf
pip install ksconf
**System-level install**: (For Mac/Linux)

.. code-block:: sh
curl https://bootstrap.pypa.io/get-pip.py | sudo python - kintyre-splunk-conf
curl https://bootstrap.pypa.io/get-pip.py | sudo python - ksconf
.. note: PIP
This will also install/update ``pip`` and work around some known TLS/SSL issues
Expand Down Expand Up @@ -225,7 +225,7 @@ If you want the packages, install the "thirdparty" extras using the following co

.. code-block:: sh
pip install kintyre-splunk-conf[thirdparty]
pip install ksconf[thirdparty]
Expand Down
18 changes: 9 additions & 9 deletions docs/source/install_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Install from PyPI with PIP
~~~~~~~~~~~~~~~~~~~~~~~~~~

The preferred installation method is to install via the standard Python package tool :command:`pip`. Ksconf
can be installed via the registered `kintyre-splunk-conf`_ package using the standard Python process.
can be installed via the registered `ksconf`_ package using the standard Python process.

There are 2 popular variations, depending on whether or not you would like to install for all users
or test it locally.
Expand All @@ -89,7 +89,7 @@ Please change ``venv`` to a suitable path for your environment.
virtualenv venv
source venv/bin/activate
pip install kintyre-splunk-conf
pip install ksconf
.. note:: Windows users

Expand All @@ -109,13 +109,13 @@ On Mac or Linux, run:

.. code-block:: sh
sudo pip install kintyre-splunk-conf
sudo pip install ksconf
On Windows, run this command from an Administrator console.

.. code-block:: sh
pip install kintyre-splunk-conf
pip install ksconf
CentOS (RedHat derived) distros
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -129,7 +129,7 @@ CentOS (RedHat derived) distros
sudo yum install -y python-pip
# Install ksconf (globally, for all users)
sudo pip install kintyre-splunk-conf
sudo pip install ksconf
RedHat Software Collections
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -139,7 +139,7 @@ too. The initial setup and deployment of Software Collections is beyond the scop

.. code-block:: sh
sudo scl enable python38 python -m pip install kintyre-splunk-conf
sudo scl enable python38 python -m pip install ksconf
.. hint:: Missing pip?

Expand Down Expand Up @@ -179,7 +179,7 @@ Offline pip install:
On Linux or Mac
^^^^^^^^^^^^^^^
Download the latest "Wheel" file file from `PyPI <kintyre-splunk-conf-wheel>`_. The path to this download will be
Download the latest "Wheel" file file from `PyPI <ksconf-wheel>`_. The path to this download will be
set in the ``pkg`` variable as shown below.
Setup the shell:
Expand Down Expand Up @@ -215,7 +215,7 @@ Test the install:
On Windows
^^^^^^^^^^
1. Open a browser and download the latest "Wheel" file file from `PyPI <kintyre-splunk-conf-wheel>`_.
1. Open a browser and download the latest "Wheel" file file from `PyPI <ksconf-wheel>`_.
2. Rename the ``.whl`` extension to ``.zip``. (This may require showing file extensions in Explorer.)
3. Extract the zip file to a temporary folder. (This should create a folder named "ksconf")
4. Create a new folder called "Kintyre" under the Splunk installation path (aka ``SPLUNK_HOME``)
Expand Down Expand Up @@ -273,7 +273,7 @@ version of Python that is running on destination machine.
.. code-block:: sh
# download packages
python3 -m pip download -d ksconf-packages kintyre-splunk-conf
python3 -m pip download -d ksconf-packages ksconf
A new directory named 'ksconf-packages' will be created and will contain the necessary ``*.whl`` files.
Expand Down
2 changes: 1 addition & 1 deletion ksconf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" ksconf - Kintyre Splunk CONFig tool
""" ksconf - Ksconf Splunk CONFig tool
Design goals:
Expand Down
4 changes: 2 additions & 2 deletions ksconf/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# PYTHON_ARGCOMPLETE_OK
""" ksconf - Kintyre Splunk CONFig tool
""" KSCONF - Ksconf Splunk CONFig tool
Optionally supports argcomplete for commandline argument (tab) completion.
Expand Down Expand Up @@ -40,7 +40,7 @@ def choice(options):


# ------------------------------------------ wrap to 80 chars ----------------v
_cli_description = """Ksconf: Kintyre Splunk CONFig tool
_cli_description = """KSCONF: Ksconf Splunk CONFig tool
This utility handles a number of common Splunk app maintenance tasks in a small
and easy to deploy package. Specifically, this tool deals with many of the
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_ver():
Install with
pip install kintyre-splunk-conf
pip install ksconf
Confirm installation with the following command:
Expand Down
2 changes: 1 addition & 1 deletion splunk_app/ksconf/default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ check_for_updates = true

[launcher]
author = lalleman
description = Kintyre Splunk CONFiguration tool. \
description = Ksconf Splunk CONFiguration tool. \
Provides the ksconf CLI tool for managing your Splunk deployment.

[author=lalleman]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CliSimpleTestCase(unittest.TestCase):
def test_help(self):
out = ksconf_cli("--help")
with ksconf_cli:
self.assertIn("Kintyre Splunk CONFig tool", out.stdout)
self.assertIn("Ksconf Splunk CONFig tool", out.stdout)
self.assertIn("usage: ", out.stdout)
self.assertEqual(out.returncode, EXIT_CODE_SUCCESS)

Expand Down

0 comments on commit c081fbe

Please sign in to comment.