Skip to content

Commit ce18872

Browse files
authored
Merge branch 'master' into fix-integer-index
2 parents 9358aab + 87267c5 commit ce18872

File tree

9 files changed

+86
-26
lines changed

9 files changed

+86
-26
lines changed

.github/workflows/release.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,75 @@ jobs:
2626
run: |
2727
python setup.py sdist bdist_wheel
2828
twine upload dist/*
29+
feedstock:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Set up Python 3.8
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: 3.8
37+
- name: Checkout flask-restx code
38+
uses: actions/checkout@v2
39+
with:
40+
path: base
41+
- name: Checkout flask-restx-feedstock code
42+
uses: actions/checkout@v2
43+
with:
44+
repository: python-restx/flask-restx-feedstock.git
45+
path: feedstock
46+
token: ${{ secrets.BOT_TOKEN }}
47+
- name: Set Variables
48+
id: vars
49+
run: |
50+
echo "::set-output name=version::$(echo ${{ github.ref }} | cut -d'/' -f3)"
51+
- name: Create a release branch
52+
run: |
53+
cd feedstock
54+
git remote add forge https://github.com/conda-forge/flask-restx-feedstock.git
55+
git fetch forge
56+
git checkout forge/master -b release-${{ steps.vars.outputs.version }}
57+
- name: Update meta.yml
58+
shell: python
59+
run: |
60+
from http import client
61+
from pkg_resources import parse_requirements
62+
import re
63+
VERSION = "${{ steps.vars.outputs.version }}"
64+
with open("feedstock/recipe/meta.yaml") as f:
65+
meta = f.read()
66+
requirements = []
67+
with open("base/requirements/install.pip") as f:
68+
for req in parse_requirements(f):
69+
name = req.project_name
70+
versions = ",".join(["".join(spec) for spec in req.specs])
71+
if versions:
72+
name += " " + versions
73+
requirements.append(name)
74+
requirements = '"' + '", "'.join(requirements) + '"'
75+
conn = client.HTTPSConnection("pypi.org")
76+
conn.request("GET", "/simple/flask-restx/")
77+
resp = conn.getresponse()
78+
content = str(resp.read(), "utf-8")
79+
conn.close()
80+
m = re.findall(r'flask-restx-%s.tar.gz#sha256=([A-Za-z0-9]+)"' % VERSION, content)
81+
if not m:
82+
raise Exception("sha256 not found in: %s" % content)
83+
sha256 = m[0]
84+
meta = re.sub(r'({% set version = )".+"( %})', r'\1"%s"\2' % VERSION, meta)
85+
meta = re.sub(r'({% set sha256 = )".+"( %})', r'\1"%s"\2' % sha256, meta)
86+
meta = re.sub(r"({% set requirements = \[).+(] %})", r"\1%s\2" % requirements, meta)
87+
meta = re.sub(r"(number:) \d+", r"\1 0", meta)
88+
with open("feedstock/recipe/meta.yaml", "w") as f:
89+
f.write(meta)
90+
- name: Push
91+
run: |
92+
cd feedstock
93+
git config user.name "${{ secrets.BOT_USERNAME }}"
94+
git config user.email "[email protected]"
95+
git add recipe/meta.yaml
96+
git commit -m"Release version ${{ steps.vars.outputs.version }}"
97+
git push origin release-${{ steps.vars.outputs.version }}
98+
- name: Create Pull Request
99+
run: |
100+
curl --fail -u ${{ secrets.BOT_USERNAME }}:${{ secrets.BOT_TOKEN }} https://api.github.com/repos/conda-forge/flask-restx-feedstock/pulls -d '{"title": "Release version ${{ steps.vars.outputs.version }}", "head": "python-restx:release-${{ steps.vars.outputs.version }}", "base": "master", "maintainer_can_modify": true}'

.github/workflows/test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,10 @@ jobs:
6161
pip install ".[test]"
6262
- name: Test with inv
6363
run: inv cover qa
64-
- name: Coveralls
65-
if: github.repository == 'python-restx/flask-restx' && github.event == 'push'
66-
run: |
67-
pip install coveralls
68-
coveralls --rcfile=coverage.rc
69-
env:
70-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
64+
- name: Codecov
65+
uses: codecov/codecov-action@v1
66+
with:
67+
file: ./coverage.xml
7168
bench:
7269
needs: unit-tests
7370
runs-on: ubuntu-latest

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
Flask RESTX
33
===========
44

5-
.. image:: https://github.com/python-restx/flask-restx/workflows/Tests/badge.svg?tag=0.1.1&event=push
5+
.. image:: https://github.com/python-restx/flask-restx/workflows/Tests/badge.svg?branch=master&event=push
66
:target: https://github.com/python-restx/flask-restx/actions?query=workflow%3ATests
77
:alt: Tests status
8-
.. image:: https://coveralls.io/repos/github/python-restx/flask-restx/badge.svg?tag=0.1.1
9-
:target: https://coveralls.io/github/python-restx/flask-restx?tag=0.1.1
8+
.. image:: https://codecov.io/gh/python-restx/flask-restx/branch/master/graph/badge.svg
9+
:target: https://codecov.io/gh/python-restx/flask-restx
1010
:alt: Code coverage
11-
.. image:: https://readthedocs.org/projects/flask-restx/badge/?version=0.1.1
12-
:target: https://flask-restx.readthedocs.io/en/0.1.1/
11+
.. image:: https://readthedocs.org/projects/flask-restx/badge/?version=latest
12+
:target: https://flask-restx.readthedocs.io/en/latest/
1313
:alt: Documentation status
1414
.. image:: https://img.shields.io/pypi/l/flask-restx.svg
1515
:target: https://pypi.org/project/flask-restx

bumpr.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vcs = git
44
commit = true
55
tag = true
66
push = true
7-
tests = tox
7+
tests = tox -e py38
88
clean =
99
inv clean
1010
files =

flask_restx/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "0.1.1"
2+
__version__ = "0.2.1.dev"
33
__description__ = (
44
"Fully featured framework for fast, easy and documented API development with Flask"
55
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flask-restx",
3-
"version": "0.1.1",
3+
"version": "0.2.1.dev",
44
"description": "Fully featured framework for fast, easy and documented API development with Flask",
55
"repository": "python-restx/flask-restx",
66
"keywords": [

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def cover(ctx, html=False):
145145
extra = "--cov-report html" if html else ""
146146
with ctx.cd(ROOT):
147147
ctx.run(
148-
"pytest --benchmark-skip --cov flask_restx --cov-report term {0}".format(
148+
"pytest --benchmark-skip --cov flask_restx --cov-report term --cov-report xml {0}".format(
149149
extra
150150
),
151151
pty=True,

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{27,34,35,36,37}, pypy, pypy3, doc
7+
envlist = py{27,35,36,37,38}, pypy, pypy3, doc
88

99
[testenv]
1010
commands = {posargs:inv test qa}

0 commit comments

Comments
 (0)