Skip to content

Commit 8534f5a

Browse files
committed
Merge branch 'main' into maciej_master
2 parents f06e1f0 + af44ba3 commit 8534f5a

17 files changed

+85
-20
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: Tests
22

33
on: [push]
44

.readthedocs.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: doc/conf.py
16+
17+
# Optional but recommended, declare the Python requirements required
18+
# to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
# python:
21+
# install:
22+
# - requirements: docs/requirements.txt
23+
# test line - delete later

README.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
|logo|
22

3-
|Build Status|
3+
|Build Status| |Docs Status|
44

55
Streamparse lets you run Python code against real-time streams of data via
66
Apache Storm. With streamparse you can create Storm bolts and spouts in
@@ -59,7 +59,11 @@ Roadmap
5959

6060
See the `Roadmap <https://github.com/Parsely/streamparse/wiki/Roadmap>`__.
6161

62-
.. |logo| image:: https://raw.githubusercontent.com/Parsely/streamparse/master/doc/source/images/streamparse-logo.png
63-
.. |Build Status| image:: https://travis-ci.org/Parsely/streamparse.svg?branch=master
64-
:target: https://travis-ci.org/Parsely/streamparse
62+
.. |logo| image:: https://raw.githubusercontent.com/Parsely/streamparse/master/doc/images/streamparse-logo.png
63+
.. |Build Status| image:: https://github.com/pystorm/streamparse/actions/workflows/test.yml/badge.svg
64+
:target: https://github.com/pystorm/streamparse/actions/workflows/test.yml
65+
:alt: Build Status
66+
.. |Docs Status| image:: https://readthedocs.org/projects/streamparse/badge/?version=latest
67+
:target: https://streamparse.readthedocs.io/en/stable/?badge=latest
68+
:alt: Documentation Status
6569
.. |Demo| image:: https://raw.githubusercontent.com/Parsely/streamparse/master/doc/source/images/quickstart.gif
File renamed without changes.

doc/source/conf.py renamed to doc/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# If extensions (or modules to document with autodoc) are in another directory,
1818
# add these directories to sys.path here. If the directory is relative to the
1919
# documentation root, use os.path.abspath to make it absolute, like shown here.
20-
sys.path.insert(0, os.path.abspath("../../streamparse"))
20+
sys.path.insert(0, os.path.abspath("../streamparse"))
2121
from version import __version__ as VERSION
2222

2323
# -- General configuration ------------------------------------------------
@@ -40,7 +40,7 @@
4040
templates_path = ["_templates"]
4141

4242
# The suffix of source filenames.
43-
source_suffix = ".rst"
43+
# source_suffix = {".rst": "restructuredtext"}
4444

4545
# The encoding of source files.
4646
# source_encoding = 'utf-8-sig'
@@ -50,7 +50,7 @@
5050

5151
# General information about the project.
5252
project = "streamparse"
53-
copyright = "2014-2020, Parsely"
53+
copyright = "2014-2024, Parsely"
5454

5555
# The version info for the project you're documenting, acts as replacement for
5656
# |version| and |release|, also used in various other places throughout the
@@ -277,4 +277,4 @@
277277

278278

279279
# Example configuration for intersphinx: refer to the Python standard library.
280-
intersphinx_mapping = {"http://docs.python.org/": None}
280+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/source/index.rst renamed to doc/index.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
streamparse lets you run Python code against real-time streams of data.
1010
Integrates with Apache Storm.
1111

12-
.. image:: https://travis-ci.org/Parsely/streamparse.svg?branch=master
13-
:target: https://travis-ci.org/Parsely/streamparse
12+
.. image:: https://github.com/pystorm/streamparse/actions/workflows/test.yml/badge.svg
13+
:target: https://github.com/pystorm/streamparse/actions/workflows/test.yml
14+
:alt: Build Status
15+
.. image:: https://readthedocs.org/projects/streamparse/badge/?version=stable
16+
:target: https://streamparse.readthedocs.io/en/stable/?badge=stable
17+
:alt: Documentation Status
1418

1519
.. toctree::
1620
:maxdepth: 1
@@ -19,6 +23,7 @@ Integrates with Apache Storm.
1923
topologies
2024
api
2125
develop
26+
releases
2227
faq
2328

2429
.. image:: images/quickstart.gif

