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 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: 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/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__)" ] }, diff --git a/pyproject.toml b/pyproject.toml index ef24d83..766b39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,11 +85,6 @@ line-length = 88 [tool.ruff] target-version = "py39" builtins = ["ellipsis"] -exclude = [".eggs", "doc"] - -[tool.ruff.lint] -ignore = ["E402", "E501", "E731"] +exclude = [".eggs", "doc", "Examples", "docs/_build"] select = ["F", "E", "W", "I", "UP"] - -[tool.ruff.lint.isort] -known-first-party = ["pyscancf"] +ignore = ["E402", "E501", "E731"]