From: Claromes Date: Tue, 18 Jun 2024 08:19:56 +0000 (-0300) Subject: review docs, update pyproject X-Git-Url: https://git.claromes.com/?a=commitdiff_plain;h=0972d4ff1d66ca036f86c80d6714f0fc728946b0;p=waybacktweets.git review docs, update pyproject --- diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..804a8cb --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,36 @@ +name: docs + +on: + pull_request: + types: [closed] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + - name: Install dependencies + run: | + poetry install + - name: Sphinx build + run: | + mkdir gh-pages + touch gh-pages/.nojekyll + cd docs/ + poetry run sphinx-build -b html . _build + cp -r _build/* ../gh-pages/ + - name: Deploy documentation + if: ${{ github.event.pull_request.merged == true }} + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: gh-pages diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 55e3593..0000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: documentation - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: write - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - - name: Install dependencies - run: | - poetry install - - name: Sphinx build - run: | - mkdir gh-pages - touch gh-pages/.nojekyll - cd docs/ - poetry run sphinx-build -b html . _build - cp -r _build/* ../gh-pages/ - - name: Deploy documentation - if: ${{ github.event_name == 'push' }} - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - branch: gh-pages - folder: gh-pages diff --git a/README.md b/README.md index 12672c6..bcdb41e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Wayback Tweets -[![PyPI](https://img.shields.io/pypi/v/waybacktweets)](https://pypi.org/project/waybacktweets) [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://waybacktweets.streamlit.app) +[![PyPI](https://img.shields.io/pypi/v/waybacktweets)](https://pypi.org/project/waybacktweets) [![docs](https://github.com/claromes/waybacktweets/actions/workflows/docs.yml/badge.svg)](https://github.com/claromes/waybacktweets/actions/workflows/documentation.yml) [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://waybacktweets.streamlit.app) -Retrieves archived tweets CDX data from the Wayback Machine, performs several parses to facilitate the analysis of archived tweets and types of tweets (see [Field Options](https://claromes.github.io/waybacktweets/field_options.html)), and saves the data in CSV, JSON, and HTML formats. +Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing (see [Field Options](https://claromes.github.io/waybacktweets/field_options.html)), and saves the data in CSV, JSON, and HTML formats. ## Installation diff --git a/docs/conf.py b/docs/conf.py index 599c92f..b261555 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,8 @@ from pallets_sphinx_themes import ProjectLink, get_version project = "Wayback Tweets" release, version = get_version("waybacktweets") -copyright = f"2023 - {datetime.datetime.now().year}, Claromes · Icon by The Doodle Library · Title font by Google, licensed under the Open Font License · Wayback Tweets v{version}" # noqa: E501 +rst_epilog = f".. |release| replace:: v{release}" +copyright = f"2023 - {datetime.datetime.now().year}, Claromes · Icon by The Doodle Library · Title font by Google, licensed under the Open Font License · Release: v{release}" # noqa: E501 author = "Claromes" # -- General configuration --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 4912f14..4c61565 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,9 @@ Wayback Tweets .. image:: ../assets/waybacktweets.png :align: center -Retrieves archived tweets CDX data from the Wayback Machine, performs several parses to facilitate the analysis of archived tweets and types of tweets (see :ref:`field_options`), and saves the data in CSV, JSON, and HTML formats. +Release: |release| + +Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing (see :ref:`field_options`), and saves the data in CSV, JSON, and HTML formats. .. note:: Intensive queries can lead to rate limiting, resulting in a temporary ban of a few minutes from web.archive.org. diff --git a/docs/installation.rst b/docs/installation.rst index 5ffb064..52e614d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -39,10 +39,26 @@ From source poetry install - Run Streamlit App: + Run the CLI: + + .. code-block:: shell + + poetry run waybacktweets [SUBCOMMANDS] + + Run the Streamlit App: .. code-block:: shell streamlit run app/app.py + Build the docs: + + .. code-block:: shell + + cd docs + + .. code-block:: shell + + make clean html + `Read the Poetry CLI documentation `_. diff --git a/docs/modules.rst b/docs/modules.rst deleted file mode 100644 index 88fb379..0000000 --- a/docs/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -waybacktweets -============= - -.. toctree:: - :maxdepth: 4 - - api diff --git a/docs/streamlit.rst b/docs/streamlit.rst index bdf360c..f1880b7 100644 --- a/docs/streamlit.rst +++ b/docs/streamlit.rst @@ -1,5 +1,5 @@ .. note:: - The current version of the Web App is v0.4.3. Version 1.0 has not yet been implemented in the Streamlit Web App, as it is in the review and testing phase. + The current version of the Web App is 0.4.3. Version 1.0 has not yet been implemented in the Streamlit Web App, as it is in the review and testing phase. Web App ========= diff --git a/poetry.lock b/poetry.lock index b92291e..740b153 100644 --- a/poetry.lock +++ b/poetry.lock @@ -29,7 +29,6 @@ numpy = "*" packaging = "*" pandas = ">=0.25" toolz = "*" -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] all = ["altair-tiles (>=0.3.0)", "anywidget (>=0.9.0)", "pyarrow (>=11)", "vega-datasets (>=0.9.0)", "vegafusion[embed] (>=1.6.6)", "vl-convert-python (>=1.3.0)"] @@ -106,8 +105,6 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -323,18 +320,18 @@ typing = ["typing-extensions (>=4.8)"] [[package]] name = "flake8" -version = "7.0.0" +version = "7.1.0" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.8.1" files = [ - {file = "flake8-7.0.0-py2.py3-none-any.whl", hash = "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3"}, - {file = "flake8-7.0.0.tar.gz", hash = "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132"}, + {file = "flake8-7.1.0-py2.py3-none-any.whl", hash = "sha256:2e416edcc62471a64cea09353f4e7bdba32aeb079b6e360554c659a122b1bc6a"}, + {file = "flake8-7.1.0.tar.gz", hash = "sha256:48a07b626b55236e0fb4784ee69a465fbf59d79eec1f5b4785c3d3bc57d17aa5"}, ] [package.dependencies] mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.11.0,<2.12.0" +pycodestyle = ">=2.12.0,<2.13.0" pyflakes = ">=3.2.0,<3.3.0" [[package]] @@ -349,7 +346,6 @@ files = [ [package.dependencies] Flake8 = ">=5" -TOMLi = {version = "*", markers = "python_version < \"3.11\""} [package.extras] dev = ["pyTest", "pyTest-cov"] @@ -422,25 +418,6 @@ files = [ {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] -[[package]] -name = "importlib-metadata" -version = "7.1.0" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, - {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, -] - -[package.dependencies] -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] - [[package]] name = "isort" version = "5.13.2" @@ -755,7 +732,6 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, {version = ">=1.23.2", markers = "python_version == \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] @@ -989,13 +965,13 @@ numpy = ">=1.16.6" [[package]] name = "pycodestyle" -version = "2.11.1" +version = "2.12.0" description = "Python style guide checker" optional = false python-versions = ">=3.8" files = [ - {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, - {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, + {file = "pycodestyle-2.12.0-py2.py3-none-any.whl", hash = "sha256:949a39f6b86c3e1515ba1787c2022131d165a8ad271b11370a8819aa070269e4"}, + {file = "pycodestyle-2.12.0.tar.gz", hash = "sha256:442f950141b4f43df752dd303511ffded3a04c2b6fb7f65980574f0c31e6e79c"}, ] [[package]] @@ -1339,7 +1315,6 @@ babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} docutils = ">=0.18.1,<0.22" imagesize = ">=1.3" -importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} Jinja2 = ">=3.0" packaging = ">=21.0" Pygments = ">=2.14" @@ -1351,7 +1326,6 @@ sphinxcontrib-htmlhelp = ">=2.0.0" sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" sphinxcontrib-serializinghtml = ">=1.1.9" -tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] @@ -1572,13 +1546,13 @@ snowflake = ["snowflake-connector-python (>=2.8.0)", "snowflake-snowpark-python [[package]] name = "tenacity" -version = "8.3.0" +version = "8.4.1" description = "Retry code until it succeeds" optional = false python-versions = ">=3.8" files = [ - {file = "tenacity-8.3.0-py3-none-any.whl", hash = "sha256:3649f6443dbc0d9b01b9d8020a9c4ec7a1ff5f6f3c6c8a036ef371f573fe9185"}, - {file = "tenacity-8.3.0.tar.gz", hash = "sha256:953d4e6ad24357bceffbc9707bc74349aca9d245f68eb65419cf0c249a1949a2"}, + {file = "tenacity-8.4.1-py3-none-any.whl", hash = "sha256:28522e692eda3e1b8f5e99c51464efcc0b9fc86933da92415168bc1c4e2308fa"}, + {file = "tenacity-8.4.1.tar.gz", hash = "sha256:54b1412b878ddf7e1f1577cd49527bad8cdef32421bd599beac0c6c3f10582fd"}, ] [package.extras] @@ -1596,17 +1570,6 @@ files = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - [[package]] name = "toolz" version = "0.12.1" @@ -1662,13 +1625,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -1741,22 +1704,7 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] -[[package]] -name = "zipp" -version = "3.19.2" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, - {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, -] - -[package.extras] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] - [metadata] lock-version = "2.0" -python-versions = ">=3.9,<3.9.7 || >3.9.7,<4.0" -content-hash = "ae61f09c64379a426d38a928c465c33775dfc8cf2da26bf33709e81cfae80aa5" +python-versions = "^3.11" +content-hash = "37fcbc9255674bf67e65a2db35dbd71355fc97751141e739f31bb50fe708aa04" diff --git a/pyproject.toml b/pyproject.toml index b4db336..4269854 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,38 @@ [tool.poetry] name = "waybacktweets" -version = "1.0" -description = "Retrieves archived tweets' CDX data from the Wayback Machine" +version = "1.0a1" +description = "Retrieves archived tweets CDX data from the Wayback Machine, performs necessary parsing, and saves the data." authors = ["Claromes "] -license = "GPL-3.0" +license = "GPLv3" readme = "README.md" +repository = "https://github.com/claromes/waybacktweets" +documentation = "https://claromes.github.io/waybacktweets/" +keywords = [ + "twitter", + "tweet", + "internet-archive", + "wayback-machine", + "osint-tools", + "osint", + "command-line", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python :: 3.11", + "Topic :: Software Development", + "Topic :: Utilities", +] + +[tool.poetry.urls] +"Documentation" = "https://claromes.github.io/waybacktweets/" +"Issue Tracker" = "https://github.com/claromes/waybacktweets/issues" [tool.poetry.dependencies] -python = ">=3.9,<3.9.7 || >3.9.7,<4.0" +python = "^3.11" requests = "^2.30.0" streamlit = "1.35.0" rich = "^13.6.0" diff --git a/waybacktweets/__init__.py b/waybacktweets/__init__.py index f8333d8..8de2c5f 100644 --- a/waybacktweets/__init__.py +++ b/waybacktweets/__init__.py @@ -4,5 +4,3 @@ from waybacktweets.api.export import TweetsExporter from waybacktweets.api.parse import JsonParser, TweetsParser, TwitterEmbed from waybacktweets.api.request import WaybackTweets from waybacktweets.api.visualize import HTMLTweetsVisualizer - -__version__ = "1.0"