From 3305a7d68351b92d492d60a8c9899814c81d9d9d Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Fri, 23 Jul 2021 17:17:27 -0400 Subject: [PATCH 01/17] Migrate to setup.cfg. --- setup.cfg | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 59 ++----------------------------------------------------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/setup.cfg b/setup.cfg index 08aedd7e..82048eb2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,57 @@ [metadata] +author = Argo AI +author_email = argoverse-api@argo.ai +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Operating System :: POSIX + Operating System :: MacOS + Programming Language :: Python :: 3 + Topic :: Scientific/Engineering :: Artificial Intelligence description_file = README.md +keywords = + self-driving-car + dataset-tools +license = MIT +name = argoverse +url = https://www.argoverse.org +version = attr: argoverse.VERSION + +[options] +zip_safe = False +include_package_data = True +packages = find: +scripts = + bin/first.py + bin/second.py +install_requires = + colour + descartes + imageio + h5py + hydra-core ==1.1.0 + lap + matplotlib + motmetrics ==1.1.3 + numpy ==1.19 + omegaconf ==2.1.0 + opencv-python >=4.1.0.25 + pandas >=0.23.1 + pillow + imageio + pyntcloud >=0.1.0 + scipy >=1.4.0 + shapely + sklearn + tqdm + typing_extensions + +[options.package_data] +argoverse = argoverse/visualization/data/**/* + +[options.packages.find] +exclude = + integration_tests + map_files + tests diff --git a/setup.py b/setup.py index aa4312b6..df8e29ac 100755 --- a/setup.py +++ b/setup.py @@ -7,67 +7,12 @@ """ import platform -import sys -from codecs import open # To use a consistent encoding -from os import path # Always prefer setuptools over distutils from setuptools import find_packages, setup -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.md"), encoding="utf-8") as f: - long_description = f.read() - - if platform.system() == "Windows": print("Argoverse currently does not support Windows, please use Linux/Mac OS") - sys.exit(1) + exit(1) -setup( - name="argoverse", - version="1.0.1", - description="", - long_description=long_description, - url="https://www.argoverse.org", - author="Argo AI", - author_email="argoverse-api@argo.ai", - license="MIT", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: POSIX", - "Operating System :: MacOS", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - ], - keywords="self-driving-car dataset-tools", - packages=find_packages(exclude=["tests", "integration_tests", "map_files"]), - package_data={"argoverse": ["argoverse/visualization/data/**/*"]}, - include_package_data=True, - python_requires=">= 3.7", - install_requires=[ - "colour", - "descartes", - "imageio", - "h5py", - "hydra-core==1.1.0", - "lap", - "matplotlib", - "motmetrics==1.1.3", - "numpy==1.19", - "omegaconf==2.1.0", - "opencv-python>=4.1.0.25", - "pandas>=0.23.1", - "pillow", - "imageio", - "pyntcloud>=0.1.0", - "scipy>=1.4.0", - "shapely", - "sklearn", - "tqdm", - "typing_extensions", - ], -) +setup() From fd77332f3839563ee64c3fe0519bcf86833ce4e7 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Fri, 23 Jul 2021 17:25:41 -0400 Subject: [PATCH 02/17] Fix versioning. --- argoverse/__init__.py | 1 + setup.cfg | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/argoverse/__init__.py b/argoverse/__init__.py index e69de29b..f3f6dc7a 100644 --- a/argoverse/__init__.py +++ b/argoverse/__init__.py @@ -0,0 +1 @@ +VERSION = "1.1" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 82048eb2..f6177620 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,9 +22,6 @@ version = attr: argoverse.VERSION zip_safe = False include_package_data = True packages = find: -scripts = - bin/first.py - bin/second.py install_requires = colour descartes From f165d70b145bd7c42505e98405b453cc7eae5ee9 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Fri, 23 Jul 2021 17:26:05 -0400 Subject: [PATCH 03/17] Fix versioning. --- argoverse/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argoverse/__init__.py b/argoverse/__init__.py index f3f6dc7a..81424b89 100644 --- a/argoverse/__init__.py +++ b/argoverse/__init__.py @@ -1 +1 @@ -VERSION = "1.1" \ No newline at end of file +VERSION = "1.1.0" \ No newline at end of file From 74e3d85472198b84dbba0a4752baea1176b87643 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Fri, 23 Jul 2021 17:35:41 -0400 Subject: [PATCH 04/17] Add newline. --- argoverse/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argoverse/__init__.py b/argoverse/__init__.py index 81424b89..2a3eb2f3 100644 --- a/argoverse/__init__.py +++ b/argoverse/__init__.py @@ -1 +1 @@ -VERSION = "1.1.0" \ No newline at end of file +VERSION = "1.1.0" From 111f7c968a3e4312e5396e0342aff54bc9441f36 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sat, 24 Jul 2021 23:52:32 -0400 Subject: [PATCH 05/17] Move tox.ini configs into .cfg and .toml --- pyproject.toml | 7 +++++++ setup.cfg | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1177575f..a1c655d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,3 +8,10 @@ profile = "black" [tool.black] line-length = 120 + +[tool.mypy] +ignore_missing_imports = True +strict = True + +[tool.pytest.ini_options] +addopts = "--cov argoverse --cov-append --cov-branch --cov-report=term-missing" diff --git a/setup.cfg b/setup.cfg index f6177620..54205261 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,3 +52,8 @@ exclude = integration_tests map_files tests + +[flake8] +enable-extensions = G,argoverse +ignore = E203,E704,E711,E722,E741,W291,W293,W391,W503,F821,F401,F811,F841,P101,G004,G002,I201,I100,I101 +max-line-length = 120 From 226aa79cc18db5ea19f2336f821c63d12c91bf60 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sat, 24 Jul 2021 23:54:38 -0400 Subject: [PATCH 06/17] Update pyproject. --- pyproject.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a1c655d2..666fad24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,13 @@ profile = "black" line-length = 120 [tool.mypy] -ignore_missing_imports = True -strict = True +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = [ + "argoverse" +] +strict = true [tool.pytest.ini_options] addopts = "--cov argoverse --cov-append --cov-branch --cov-report=term-missing" From ad968c8c67b0ad81c69aa8171e7962b1730d8393 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sat, 24 Jul 2021 23:55:44 -0400 Subject: [PATCH 07/17] Update tox.ini. --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index fad6c1f0..7b3ff79b 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ deps = commands = python3 -m pip install disparity_interpolation==1.0.3 - pytest tests --cov argoverse --cov-append --cov-branch --cov-report=term-missing - flake8 --max-line-length 120 --ignore E203,E704,E711,E722,E741,W291,W293,W391,W503,F821,F401,F811,F841,P101,G004,G002,I201,I100,I101 --enable-extensions G argoverse - mypy --ignore-missing --strict argoverse + pytest tests + flake8 + mypy depends = py3{7,8}: clean From d8f8ddcef80dc03eba2c42238c91afc03e016f25 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:01:56 -0400 Subject: [PATCH 08/17] Change to snake case. --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 54205261..e1934a96 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,6 +54,6 @@ exclude = tests [flake8] -enable-extensions = G,argoverse +enable_extensions = G,argoverse ignore = E203,E704,E711,E722,E741,W291,W293,W391,W503,F821,F401,F811,F841,P101,G004,G002,I201,I100,I101 -max-line-length = 120 +max_line_length = 120 From f7392adcd5bbd30f5f640ddefafb2364b2960f4a Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:11:09 -0400 Subject: [PATCH 09/17] Update strict setting. --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 666fad24..a29a3269 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,11 +11,6 @@ line-length = 120 [tool.mypy] ignore_missing_imports = true - -[[tool.mypy.overrides]] -module = [ - "argoverse" -] strict = true [tool.pytest.ini_options] From 493405b546aa5b87ccff12847870a8c352897848 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:11:54 -0400 Subject: [PATCH 10/17] Sort tools. --- pyproject.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a29a3269..c06494e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,3 @@ -[tool.isort] -known_first_party = "argoverse" -known_third_party = "mayavi,pytest,colour,descartes,imageio,matplotlib,motmetrics,numpy,cv2,pandas,pillow,imageio,pyntcloud,scipy,shapely,sklearn" - -line_length = 120 -multi_line_output = 3 -profile = "black" - [tool.black] line-length = 120 @@ -15,3 +7,11 @@ strict = true [tool.pytest.ini_options] addopts = "--cov argoverse --cov-append --cov-branch --cov-report=term-missing" + +[tool.isort] +known_first_party = "argoverse" +known_third_party = "mayavi,pytest,colour,descartes,imageio,matplotlib,motmetrics,numpy,cv2,pandas,pillow,imageio,pyntcloud,scipy,shapely,sklearn" + +line_length = 120 +multi_line_output = 3 +profile = "black" From 54c0e6c6e26bcd7f7705058b431ef48c4d03dc69 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:12:29 -0400 Subject: [PATCH 11/17] Sort tools. --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c06494e7..92306233 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,6 @@ [tool.black] line-length = 120 -[tool.mypy] -ignore_missing_imports = true -strict = true - -[tool.pytest.ini_options] -addopts = "--cov argoverse --cov-append --cov-branch --cov-report=term-missing" - [tool.isort] known_first_party = "argoverse" known_third_party = "mayavi,pytest,colour,descartes,imageio,matplotlib,motmetrics,numpy,cv2,pandas,pillow,imageio,pyntcloud,scipy,shapely,sklearn" @@ -15,3 +8,10 @@ known_third_party = "mayavi,pytest,colour,descartes,imageio,matplotlib,motmetric line_length = 120 multi_line_output = 3 profile = "black" + +[tool.mypy] +ignore_missing_imports = true +strict = true + +[tool.pytest.ini_options] +addopts = "--cov argoverse --cov-append --cov-branch --cov-report=term-missing" From 6259d7bc3a5ff8b3d17cf2a2ae9aabd865faac76 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:23:38 -0400 Subject: [PATCH 12/17] Fix flake lint. --- demo_usage/cuboids_to_bboxes.py | 4 ++-- demo_usage/visualize_30hz_benchmark_data_on_map.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo_usage/cuboids_to_bboxes.py b/demo_usage/cuboids_to_bboxes.py index b681075d..8df65dc8 100644 --- a/demo_usage/cuboids_to_bboxes.py +++ b/demo_usage/cuboids_to_bboxes.py @@ -348,7 +348,7 @@ def main(args: Any): logger.info(args) if args.log_ids is None: - logger.error(f"Please provide a comma seperated list of log ids") - raise ValueError(f"Please provide a comma seperated list of log ids") + logger.error("Please provide a comma seperated list of log ids") + raise ValueError("Please provide a comma seperated list of log ids") main(args) diff --git a/demo_usage/visualize_30hz_benchmark_data_on_map.py b/demo_usage/visualize_30hz_benchmark_data_on_map.py index 7bb10c59..839d4db3 100644 --- a/demo_usage/visualize_30hz_benchmark_data_on_map.py +++ b/demo_usage/visualize_30hz_benchmark_data_on_map.py @@ -247,7 +247,7 @@ def render_bev_labels_mpl( city_to_egovehicle_se3: Transformation from egovehicle frame to city frame avm: ArgoverseMap instance """ - if axis is not "city_axis": + if axis != "city_axis": # rendering instead in the egovehicle reference frame for da_idx, local_da in enumerate(local_das): local_da = city_to_egovehicle_se3.inverse_transform_point_cloud(local_da) @@ -262,7 +262,7 @@ def render_bev_labels_mpl( draw_lane_polygons(ax, local_lane_polygons) draw_lane_polygons(ax, local_das, color="tab:pink") - if axis is not "city_axis": + if axis != "city_axis": lidar_pts = rotate_polygon_about_pt(lidar_pts, city_to_egovehicle_se3.rotation, np.zeros((3,))) draw_point_cloud_bev(ax, lidar_pts) @@ -283,7 +283,7 @@ def render_bev_labels_mpl( bbox_ego_frame = rotate_polygon_about_pt( bbox_ego_frame, city_to_egovehicle_se3.rotation, np.zeros((3,)) ) - if axis is "city_axis": + if axis == "city_axis": plot_bbox_2D(ax, bbox_city_fr, color) if self.plot_lane_tangent_arrows: bbox_center = np.mean(bbox_city_fr, axis=0) From 74517675d3e14f1fbdfb4301ff2ad1a3117caa35 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:34:40 -0400 Subject: [PATCH 13/17] Add missing arg. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0f05a033..9a76e30b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ commands = python3 -m pip install numba pytest tests flake8 - mypy + mypy argoverse depends = From ee6c087dfa9442f289f14153dccfe1b2e3f05ad3 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Sun, 25 Jul 2021 00:47:02 -0400 Subject: [PATCH 14/17] Fix flake8 flags. --- setup.cfg | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e1934a96..9d5de882 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,6 +54,6 @@ exclude = tests [flake8] -enable_extensions = G,argoverse +enable_extensions = G ignore = E203,E704,E711,E722,E741,W291,W293,W391,W503,F821,F401,F811,F841,P101,G004,G002,I201,I100,I101 max_line_length = 120 diff --git a/tox.ini b/tox.ini index 9a76e30b..28f90d2e 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ deps = commands = python3 -m pip install numba pytest tests - flake8 + flake8 argoverse mypy argoverse From 62ae64f79b515b4988ed95f56953ce62c0dffd64 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Mon, 26 Jul 2021 12:02:29 -0400 Subject: [PATCH 15/17] Update setup.cfg --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 9d5de882..3d8e407e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,7 @@ install_requires = lap matplotlib motmetrics ==1.1.3 + numba numpy ==1.19 omegaconf ==2.1.0 opencv-python >=4.1.0.25 From cea578b8356537b5ed0fa06b539b22f7ac759211 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Wed, 28 Jul 2021 23:23:59 +0000 Subject: [PATCH 16/17] Updated version variable. --- argoverse/__init__.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/argoverse/__init__.py b/argoverse/__init__.py index 2a3eb2f3..6849410a 100644 --- a/argoverse/__init__.py +++ b/argoverse/__init__.py @@ -1 +1 @@ -VERSION = "1.1.0" +__version__ = "1.1.0" diff --git a/setup.cfg b/setup.cfg index 3d8e407e..4ec14886 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ keywords = license = MIT name = argoverse url = https://www.argoverse.org -version = attr: argoverse.VERSION +version = attr: argoverse.__version__ [options] zip_safe = False From f72e43ff4d0bbf928a4c3ecb9d931d7d0addd620 Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Wed, 13 Oct 2021 16:12:46 -0400 Subject: [PATCH 17/17] Revert to setup.py. --- argoverse/__init__.py | 1 - setup.cfg | 60 ------------------------------------------- setup.py | 60 +++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 58 insertions(+), 63 deletions(-) delete mode 100644 setup.cfg diff --git a/argoverse/__init__.py b/argoverse/__init__.py index 6849410a..e69de29b 100644 --- a/argoverse/__init__.py +++ b/argoverse/__init__.py @@ -1 +0,0 @@ -__version__ = "1.1.0" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4ec14886..00000000 --- a/setup.cfg +++ /dev/null @@ -1,60 +0,0 @@ -[metadata] -author = Argo AI -author_email = argoverse-api@argo.ai -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: POSIX - Operating System :: MacOS - Programming Language :: Python :: 3 - Topic :: Scientific/Engineering :: Artificial Intelligence -description_file = README.md -keywords = - self-driving-car - dataset-tools -license = MIT -name = argoverse -url = https://www.argoverse.org -version = attr: argoverse.__version__ - -[options] -zip_safe = False -include_package_data = True -packages = find: -install_requires = - colour - descartes - imageio - h5py - hydra-core ==1.1.0 - lap - matplotlib - motmetrics ==1.1.3 - numba - numpy ==1.19 - omegaconf ==2.1.0 - opencv-python >=4.1.0.25 - pandas >=0.23.1 - pillow - imageio - pyntcloud >=0.1.0 - scipy >=1.4.0 - shapely - sklearn - tqdm - typing_extensions - -[options.package_data] -argoverse = argoverse/visualization/data/**/* - -[options.packages.find] -exclude = - integration_tests - map_files - tests - -[flake8] -enable_extensions = G -ignore = E203,E704,E711,E722,E741,W291,W293,W391,W503,F821,F401,F811,F841,P101,G004,G002,I201,I100,I101 -max_line_length = 120 diff --git a/setup.py b/setup.py index df8e29ac..1c706ed5 100755 --- a/setup.py +++ b/setup.py @@ -7,12 +7,68 @@ """ import platform +import sys +from codecs import open # To use a consistent encoding +from os import path # Always prefer setuptools over distutils from setuptools import find_packages, setup +here = path.abspath(path.dirname(__file__)) + +# Get the long description from the README file +with open(path.join(here, "README.md"), encoding="utf-8") as f: + long_description = f.read() + + if platform.system() == "Windows": print("Argoverse currently does not support Windows, please use Linux/Mac OS") - exit(1) + sys.exit(1) -setup() +setup( + name="argoverse", + version="1.0.1", + description="", + long_description=long_description, + url="https://www.argoverse.org", + author="Argo AI", + author_email="argoverse-api@argo.ai", + license="MIT", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + ], + keywords="self-driving-car dataset-tools", + packages=find_packages(exclude=["tests", "integration_tests", "map_files"]), + package_data={"argoverse": ["argoverse/visualization/data/**/*"]}, + include_package_data=True, + python_requires=">= 3.7", + install_requires=[ + "colour", + "descartes", + "imageio", + "h5py", + "hydra-core==1.1.0", + "lap", + "matplotlib", + "motmetrics==1.1.3", + "numba", + "numpy==1.19", + "omegaconf==2.1.0", + "opencv-python>=4.1.0.25", + "pandas>=0.23.1", + "pillow", + "imageio", + "pyntcloud>=0.1.0", + "scipy>=1.4.0", + "shapely", + "sklearn", + "tqdm", + "typing_extensions", + ], +)