Skip to content

Commit

Permalink
Merge pull request #1403 from dsalaza4/main
Browse files Browse the repository at this point in the history
refac(back): #1378 deprecate lint python
  • Loading branch information
jandresh authored Dec 13, 2024
2 parents 71d6921 + 2c353ea commit aead72f
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 1,350 deletions.
64 changes: 0 additions & 64 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,70 +244,6 @@ jobs:
- name: /lintNix
run: nix-env -if . && m . /lintNix

linux_lintPython_dirOfModules_makes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/dirOfModules/makes
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/dirOfModules/makes"
macos_lintPython_dirOfModules_makes:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/dirOfModules/makes
run: nix-env -if . && m . /lintPython/dirOfModules/makes

linux_lintPython_dirOfModules_makes_main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/dirOfModules/makes/main
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/dirOfModules/makes/main"
macos_lintPython_dirOfModules_makes_main:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/dirOfModules/makes/main
run: nix-env -if . && m . /lintPython/dirOfModules/makes/main

linux_lintPython_imports_makes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/imports/makes
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/imports/makes"
macos_lintPython_imports_makes:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/imports/makes
run: nix-env -if . && m . /lintPython/imports/makes

linux_lintPython_module_cliMain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/module/cliMain
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/module/cliMain"
macos_lintPython_module_cliMain:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/module/cliMain
run: nix-env -if . && m . /lintPython/module/cliMain

linux_lintTerraform_module:
runs-on: ubuntu-latest
steps:
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,86 +380,6 @@ jobs:
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

linux_lintPython_dirOfModules_makes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/dirOfModules/makes
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/dirOfModules/makes"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
macos_lintPython_dirOfModules_makes:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/dirOfModules/makes
run: nix-env -if . && m . /lintPython/dirOfModules/makes
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

linux_lintPython_dirOfModules_makes_main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/dirOfModules/makes/main
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/dirOfModules/makes/main"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
macos_lintPython_dirOfModules_makes_main:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/dirOfModules/makes/main
run: nix-env -if . && m . /lintPython/dirOfModules/makes/main
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

linux_lintPython_imports_makes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/imports/makes
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/imports/makes"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
macos_lintPython_imports_makes:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/imports/makes
run: nix-env -if . && m . /lintPython/imports/makes
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

linux_lintPython_module_cliMain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /lintPython/module/cliMain
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintPython/module/cliMain"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
macos_lintPython_module_cliMain:
runs-on: macos-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- name: /lintPython/module/cliMain
run: nix-env -if . && m . /lintPython/module/cliMain
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

