Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 from jantman/abandon
Browse files Browse the repository at this point in the history
bump version to 1.0.0 and announce abandonment/unsupported
  • Loading branch information
jantman authored Oct 13, 2019
2 parents bd45e0f + 8861f3a commit ed51f20
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 57 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ stages:

jobs:
include:
- stage: test
python: '3.4'
env: TOXENV=py34
- stage: test
python: '3.5'
env: TOXENV=py35
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

1.0.0 (2019-10-13)
------------------

* `PR 13 <https://github.com/jantman/jiveapi/pull/13>`__ - Add function to return contentID from URL (thanks to `patricia1387 <https://github.com/patricia1387>`__).
* Announce abandonment of project / seeking new maintainer.

0.3.0 (2018-11-18)
------------------

Expand Down
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jiveapi python package
:target: https://readthedocs.org/projects/jiveapi/?badge=latest
:alt: sphinx documentation for latest release

.. image:: http://www.repostatus.org/badges/latest/wip.svg
:alt: Project Status: WIPInitial development is in progress, but there has not yet been a stable, usable release suitable for the public.
:target: http://www.repostatus.org/#wip
.. image:: https://www.repostatus.org/badges/latest/unsupported.svg
:alt: Project Status: UnsupportedThe project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.
:target: https://www.repostatus.org/#unsupported

Simple and limited Python client for `Jive <https://www.jivesoftware.com/>`_ collaboration software `ReST API v3 <https://developers.jivesoftware.com/api/v3/cloud/rest/index.html>`_, along with utilities for massaging HTML to display better on Jive. Also comes pre-installed in a Docker image and a Sphinx theme and builder for Jive-optimized HTML output.

Expand All @@ -20,11 +20,11 @@ Simple and limited Python client for `Jive <https://www.jivesoftware.com/>`_ col
Scope and Status
----------------

I'm writing this to be a working Python wrapper around a small portion of the Jive ReST API - specifically, uploading/publishing updating Documents, uploading embedded Images, and manipulating the input HTML to display better in Jive. I'm doing this in my personal time, but we'll be using the project at work for a very limited requirement: "syndicating" documentation that we publish on internal web servers (mostly Sphinx and Hugo static sites) to our corporate Jive instance. The main purpose for doing this is to reach a wider audience and for searchability, not to faithfully reproduce the layout and styling of the original HTML. I don't plan on adding support beyond what's required for that, but contributions are welcome.
**This project is effectively abandoned/unsupported and needs a new maintainer!** My employer to longer uses Jive, so I'm no longer using this project and also have no way of testing it. If you are interested in taking over as maintainer, please open an issue!

For the time being, this should be considered Alpha-quality software. It's young and likely only has a handful of code paths exercised on a regular basis, and from what I've seen in practice and in the documentation, I can only assume that Jive has many error conditions this software has yet to see. In short, for the time being, make sure you sanity check things or don't rely on this working 100% of the time. Bug reports are very welcome, but please be sure to include full debugging output.
I'm writing this to be a working Python wrapper around a small portion of the Jive ReST API - specifically, uploading/publishing updating Documents, uploading embedded Images, and manipulating the input HTML to display better in Jive. I'm doing this in my personal time, but we'll be using the project at work for a very limited requirement: "syndicating" documentation that we publish on internal web servers (mostly Sphinx and Hugo static sites) to our corporate Jive instance. The main purpose for doing this is to reach a wider audience and for searchability, not to faithfully reproduce the layout and styling of the original HTML. I don't plan on adding support beyond what's required for that, but contributions are welcome.

At least for this initial release, it is **highly recommended** that you capture DEBUG-level logging, as this will contain the Jive internal IDs needed if something goes wrong.
This has been in use daily at my current employer for almost a year. It's stable for the particular way we use it, but some code paths may not have been fully exercised before.

Also be aware that Jive **heavily modifies** HTML, including stripping out and sometimes replacing ``id`` attributes, breaking any internal anchor links containing dashes, etc. The high-level methods in this package make a best effort to modify HTML to work in Jive, but nothing is guaranteed. Once again, this is focused on content not presentation.

Expand Down Expand Up @@ -56,8 +56,8 @@ Requirements

jiveapi is also available in a self-contained Docker image with all dependencies. See `https://hub.docker.com/r/jantman/jiveapi/ <https://hub.docker.com/r/jantman/jiveapi/>`_.

* Python 3.4+. Yes, this package is *only* developed and tested against Python3, specifically 3.4 or later. It *should* work under 2.7 as well, but that is neither tested nor supported.
* `requests <http://docs.python-requests.org/en/master/>`_
* Python 3.5+. Yes, this package is *only* developed and tested against Python3, specifically 3.5 or later. It *should* work under 2.7 as well, but that is neither tested nor supported.
* `requests <https://requests.kennethreitz.org/en/master/>`_
* `premailer <http://github.com/peterbe/premailer>`_ (optional, only required for high-level JiveContent interface)
* `lxml <http://lxml.de/>`_ (optional, only required for high-level JiveContent interface)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'https://docs.python.org/3/': None,
'requests': ('http://docs.python-requests.org/en/master/', None),
'requests': ('https://requests.kennethreitz.org/en/master/', None),
'sphinx': ('http://www.sphinx-doc.org/en/latest/', None)
}

Expand Down
2 changes: 1 addition & 1 deletion docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Testing

Testing is done via `tox <https://tox.readthedocs.io/en/latest/>`_ and `pytest <https://docs.pytest.org/en/latest/>`_. ``pip install tox`` then ``tox`` to run tests.

