From 8d9501598ff066706c1300a9f6f5193912f2cb4d Mon Sep 17 00:00:00 2001 From: David Lord Date: Tue, 16 Feb 2021 08:36:14 -0800 Subject: [PATCH 1/4] use rtd to build docs for prs skip code tests when only docs change --- .github/workflows/tests.yaml | 9 ++++++++- .readthedocs.yaml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5a2f72a4..7d34bf78 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,10 +4,18 @@ on: branches: - master - '*.x' + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' pull_request: branches: - master - '*.x' + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' jobs: tests: name: ${{ matrix.name }} @@ -23,7 +31,6 @@ jobs: - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} - {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36} - {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3} - - {name: Docs, python: '3.9', os: ubuntu-latest, tox: docs} steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 19069520..0c363636 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,3 +6,4 @@ python: path: . sphinx: builder: dirhtml + fail_on_warning: true From 3cd615a1d6db7e319c27bca2499ab7390065f090 Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 24 Feb 2021 10:09:15 -0800 Subject: [PATCH 2/4] update project links --- README.rst | 28 +++++++++++++++------------- docs/conf.py | 8 +++++--- setup.cfg | 8 ++++++-- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/README.rst b/README.rst index 69e53457..95f9bbae 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,10 @@ project layout. It is up to the developer to choose the tools and libraries they want to use. There are many extensions provided by the community that make adding new functionality easy. +.. _WSGI: https://wsgi.readthedocs.io/ +.. _Werkzeug: https://werkzeug.palletsprojects.com/ +.. _Jinja: https://jinja.palletsprojects.com/ + Installing ---------- @@ -22,6 +26,8 @@ Install and update using `pip`_: $ pip install -U Flask +.. _pip: https://pip.pypa.io/en/stable/quickstart/ + A Simple Example ---------------- @@ -60,21 +66,17 @@ it uses. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, `please donate today`_. -.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20 +.. _please donate today: https://palletsprojects.com/donate Links ----- -* Website: https://palletsprojects.com/p/flask/ -* Documentation: https://flask.palletsprojects.com/ -* Releases: https://pypi.org/project/Flask/ -* Code: https://github.com/pallets/flask -* Issue tracker: https://github.com/pallets/flask/issues -* Test status: https://dev.azure.com/pallets/flask/_build -* Official chat: https://discord.gg/pallets - -.. _WSGI: https://wsgi.readthedocs.io -.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/ -.. _Jinja: https://www.palletsprojects.com/p/jinja/ -.. _pip: https://pip.pypa.io/en/stable/quickstart/ +- Documentation: https://flask.palletsprojects.com/ +- Changes: https://flask.palletsprojects.com/changes/ +- PyPI Releases: https://pypi.org/project/Flask/ +- Source Code: https://github.com/pallets/flask/ +- Issue Tracker: https://github.com/pallets/flask/issues/ +- Website: https://palletsprojects.com/p/flask/ +- Twitter: https://twitter.com/PalletsTeam +- Chat: https://discord.gg/pallets diff --git a/docs/conf.py b/docs/conf.py index 796a31ee..4b7ea13e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,11 +38,13 @@ html_theme = "flask" html_theme_options = {"index_sidebar_logo": False} html_context = { "project_links": [ - ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"), - ProjectLink("Flask Website", "https://palletsprojects.com/p/flask/"), - ProjectLink("PyPI releases", "https://pypi.org/project/Flask/"), + ProjectLink("Donate", "https://palletsprojects.com/donate"), + ProjectLink("PyPI Releases", "https://pypi.org/project/Flask/"), ProjectLink("Source Code", "https://github.com/pallets/flask/"), ProjectLink("Issue Tracker", "https://github.com/pallets/flask/issues/"), + ProjectLink("Website", "https://palletsprojects.com/p/flask/"), + ProjectLink("Twitter", "https://twitter.com/PalletsTeam"), + ProjectLink("Chat", "https://discord.gg/pallets"), ] } html_sidebars = { diff --git a/setup.cfg b/setup.cfg index 15cf18d6..b0ee6567 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,9 +3,13 @@ name = Flask # Version needs regex in setup.py. url = https://palletsprojects.com/p/flask project_urls = + Donate = https://palletsprojects.com/donate Documentation = https://flask.palletsprojects.com/ - Code = https://github.com/pallets/flask - Issue tracker = https://github.com/pallets/flask/issues + Changes = https://flask.palletsprojects.com/changes/ + Source Code = https://github.com/pallets/flask/ + Issue Tracker = https://github.com/pallets/flask/issues/ + Twitter = https://twitter.com/PalletsTeam + Chat = https://discord.gg/pallets license = BSD-3-Clause author = Armin Ronacher author_email = armin.ronacher@active-4.com From 9e7d3a6b694b27f997266889ae463e06dd83a189 Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 24 Feb 2021 10:09:38 -0800 Subject: [PATCH 3/4] docs rename changelog to changes --- MANIFEST.in | 1 - docs/{changelog.rst => changes.rst} | 0 docs/index.rst | 4 ++-- docs/license.rst | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) rename docs/{changelog.rst => changes.rst} (100%) diff --git a/MANIFEST.in b/MANIFEST.in index a63d6ee1..ddf88236 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,5 @@ include CHANGES.rst include CONTRIBUTING.rst -include LICENSE.rst include tox.ini include requirements/*.txt graft artwork diff --git a/docs/changelog.rst b/docs/changes.rst similarity index 100% rename from docs/changelog.rst rename to docs/changes.rst diff --git a/docs/index.rst b/docs/index.rst index ec47b232..151dde92 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -85,6 +85,6 @@ Design notes, legal information and changelog are here for the interested. htmlfaq security extensiondev - changelog - license contributing + license + changes diff --git a/docs/license.rst b/docs/license.rst index 7d0c2f39..f3f64823 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -1,8 +1,8 @@ License ======= -Source License --------------- +BSD-3-Clause Source License +--------------------------- The BSD-3-Clause license applies to all files in the Flask repository and source distribution. This includes Flask's source code, the From 0c7cbe2d1186f53efcd0da0589a2eaf0382e4d39 Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 24 Feb 2021 10:09:50 -0800 Subject: [PATCH 4/4] move version to setup.cfg --- setup.cfg | 2 +- setup.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index b0ee6567..9dee3575 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = Flask -# Version needs regex in setup.py. +version = attr: flask.__version__ url = https://palletsprojects.com/p/flask project_urls = Donate = https://palletsprojects.com/donate diff --git a/setup.py b/setup.py index 6218be60..7ec4196f 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,8 @@ -import re - from setuptools import setup -with open("src/flask/__init__.py", encoding="utf8") as f: - version = re.search(r'__version__ = "(.*?)"', f.read()).group(1) - # Metadata goes in setup.cfg. These are here for GitHub's dependency graph. setup( name="Flask", - version=version, install_requires=[ "Werkzeug>=0.15", "Jinja2>=2.10.1",