doc/source/quickstart.rst renamed to doc/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ topology in pure Python using Thrift. For details see :ref:`topology_dsl`.
135135
Let's have a look at the definition file created by using the
136136
``sparse quickstart`` command.
137137

138-
.. literalinclude:: ../../streamparse/bootstrap/project/topologies/wordcount.py
138+
.. literalinclude:: ../streamparse/bootstrap/project/topologies/wordcount.py
139139
:language: python
140140

141141
In the ``count_bolt`` bolt, we've told Storm that we'd like the stream of

doc/releases.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Creating a new Streamparse Release
2+
==================================
3+
4+
First, update the version number in ``version.py`` using `semantic versioning <https://semver.org>`_.
5+
6+
Tag your commit with the new version number. For example::
7+
8+
git tag -a v0.1.0 -m "v0.1.0"
9+
10+
Push the tag to GitHub::
11+
12+
git push origin v0.1.0
13+
14+
Install twine and install build::
15+
16+
pip install twine
17+
pip install build
18+
19+
Build the package::
20+
21+
python -m build
22+
23+
Upload the package to test.pypi.org::
24+
25+
twine upload --repository testpypi dist/*
26+
27+
*Verify you can install it.* Then, upload it to pypi.org::
28+
29+
twine upload dist/*
30+
31+
*Again, verify it installs correctly.* Then, finally, create a new release on GitHub.
32+
33+
.. _SEMVER: https://semver.org

doc/source/topologies.rst renamed to doc/topologies.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Simple Python Example
3636
The first step to putting together a topology, is creating the bolts and spouts,
3737
so let's assume we have the following bolt and spout:
3838

39-
.. literalinclude:: ../../examples/redis/src/bolts.py
39+
.. literalinclude:: ../examples/redis/src/bolts.py
4040
:language: python
4141
:lines: 1-28
4242

43-
.. literalinclude:: ../../examples/redis/src/spouts.py
43+
.. literalinclude:: ../examples/redis/src/spouts.py
4444
:language: python
4545

4646
One important thing to note is that we have added an ``outputs`` attribute to
@@ -51,7 +51,7 @@ objects.
5151

5252
Now let's hook up the bolt to read from the spout:
5353

54-
.. literalinclude:: ../../examples/redis/topologies/wordcount_mem.py
54+
.. literalinclude:: ../examples/redis/topologies/wordcount_mem.py
5555
:language: python
5656

5757
.. note::
@@ -72,7 +72,7 @@ The topology DSL fully supports JVM-based bolts and spouts via the
7272
Here's an example of how we would use the
7373
`Storm Kafka Spout <http://storm.apache.org/releases/current/storm-kafka.html>`_:
7474

75-
.. literalinclude:: ../../examples/kafka-jvm/topologies/pixelcount.py
75+
.. literalinclude:: ../examples/kafka-jvm/topologies/pixelcount.py
7676
:language: python
7777

7878
One limitation of the Thrift interface we use to send the topology to Storm is
@@ -127,7 +127,7 @@ attribute. The most common grouping is probably the
127127
with the same value for the specified fields to the same executor. This can be
128128
seen in the prototypical word count topology:
129129

130-
.. literalinclude:: ../../examples/redis/topologies/wordcount_mem.py
130+
.. literalinclude:: ../examples/redis/topologies/wordcount_mem.py
131131
:language: python
132132

133133

streamparse/cli/update_virtualenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _create_or_update_virtualenv(
6767
puts(f"Updating virtualenv: {virtualenv_name}")
6868
pip_path = "/".join((virtualenv_path, "bin", "pip"))
6969
# Make sure we're using latest pip so options work as expected
70-
run_cmd(f"{pip_path} install --upgrade 'pip>=9.0,!=19.0' setuptools", user)
70+
run_cmd(f"{pip_path} install --upgrade 'pip>=9.0,!=19.0' setuptools==69.5.1", user)
7171
run_cmd(
7272
(
7373
"{} install -r {} --exists-action w --upgrade "

streamparse/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222

2323
def _safe_int(string):
24-
""" Simple function to convert strings into ints without dying. """
24+
"""Simple function to convert strings into ints without dying."""
2525
try:
2626
return int(string)
2727
except ValueError:
2828
return string
2929

3030

31-
__version__ = "4.1.2.post1"
31+
__version__ = "5.0.0"
3232
VERSION = tuple(_safe_int(x) for x in __version__.split("."))

0 commit comments

Comments
 (0)