From 685673352042575144205067bcc3ab4ec2ba0517 Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:28:22 +0530 Subject: [PATCH 1/7] ADD: CI --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..35ce0b3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + lint: + name: lint and style checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black black[jupyter] ruff + - name: Black style check + run: | + black --check . + - name: Lint with ruff + run: | + ruff check . \ No newline at end of file From d34af4920c9964a424a6cbee5211f0162aa9718d Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:36:58 +0530 Subject: [PATCH 2/7] FIX: Ruff check --- Examples/TEST_Notebook.ipynb | 8 ++++---- pyproject.toml | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Examples/TEST_Notebook.ipynb b/Examples/TEST_Notebook.ipynb index 4159a99..6ef4a88 100644 --- a/Examples/TEST_Notebook.ipynb +++ b/Examples/TEST_Notebook.ipynb @@ -30,7 +30,7 @@ "metadata": {}, "outputs": [], "source": [ - "ls $input_folder" + "!ls $input_folder" ] }, { @@ -57,7 +57,7 @@ "metadata": {}, "outputs": [], "source": [ - "ls -lth $output_folder" + "!ls -lth $output_folder" ] }, { @@ -108,7 +108,7 @@ "metadata": {}, "outputs": [], "source": [ - "ls $input_folder" + "!ls $input_folder" ] }, { @@ -136,7 +136,7 @@ "metadata": {}, "outputs": [], "source": [ - "ls $output_folder" + "!ls $output_folder" ] }, { diff --git a/pyproject.toml b/pyproject.toml index ef24d83..81732f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,10 +86,5 @@ line-length = 88 target-version = "py39" builtins = ["ellipsis"] exclude = [".eggs", "doc"] - -[tool.ruff.lint] ignore = ["E402", "E501", "E731"] select = ["F", "E", "W", "I", "UP"] - -[tool.ruff.lint.isort] -known-first-party = ["pyscancf"] From 5fb1e2a10d27dd7755529c47fe2e4a67e80e4544 Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:38:42 +0530 Subject: [PATCH 3/7] FIX: Ruff check --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81732f8..12c8ff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,5 +86,7 @@ line-length = 88 target-version = "py39" builtins = ["ellipsis"] exclude = [".eggs", "doc"] -ignore = ["E402", "E501", "E731"] + +[tool.ruff.lint] select = ["F", "E", "W", "I", "UP"] +ignore = ["E402", "E501", "E731"] From a33e1bf615cad9c40314d1dc4e09d6859dfc3494 Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:40:38 +0530 Subject: [PATCH 4/7] FIX: Ruff check --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 12c8ff3..829f42b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,8 +85,6 @@ line-length = 88 [tool.ruff] target-version = "py39" builtins = ["ellipsis"] -exclude = [".eggs", "doc"] - -[tool.ruff.lint] +exclude = [".eggs", "doc", "Examples"] select = ["F", "E", "W", "I", "UP"] ignore = ["E402", "E501", "E731"] From 274b26980f9b0ca0544f301151b0eb92e0e0859d Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:43:21 +0530 Subject: [PATCH 5/7] FIX: Ruff check --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 829f42b..766b39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,6 +85,6 @@ line-length = 88 [tool.ruff] target-version = "py39" builtins = ["ellipsis"] -exclude = [".eggs", "doc", "Examples"] +exclude = [".eggs", "doc", "Examples", "docs/_build"] select = ["F", "E", "W", "I", "UP"] ignore = ["E402", "E501", "E731"] From 74737fee599f81deff365a7443479da171d695f2 Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:46:12 +0530 Subject: [PATCH 6/7] FIX: Ruff check --- docs/notebooks/tutorial.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/notebooks/tutorial.ipynb b/docs/notebooks/tutorial.ipynb index ff64b56..04a3daf 100644 --- a/docs/notebooks/tutorial.ipynb +++ b/docs/notebooks/tutorial.ipynb @@ -18,10 +18,12 @@ "metadata": {}, "outputs": [], "source": [ - "import pyscancf as pcf\n", - "import pyart\n", "import glob\n", "\n", + "import pyart\n", + "\n", + "import pyscancf as pcf\n", + "\n", "print(pcf.__version__)" ] }, From 382638722c1a3a28f55235a0f24a366f55be1c85 Mon Sep 17 00:00:00 2001 From: syedhamidali Date: Sat, 19 Apr 2025 00:50:34 +0530 Subject: [PATCH 7/7] FIX: Ruff check --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6903ecf..7b6e244 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ version: 2 build: os: ubuntu-24.04 tools: - python: "3.13" + python: "3.12" # Build documentation in the "docs/" directory with Sphinx sphinx: