Skip to content

Commit

Permalink
changelog and docs folder exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
insspb committed Jan 25, 2020
1 parent 219f1f9 commit b1cb319
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 63 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Expand Up @@ -15,6 +15,7 @@ repos:
hooks:
- id: black
language_version: python3.6
exclude: ^docs/
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
Expand Down
23 changes: 7 additions & 16 deletions .travis.yml
Expand Up @@ -9,25 +9,17 @@ python:
- '3.8'
- pypy3

matrix:
jobs:
include:
- name: "lint"
python: 3.7
env:
- TEST_CMD="pre-commit run --all-files"
- name: "3.6"
- language: python
python: 3.6
- name: "3.7"
python: 3.7
- name: "3.8"
python: 3.8
- name: "pypy3"
python: pypy3
name: "linting"
script:
- tox -e lint

env:
- MONGOENGINE=latest_pip
- MONGOENGINE=dev
- TEST_CMD="tox -e $(echo py$TRAVIS_PYTHON_VERSION-me_$MONGOENGINE | tr -d . | sed -e 's/pypypy/pypy/') -- --with-coverage"

services:
- mongodb
Expand All @@ -38,13 +30,12 @@ install:
- travis_retry pip install flake8
- travis_retry pip install tox>=3.14
- travis_retry pip install virtualenv
- travis_retry pip install pre-commit

# Cache dependencies installed via pip
cache: pip

script:
- $TEST_CMD
- tox -e $(echo py$TRAVIS_PYTHON_VERSION-me_$MONGOENGINE | tr -d . | sed -e 's/pypypy/pypy/') -- --with-coverage

after_success:
- coveralls --verbose
Expand Down Expand Up @@ -75,5 +66,5 @@ deploy:
on:
tags: true
condition: "$MONGOENGINE = dev"
python: 3.6
python: 3.5
repo: MongoEngine/flask-mongoengine
18 changes: 13 additions & 5 deletions docs/changelog.rst
Expand Up @@ -4,12 +4,17 @@ Changelog

