From 16815fe87845ac8d503d874ff8add2374f230dc2 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 11:39:35 +0300 Subject: [PATCH 1/8] Add new compiler names --- .idea/.gitignore | 3 ++ .idea/anaconda-linter.iml | 14 ++++++ .idea/inspectionProfiles/Project_Default.xml | 45 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 7 +++ .idea/modules.xml | 8 ++++ .idea/vcs.xml | 6 +++ anaconda_linter/lint/check_build_help.py | 2 +- 8 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/anaconda-linter.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/anaconda-linter.iml b/.idea/anaconda-linter.iml new file mode 100644 index 00000000..360f32e0 --- /dev/null +++ b/.idea/anaconda-linter.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..5f2e8d19 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,45 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..46501a8d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..bd8daad8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/anaconda_linter/lint/check_build_help.py b/anaconda_linter/lint/check_build_help.py index 9925a8f9..9c8cce26 100644 --- a/anaconda_linter/lint/check_build_help.py +++ b/anaconda_linter/lint/check_build_help.py @@ -45,7 +45,7 @@ class should_use_compilers(LintCheck): """ - compilers = ("gcc", "llvm", "libgfortran", "libgcc", "go", "cgo", "toolchain") + compilers = ("gcc", "llvm", "libgfortran", "libgcc", "go", "cgo", "toolchain", "rust", "rust-gnu", "cuda", "dpcpp", "m2w64_c", "m2w64_cxx", 'm2w64_fortran') def check_deps(self, deps): for compiler in self.compilers: From dfed8de82f7af0f7816eba1e6a22d6c3dded3596 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 11:43:30 +0300 Subject: [PATCH 2/8] Add .idea to .gitignore --- .gitignore | 3 ++ .idea/.gitignore | 3 -- .idea/anaconda-linter.iml | 14 ------ .idea/inspectionProfiles/Project_Default.xml | 45 ------------------- .../inspectionProfiles/profiles_settings.xml | 6 --- .idea/misc.xml | 7 --- .idea/modules.xml | 8 ---- .idea/vcs.xml | 6 --- 8 files changed, 3 insertions(+), 89 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/anaconda-linter.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index ab688634..a17d3522 100644 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,6 @@ dmypy.json # Pyre type checker .pyre/ + +# VS Code +.idea/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d33521..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/anaconda-linter.iml b/.idea/anaconda-linter.iml deleted file mode 100644 index 360f32e0..00000000 --- a/.idea/anaconda-linter.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 5f2e8d19..00000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da..00000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 46501a8d..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index bd8daad8..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 32c42ca61a947a0433f7763e957502a391f676b0 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 11:48:21 +0300 Subject: [PATCH 3/8] Move missing_wheel --- anaconda_linter/lint/check_build_help.py | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/anaconda_linter/lint/check_build_help.py b/anaconda_linter/lint/check_build_help.py index 9c8cce26..721c180c 100644 --- a/anaconda_linter/lint/check_build_help.py +++ b/anaconda_linter/lint/check_build_help.py @@ -85,6 +85,23 @@ def check_recipe(self, recipe): self.message() +class missing_wheel(LintCheck): + """For pypi packages, wheel should be present in the host section + + Add wheel to requirements/host: + + requirements: + host: + - wheel + """ + + def check_recipe(self, recipe): + + if is_pypi_source(recipe) or "pip install" in self.recipe.get("build/script", ""): + if "wheel" not in recipe.get_deps("host"): + self.message(section="requirements/host") + + class setup_py_install_args(LintCheck): """The recipe uses setuptools without required arguments @@ -251,23 +268,6 @@ def check_recipe(self, recipe): self.message(section="test/commands") -class missing_wheel(LintCheck): - """For pypi packages, wheel should be present in the host section - - Add wheel to requirements/host: - - requirements: - host: - - wheel - """ - - def check_recipe(self, recipe): - - if is_pypi_source(recipe) or "pip install" in self.recipe.get("build/script", ""): - if "wheel" not in recipe.get_deps("host"): - self.message(section="requirements/host") - - class missing_python(LintCheck): """For pypi packages, python should be present in the host and run sections From 70def0f16088972f94da3400502cc752487261a5 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 12:13:08 +0300 Subject: [PATCH 4/8] Add a new line --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a17d3522..33ea964a 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,4 @@ dmypy.json .pyre/ # VS Code -.idea/ \ No newline at end of file +.idea/ From 84611305c40d113eda1d78a95fdf259d720280b6 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 12:57:26 +0300 Subject: [PATCH 5/8] Add new gui app --- anaconda_linter/lint/check_build_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anaconda_linter/lint/check_build_help.py b/anaconda_linter/lint/check_build_help.py index 721c180c..3e85009b 100644 --- a/anaconda_linter/lint/check_build_help.py +++ b/anaconda_linter/lint/check_build_help.py @@ -323,7 +323,7 @@ class gui_app(LintCheck): severity = INFO - guis = ("qtpy", "pyqt") + guis = ("qtpy", "pyqt", "spyder", "wxpython", "qtcreator", "qt3dstudio", "orange3", "jupyterlab", "jupyterhub", "glueviz", "glue-core", "enaml") def check_recipe(self, recipe): if set(self.guis).intersection(set(recipe.get_deps("run"))): From 18ea18ebb394a1b7ed5f38283297a3f13d45efeb Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Sat, 1 Oct 2022 12:59:22 +0300 Subject: [PATCH 6/8] Use black formatter --- anaconda_linter/lint/check_build_help.py | 32 ++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/anaconda_linter/lint/check_build_help.py b/anaconda_linter/lint/check_build_help.py index 3e85009b..a34df64e 100644 --- a/anaconda_linter/lint/check_build_help.py +++ b/anaconda_linter/lint/check_build_help.py @@ -45,7 +45,22 @@ class should_use_compilers(LintCheck): """ - compilers = ("gcc", "llvm", "libgfortran", "libgcc", "go", "cgo", "toolchain", "rust", "rust-gnu", "cuda", "dpcpp", "m2w64_c", "m2w64_cxx", 'm2w64_fortran') + compilers = ( + "gcc", + "llvm", + "libgfortran", + "libgcc", + "go", + "cgo", + "toolchain", + "rust", + "rust-gnu", + "cuda", + "dpcpp", + "m2w64_c", + "m2w64_cxx", + "m2w64_fortran", + ) def check_deps(self, deps): for compiler in self.compilers: @@ -323,7 +338,20 @@ class gui_app(LintCheck): severity = INFO - guis = ("qtpy", "pyqt", "spyder", "wxpython", "qtcreator", "qt3dstudio", "orange3", "jupyterlab", "jupyterhub", "glueviz", "glue-core", "enaml") + guis = ( + "qtpy", + "pyqt", + "spyder", + "wxpython", + "qtcreator", + "qt3dstudio", + "orange3", + "jupyterlab", + "jupyterhub", + "glueviz", + "glue-core", + "enaml", + ) def check_recipe(self, recipe): if set(self.guis).intersection(set(recipe.get_deps("run"))): From 6696e3edf80d633b0ffc66e971dd4ad8d35a2f65 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Mon, 3 Oct 2022 15:00:33 +0300 Subject: [PATCH 7/8] Sort lines ascending --- anaconda_linter/lint/check_build_help.py | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/anaconda_linter/lint/check_build_help.py b/anaconda_linter/lint/check_build_help.py index a34df64e..135e2926 100644 --- a/anaconda_linter/lint/check_build_help.py +++ b/anaconda_linter/lint/check_build_help.py @@ -46,20 +46,20 @@ class should_use_compilers(LintCheck): """ compilers = ( - "gcc", - "llvm", - "libgfortran", - "libgcc", - "go", "cgo", - "toolchain", - "rust", - "rust-gnu", "cuda", "dpcpp", + "gcc", + "go", + "libgcc", + "libgfortran", + "llvm", "m2w64_c", "m2w64_cxx", "m2w64_fortran", + "rust-gnu", + "rust", + "toolchain", ) def check_deps(self, deps): @@ -339,18 +339,18 @@ class gui_app(LintCheck): severity = INFO guis = ( - "qtpy", + "enaml", + "glue-core", + "glueviz", + "jupyterhub", + "jupyterlab", + "orange3", "pyqt", + "qt3dstudio", + "qtcreator", + "qtpy", "spyder", "wxpython", - "qtcreator", - "qt3dstudio", - "orange3", - "jupyterlab", - "jupyterhub", - "glueviz", - "glue-core", - "enaml", ) def check_recipe(self, recipe): From 4c7213f97068a5f04219a2580215d90fb8d53f68 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Mon, 3 Oct 2022 15:53:28 +0300 Subject: [PATCH 8/8] Add a new acceptable redirect for github.com --- anaconda_linter/lint/check_url.py | 1 + 1 file changed, 1 insertion(+) diff --git a/anaconda_linter/lint/check_url.py b/anaconda_linter/lint/check_url.py index 57991d5c..56a1a740 100644 --- a/anaconda_linter/lint/check_url.py +++ b/anaconda_linter/lint/check_url.py @@ -22,6 +22,7 @@ def check_source(self, source, section): acceptable_redirects = [ ("pypi.io", "pypi.org"), ("github.com", "objects.githubusercontent.com"), + ("github.com", "codeload.github.com"), ] if response_data["code"] < 0 and "domain_redirect" in response_data: for redir in acceptable_redirects: