From cc182cb83a83a2e8f9edb3c1508ec48da6b47bc3 Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 09:56:31 +0100 Subject: [PATCH 1/7] Add exceptions to flake8 Signed-off-by: Romain Keramitas --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index ef9f3ea..ae3428a 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] max-line-length=99 -ignore=B008,E121,E123,E126,E226,E24,E704,W503,W504,D100,D200,D301,D402 +ignore=B008,E121,E123,E126,E203,E226,E24,E704,E731,W503,W504,D100,D105,D200,D202,D301,D402 inline-quotes=" import-order-style=appnexus application-package-names=modelforge From 009c9c0f76019ec196b3c6f7ac5a78d0cf7ad6d3 Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 09:56:46 +0100 Subject: [PATCH 2/7] Add VSCode to .gitignore Signed-off-by: Romain Keramitas --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 5e94c48..6878205 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,6 @@ ENV/ # mypy .mypy_cache/ + +# VSCode +.vscode/ From ab4e6cd10acd4f584848b11b4d3583495d94fced Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 10:00:26 +0100 Subject: [PATCH 3/7] Update setup.py (format, pathlib, doc) Signed-off-by: Romain Keramitas --- setup.py | 77 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/setup.py b/setup.py index 58e885f..24ecdfc 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,20 @@ from importlib.machinery import SourceFileLoader -import os +from pathlib import Path from setuptools import find_packages, setup -basedir = os.path.dirname(__file__) +root = Path(__file__).parent modelforge = SourceFileLoader( - "modelforge", os.path.join(basedir, "modelforge", "version.py")).load_module() -with open(os.path.join(basedir, "README.md"), encoding="utf-8") as f: + "modelforge", (root / "modelforge" / "version.py").as_posix() +).load_module() +with (root / "README.md").open(encoding="utf-8") as f: long_description = f.read() setup( name="modelforge", - description="APIs and tools to work with abstract \"models\" - files " - "with numpy arrays and metadata. It is possible to publish " - "models, list them. There is a built-in cache. Storage has backends.", + description="APIs and tools to work with abstract 'models' - files " + "with numpy arrays and metadata. It is possible to publish " + "models, list them. There is a built-in cache. Storage has backends.", long_description=long_description, long_description_content_type="text/markdown", version=modelforge.__version__, @@ -23,41 +24,45 @@ url="https://github.com/src-d/modelforge", download_url="https://github.com/src-d/modelforge", packages=find_packages(exclude=("modelforge.tests",)), - keywords=["model", "git", "asdf", "gcs", "google cloud storage", - "machine learning", "registry"], - install_requires=["asdf>=2.4.0,<2.5", - "lz4>=1.0,<3.0", - "numpy>=1.12,<2.0", - "scipy>=1.0,<2.0", - "clint>=0.5.0,<0.6", - "google-cloud-storage>=1.2,<=1.2.0", - # dulwich does not specify an upper version constraint for urllib3 - # so we may end up with a conflict otherwise - "urllib3<1.25", - "requests>=2.0,<3.0", - "dulwich>=0.19,<1.0", - "jinja2>=2.10.1,<3.0", - "humanize>=0.5.0,<0.6", - "python-dateutil>=2.0,<3.0", - "typing;python_version<'3.5'", - "pygtrie>=1.0,<3.0", - "xxhash>=1.0,<2.0", - "spdx>=2.0,<3.0"], - entry_points={ - "console_scripts": ["modelforge=modelforge.__main__:main"], - }, - package_data={"": ["LICENSE", "README.md"], - "modelforge": ["templates/*"], }, + keywords=[ + "model", + "git", + "asdf", + "gcs", + "google cloud storage", + "machine learning", + "registry", + ], + install_requires=[ + "asdf>=2.4.0,<2.5", + "lz4>=1.0,<3.0", + "numpy>=1.12,<2.0", + "scipy>=1.0,<2.0", + "clint>=0.5.0,<0.6", + "google-cloud-storage>=1.2,<=1.2.0", + # dulwich does not specify an upper version constraint for urllib3 + # so we may end up with a conflict otherwise + "urllib3<1.25", + "requests>=2.0,<3.0", + "dulwich>=0.19,<1.0", + "jinja2>=2.10.1,<3.0", + "humanize>=0.5.0,<0.6", + "python-dateutil>=2.0,<3.0", + "typing;python_version<'3.5'", + "pygtrie>=1.0,<3.0", + "xxhash>=1.0,<2.0", + "spdx>=2.0,<3.0", + ], + entry_points={"console_scripts": ["modelforge=modelforge.__main__:main"]}, + package_data={"": ["LICENSE", "README.md"], "modelforge": ["templates/*"]}, classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Topic :: Software Development :: Libraries" - ] + "Topic :: Software Development :: Libraries", + ], ) From 3b2d3923eae12ecb862f6b70c6f5f8d3c5c8326b Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 10:33:05 +0100 Subject: [PATCH 4/7] Switch to Ubuntu 18 Signed-off-by: Romain Keramitas --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6aef11e..f3cc514 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 ADD requirements.txt setup.py package/ ADD modelforge package/modelforge From 100376e821d5e1f71c43fe3dc997cf117309ef7b Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 10:33:39 +0100 Subject: [PATCH 5/7] Fix pydocstyle old issue and add black Signed-off-by: Romain Keramitas --- requirements-lint.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 074c53f..6a13a88 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,7 @@ +black==19.10b0 flake8==3.5.0 flake8-bugbear==18.8.0 -flake8-docstrings==1.3.0 +flake8-docstrings==1.3.1 flake8-import-order==0.18 flake8-quotes==1.0.0 flake8-per-file-ignores==0.6 -pydocstyle==3.0.0 # remove when https://github.com/PyCQA/pydocstyle/issues/375 is solved From bb40cbb6c0a3fa0ab9df6b44568e44a16f376c07 Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Thu, 31 Oct 2019 10:56:47 +0100 Subject: [PATCH 6/7] Update doc files Signed-off-by: Romain Keramitas --- doc/{code_of_conduct.md => CODE_OF_CONDUCT.md} | 3 +-- doc/{contributing.md => CONTRIBUTING.md} | 7 +++---- doc/MAINTAINERS | 2 ++ doc/maintainers.md | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) rename doc/{code_of_conduct.md => CODE_OF_CONDUCT.md} (99%) rename doc/{contributing.md => CONTRIBUTING.md} (95%) create mode 100644 doc/MAINTAINERS delete mode 100644 doc/maintainers.md diff --git a/doc/code_of_conduct.md b/doc/CODE_OF_CONDUCT.md similarity index 99% rename from doc/code_of_conduct.md rename to doc/CODE_OF_CONDUCT.md index a346f19..caa5122 100644 --- a/doc/code_of_conduct.md +++ b/doc/CODE_OF_CONDUCT.md @@ -1,4 +1,4 @@ -# Code of Conduct +# CODE OF CONDUCT ## Our Pledge @@ -49,4 +49,3 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai ## Attribution This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) - diff --git a/doc/contributing.md b/doc/CONTRIBUTING.md similarity index 95% rename from doc/contributing.md rename to doc/CONTRIBUTING.md index 1c830c7..f70c8e8 100644 --- a/doc/contributing.md +++ b/doc/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing +# CONTRIBUTING Modelforge project is [Apache 2.0 licensed](../LICENSE) and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points, and other resources to make it easier to get your contribution accepted. @@ -23,12 +23,12 @@ The official support channels, for both users and contributors, are: Pull Requests \(PRs\) are the main and exclusive way to contribute to the official Modelforge project. In order for a PR to be accepted it needs to pass a list of requirements: -* Code coverage does not decrease. +* Code Coverage does not decrease. * All the tests pass. * The code is formatted according to [![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/). * If the PR is a bug fix, it has to include a new unit test that fails before the patch is merged. * If the PR is a new feature, it has to come with a suite of unit tests, that tests the new functionality. -* In any case, all the PRs have to pass the personal evaluation of at least one of the [maintainers](maintainers.md). +* In any case, all the PRs have to pass the personal evaluation of at least one of the [maintainers](MAINTAINERS). ### Format of the commit message @@ -41,4 +41,3 @@ Fix a bug ``` Every commit details should describe what was changed, under which context and, if applicable, the GitHub issue it relates to. - diff --git a/doc/MAINTAINERS b/doc/MAINTAINERS new file mode 100644 index 0000000..6149335 --- /dev/null +++ b/doc/MAINTAINERS @@ -0,0 +1,2 @@ +Vadim Markovtsev (@vmarkovtsev) +Romain Keramitas (@r0mainK) diff --git a/doc/maintainers.md b/doc/maintainers.md deleted file mode 100644 index dc0925c..0000000 --- a/doc/maintainers.md +++ /dev/null @@ -1,3 +0,0 @@ -# List of Modelforge maintainers - -* Vadim Markovtsev \ From c4daa412c69b4d7071e74988d7a72178117059a8 Mon Sep 17 00:00:00 2001 From: Romain Keramitas Date: Tue, 5 Nov 2019 16:25:07 +0100 Subject: [PATCH 7/7] PR review Signed-off-by: Romain Keramitas --- .flake8 | 2 +- requirements-lint.txt | 1 - setup.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index ae3428a..ef9f3ea 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] max-line-length=99 -ignore=B008,E121,E123,E126,E203,E226,E24,E704,E731,W503,W504,D100,D105,D200,D202,D301,D402 +ignore=B008,E121,E123,E126,E226,E24,E704,W503,W504,D100,D200,D301,D402 inline-quotes=" import-order-style=appnexus application-package-names=modelforge diff --git a/requirements-lint.txt b/requirements-lint.txt index 6a13a88..419b436 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,4 +1,3 @@ -black==19.10b0 flake8==3.5.0 flake8-bugbear==18.8.0 flake8-docstrings==1.3.1 diff --git a/setup.py b/setup.py index 24ecdfc..d538eb0 100644 --- a/setup.py +++ b/setup.py @@ -63,6 +63,7 @@ "Operating System :: POSIX", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Libraries", ], )