linux_lintTerraform_module:
runs-on: ubuntu-latest
steps:
Expand Down
94 changes: 0 additions & 94 deletions docs/src/api/builtins/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,100 +155,6 @@ Example:
m . /lintNix
```

## lintPython

Lints Python code with [mypy](https://mypy.readthedocs.io/en/stable/),
[Prospector](http://prospector.landscape.io/en/master/),
and (if configured) [import-linter](https://import-linter.readthedocs.io/en/stable/).

Types:

- lintPython:
- dirOfModules (`attrsOf dirOfModulesType`): Optional.
Definitions of directories of python packages/modules to lint.
Defaults to `{ }`.
- imports (`attrsOf importsType`): Optional.
Definitions of python packages whose imports will be linted.
Defaults to `{ }`.
- modules (`attrsOf moduleType`): Optional.
Definitions of python packages/modules to lint.
Defaults to `{ }`.
- dirOfModulesType (`submodule`):
- config (`atrrs`): Optional.
- mypy (`path`): Optional.
Path to the Mypy configuration file.
Defaults to [./settings-mypy.cfg](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-mypy.cfg).
- prospector (`path`): Optional.
Path to the Prospector configuration file.
Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml).
- searchPaths (`asIn makeSearchPaths`): Optional.
Arguments here will be passed as-is to `makeSearchPaths`.
Defaults to `makeSearchPaths`'s defaults.
- src (`str`):
Path to the directory that contains inside many packages/modules.
- importsType (`submodule`):
- config (`str`):
Path to the import-linter configuration file.
- searchPaths (`asIn makeSearchPaths`): Optional.
Arguments here will be passed as-is to `makeSearchPaths`.
Defaults to `makeSearchPaths`'s defaults.
- src (`str`):
Path to the package/module.
- moduleType (`submodule`):
- config (`atrrs`): Optional.
- mypy (`path`): Optional.
Path to the Mypy configuration file.
Defaults to [./settings-mypy.cfg](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-mypy.cfg).
- prospector (`path`): Optional.
Path to the Prospector configuration file.
Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml).
- searchPaths (`asIn makeSearchPaths`): Optional.
Arguments here will be passed as-is to `makeSearchPaths`.
Defaults to `makeSearchPaths`'s defaults.
- src (`str`):
Path to the package/module.

Example:

=== "makes.nix"

```nix
{
lintPython = {
dirOfModules = {
makes = {
config = {};
src = "/src/cli";
};
};
imports = {
cli = {
config = "/src/cli/imports.cfg";
src = "/src/cli";
};
};
modules = {
cliMain = {
config = {};
src = "/src/cli/main";
};
};
};
}
```

=== "Invocation dirOfModules"

```bash
m . /lintPython/dirOfModules/makes/main
```

=== "Invocation module"

```bash
m . /lintPython/module/cliMain
```

## lintTerraform

Lint Terraform code
Expand Down
21 changes: 0 additions & 21 deletions makes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,6 @@
enable = true;
targets = [ "/" ];
};
lintPython = let searchPaths.source = [ outputs."/cli/env/runtime" ];
in {
dirOfModules = {
makes = {
inherit searchPaths;
src = "/src/cli";
};
};
imports = {
makes = {
config = "/src/cli/imports.cfg";
src = "/src/cli";
};
};
modules = {
cliMain = {
inherit searchPaths;
src = "/src/cli/main";
};
};
};
lintTerraform = {
modules = {
module = {
Expand Down
17 changes: 0 additions & 17 deletions makes/utils/makePythonLock/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ function main {
"${PWD}/src/args/calculate-cvss-3/dependencies.yaml" \
"${PWD}/src/args/calculate-cvss-3/sources.yaml"

: && "${cmd[@]}" 3.9 \
"${PWD}/src/args/lint-python/pypi-deps.yaml" \
"${PWD}/src/args/lint-python/pypi-sources-3.9.yaml" \
&& "${cmd[@]}" 3.10 \
"${PWD}/src/args/lint-python/pypi-deps.yaml" \
"${PWD}/src/args/lint-python/pypi-sources-3.10.yaml" \
&& "${cmd[@]}" 3.11 \
"${PWD}/src/args/lint-python/pypi-deps.yaml" \
"${PWD}/src/args/lint-python/pypi-sources-3.11.yaml" \
&& "${cmd[@]}" 3.12 \
"${PWD}/src/args/lint-python/pypi-deps.yaml" \
"${PWD}/src/args/lint-python/pypi-sources-3.12.yaml"

"${cmd[@]}" 3.12 \
"${PWD}/src/args/lint-python-imports/pypi-deps.yaml" \
"${PWD}/src/args/lint-python-imports/pypi-sources.yaml"

: && "${cmd[@]}" 3.9 \
"${PWD}/src/args/make-python-pypi-environment/sources/numpy-1.24.0/dependencies.yaml" \
"${PWD}/src/args/make-python-pypi-environment/sources/numpy-1.24.0/sources-39.yaml" \
Expand Down
2 changes: 0 additions & 2 deletions src/args/agnostic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ let
lintGitCommitMsg = import ./lint-git-commit-msg/default.nix self;
lintGitMailMap = import ./lint-git-mailmap/default.nix self;
lintNix = import ./lint-nix/default.nix self;
lintPython = import ./lint-python/default.nix self;
lintPythonImports = import ./lint-python-imports/default.nix self;
lintTerraform = import ./lint-terraform/default.nix self;
lintWithAjv = import ./lint-with-ajv/default.nix self;
inherit (__nixpkgs__.lib.filesystem) listFilesRecursive;
Expand Down
9 changes: 0 additions & 9 deletions src/args/lint-python-imports/builder.sh

This file was deleted.

33 changes: 0 additions & 33 deletions src/args/lint-python-imports/default.nix

This file was deleted.

Loading

0 comments on commit aead72f

Please sign in to comment.