Development
===========
- BREAKING CHANGE: Dropped Python v2.6, v2.7, v3.2, v3.3, v3.4 (#355)
- BREAKING CHANGE: Added tests support for python versions: v3.5, v3.6, v3.7, v3.8 (#355)
- BREAKING CHANGE: Dropped Python v2.6, v2.7, v3.2, v3.3,
v3.4, v3.5 (#355, #366)
- BREAKING CHANGE: Added tests support for python versions:
v3.6, v3.7, v3.8 (#355, #366)
- BREAKING CHANGE: Minimum Flask version set to v1.1 (#355)
- BREAKING CHANGE: Minimum Flask-WTF version set to v0.14 (#355)
- BREAKING CHANGE: Minimum mongoengine version set to v0.19 (#355)
- BREAKING CHANGE: Minimum mongodb version set to v4.0 (#355)
- CHANGED: Code reformatted with black, pre-commit implemented
in project and CI/CD (#366)
- CHANGED: Developers dependencies extracted to separate file (#367)
- CHANGED: Internal test engine switched from nose to pytest (#357)
- DROPPED: Internal check with flake8-import-order dropped, as not
compatible with modern editors (#358)
Expand All @@ -18,15 +23,17 @@ Development
- UPDATED: `get_or_404` will raise 404 error only on `DoesNotExist` exception,
other exceptions should be captured by user. (#360)

Tests and development for old packages versions dropped to minimize tests footprint.
Tests and development for old packages versions dropped to minimize tests
footprint.

Use version 0.9.5 if old dependencies required.

Changes in 0.9.1
================
- Fixed setup.py for various platforms (#298).
- Added Flask-WTF v0.14 support (#294).
- MongoEngine instance now holds a reference to a particular Flask app it was initialized with (#261).
- MongoEngine instance now holds a reference to a particular Flask app it was
initialized with (#261).

Changes in 0.9.0
================
Expand Down Expand Up @@ -65,7 +72,8 @@ Changes in 0.8
- Various bugfixes, code cleanup and documentation improvements
- Move from deprecated flask.ext.* to flask_* syntax in imports
- Added independent connection handler for FlaskMongoEngine
- All MongoEngine connection calls are proxied via FlaskMongoEngine connection handler
- All MongoEngine connection calls are proxied via FlaskMongoEngine connection
handler
- Added backward compatibility for settings key names
- Added support for MongoMock and temporary test DB
- Fixed issue with multiple DB support
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -14,4 +14,4 @@ exclude = '''
| build
| dist
)/
'''
'''
69 changes: 32 additions & 37 deletions setup.py
Expand Up @@ -3,16 +3,18 @@
from setuptools import setup


description = ('Flask-MongoEngine is a Flask extension '
'that provides integration with MongoEngine and WTF model forms.')
description = (
"Flask-MongoEngine is a Flask extension "
"that provides integration with MongoEngine and WTF model forms."
)

# Load index.rst as long_description
doc_path = os.path.join(os.path.dirname(__file__), "docs", "index.rst")
long_description = io.open(doc_path, encoding='utf-8').read()
long_description = io.open(doc_path, encoding="utf-8").read()

# Stops exit traceback on tests
try:
import multiprocessing # noqa
import multiprocessing # noqa
except ImportError:
pass

Expand All @@ -21,54 +23,47 @@ def get_version(version_tuple):
"""Return the version tuple as a string, e.g. for (0, 10, 7),
return '0.10.7'.
"""
return '.'.join(map(str, version_tuple))
return ".".join(map(str, version_tuple))


# Dirty hack to get version number from flask_monogengine/__init__.py - we
# can't import it as it depends on PyMongo and PyMongo isn't installed until
# this file is read
init = os.path.join(os.path.dirname(__file__), 'flask_mongoengine', '__init__.py')
version_line = list(filter(lambda l: l.startswith('VERSION'), open(init)))[0]
version = get_version(eval(version_line.split('=')[-1]))
init = os.path.join(os.path.dirname(__file__), "flask_mongoengine", "__init__.py")
version_line = list(filter(lambda l: l.startswith("VERSION"), open(init)))[0]
version = get_version(eval(version_line.split("=")[-1]))

test_requirements = ['coverage', 'nose', 'rednose']
test_requirements = ["coverage", "nose", "rednose"]

setup(
name='flask-mongoengine',
name="flask-mongoengine",
version=version,
url='https://github.com/mongoengine/flask-mongoengine',
license='BSD',
author='Ross Lawley',
author_email='ross.lawley@gmail.com',
test_suite='nose.collector',
url="https://github.com/mongoengine/flask-mongoengine",
license="BSD",
author="Ross Lawley",
author_email="ross.lawley@gmail.com",
test_suite="nose.collector",
zip_safe=False,
platforms='any',
install_requires=[
'Flask>=1.1',
'Flask-WTF>=0.14',
'mongoengine>=0.19',
'six',
],
packages=['flask_mongoengine',
'flask_mongoengine.wtf'],
platforms="any",
install_requires=["Flask>=1.1", "Flask-WTF>=0.14", "mongoengine>=0.19", "six"],
packages=["flask_mongoengine", "flask_mongoengine.wtf"],
include_package_data=True,
tests_require=test_requirements,
setup_requires=test_requirements, # Allow proper nose usage with setuptools and tox
description=description,
long_description=long_description,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
9 changes: 5 additions & 4 deletions tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = {py36,py37,py38,pypy3}-{me_latest_pip,me_dev},flake8
envlist = {py36,py37,py38,pypy3}-{me_latest_pip,me_dev},lint

[testenv]
commands =
Expand All @@ -12,7 +12,8 @@ deps =
pytest-cov
nose

[testenv:flake8]
deps = flake8
[testenv:lint]
deps =
pre-commit
commands =
flake8
python -m pre_commit run {posargs:--all}

0 comments on commit b1cb319

Please sign in to comment.