The package itself uses the wonderful `requests package <http://docs.python-requests.org/en/master/>`_ as a HTTP(S) client. Tests use the `betamax <http://betamax.readthedocs.io/en/latest/index.html>`_ package to record and replay HTTP(S) requests and responses. When adding a new test using betamax, set ``JIVEAPI_TEST_MODE=--record`` in your environment to capture and record new requests - otherwise, outgoing HTTP requests will be blocked. To re-record a test, delete the current capture from ``tests/fixtures/cassettes``. Before committing test data, please inspect it and be sure that no sensitive information is included. To print all base64 bodies from a specific betamax "cassette", you can use ``jiveapi/tests/fixtures/showcassette.py``.
The package itself uses the wonderful :ref:`requests package <requests:introduction>` as a HTTP(S) client. Tests use the `betamax <http://betamax.readthedocs.io/en/latest/index.html>`_ package to record and replay HTTP(S) requests and responses. When adding a new test using betamax, set ``JIVEAPI_TEST_MODE=--record`` in your environment to capture and record new requests - otherwise, outgoing HTTP requests will be blocked. To re-record a test, delete the current capture from ``tests/fixtures/cassettes``. Before committing test data, please inspect it and be sure that no sensitive information is included. To print all base64 bodies from a specific betamax "cassette", you can use ``jiveapi/tests/fixtures/showcassette.py``.
6 changes: 3 additions & 3 deletions docs/source/jiveapi.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.api module
==================

.. automodule:: jiveapi.api
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/source/jiveapi.content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.content module
======================

.. automodule:: jiveapi.content
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/source/jiveapi.exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.exceptions module
=========================

.. automodule:: jiveapi.exceptions
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/source/jiveapi.jiveresponse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.jiveresponse module
===========================

.. automodule:: jiveapi.jiveresponse
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
9 changes: 4 additions & 5 deletions docs/source/jiveapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ jiveapi package
===============

.. automodule:: jiveapi
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::

jiveapi.sphinx_theme
jiveapi.sphinx_theme

Submodules
----------
Expand All @@ -24,4 +24,3 @@ Submodules
jiveapi.jiveresponse
jiveapi.utils
jiveapi.version

6 changes: 3 additions & 3 deletions docs/source/jiveapi.sphinx_theme.builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.sphinx\_theme.builder module
====================================

.. automodule:: jiveapi.sphinx_theme.builder
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/jiveapi.sphinx_theme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ jiveapi.sphinx\_theme package
=============================

.. automodule:: jiveapi.sphinx_theme
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::

jiveapi.sphinx_theme.builder

6 changes: 3 additions & 3 deletions docs/source/jiveapi.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.utils module
====================

.. automodule:: jiveapi.utils
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/source/jiveapi.version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ jiveapi.version module
======================

.. automodule:: jiveapi.version
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Please keep in mind that, since the container runs as root, any files it writes
Sphinx Theme and Builder
------------------------

This package includes a `Sphinx <http://www.sphinx-doc.org/>`_ theme and builder that generate single-page HTML output optimized for uploading to Jive via jiveapi. The theme is based on sphinx' :ref:`built-in "basic" theme <builtin-themes>` and the builder is based on sphinx' built-in :py:class:`~sphinx.builders.html.SingleFileHTMLBuilder`.
This package includes a `Sphinx <http://www.sphinx-doc.org/>`_ theme and builder that generate single-page HTML output optimized for uploading to Jive via jiveapi. The theme is based on sphinx' :ref:`built-in "basic" theme <builtin-themes>` and the builder is based on sphinx' built-in :py:class:`sphinx:sphinx.builders.singlehtml.SingleFileHTMLBuilder`.

To build your existing Sphinx documentation you need only install the jiveapi package and specify the "jiveapi" theme and "jiveapi" builder. For example, if your documentation source is in the ``source/`` directory, then you could build a single-page jive-optimized HTML file to ``jivehtml/index.html`` with:

Expand Down
22 changes: 12 additions & 10 deletions jiveapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,14 @@ def get_content_in_place(self, place_id):

def _get_content_id_by_html_url(self, path):
"""
Return contentID from given html/url
contentID is unique identifier which is associated with majority type of contents in Jive Api for example you can
look here https://developers.jivesoftware.com/api/v3/cloud/rest/DocumentEntity.html
:param path: html or full URL to GET
:type path: str
:return: contentID from given url
:rtype: ``str``
"""
"""
Return contentID from given html/url
contentID is unique identifier which is associated with majority type of
contents in Jive Api for example you can look here
https://developers.jivesoftware.com/api/v3/cloud/rest/DocumentEntity.html
:param path: html or full URL to GET
:type path: str
:return: contentID from given url
:rtype: ``str``
:variable aux: stored _get response
"""
if not path.endswith('/api/v3'):
Expand All @@ -421,4 +420,7 @@ def _get_content_id_by_html_url(self, path):
if isinstance(aux, dict):
return aux.get('contentID')
else:
logger.debug("Unexpected return type of _get function, expected type is dictionary ")
logger.debug(
"Unexpected return type of _get function, expected type is"
" dictionary."
)
2 changes: 1 addition & 1 deletion jiveapi/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#: Constant to hold this version of the package, used both in ``setup.py`` and
#: anywhere in the code that reports the version.
VERSION = '0.3.0'
VERSION = '1.0.0'

#: Constant to hold the project URL, used both in ``setup.py`` and anywhere in
#: the code that reports the version.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


classifiers = [
'Development Status :: 3 - Alpha',
'Development Status :: 7 - Inactive',
'License :: OSI Approved :: GNU Affero General Public License '
'v3 or later (AGPLv3+)',
'Natural Language :: English',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py34,py35,py36,py37,docs,docker
envlist = py35,py36,py37,docs,docker

[testenv]
deps =
Expand Down

0 comments on commit ed51f20

Please sign in to comment.