Skip to content

Commit

Permalink
Fix jupytext and lint CI failures (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Apr 6, 2024
1 parent 19498e8 commit be994d2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
with:
package_name: jupytext
test_command: pip install pytest-jupyter[server] gitpython pre-commit && python -m ipykernel install --name jupytext-dev --user && pytest -vv -raXxs -W default --durations 10 --color=yes
test_command: pip install pytest-jupyter[server] gitpython pre-commit && python -m ipykernel install --name jupytext-dev --user && pytest -vv -raXxs -W default --durations 10 --ignore=tests/functional/others --color=yes

downstream_check: # This job does nothing and is only used for the branch protection
if: always()
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb
- name: Run the tests on posix
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
run: hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf
run: hatch run cov:test --cov-fail-under 75 || hatch -v run test:test --lf
- name: Run the tests on pypy
if: ${{ startsWith(matrix.python-version, 'pypy') }}
run: hatch run test:nowarn || hatch run test:nowarn --lf
run: hatch run test:nowarn || hatch -v run test:nowarn --lf
- name: Run the tests on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: hatch run cov:nowarn -s || hatch run cov:nowarn --lf
run: hatch run cov:nowarn -s || hatch -v run cov:nowarn --lf
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

test_docs:
Expand All @@ -64,14 +64,14 @@ jobs:
sudo apt-get install enchant-2 # for spell checking
- name: Build API docs
run: |
hatch run docs:api
hatch -v run docs:api
# If this fails run `hatch run docs:api` locally
# and commit.
git status --porcelain
git status -s | grep "A" && exit 1
git status -s | grep "M" && exit 1
echo "API docs done"
- run: hatch run docs:build
- run: hatch -v run docs:build

test_lint:
name: Test Lint
Expand All @@ -81,8 +81,8 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run Linters
run: |
hatch run typing:test
hatch run lint:build
hatch -v run typing:test
hatch -v run lint:build
pipx run interrogate -v .
pipx run doc8 --max-line-length=200 --ignore-path=docs/source/other/full-config.rst
npm install -g eslint
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
dependency_type: minimum
- name: Run the unit tests
run: |
hatch -vv run test:nowarn || hatch run test:nowarn --lf
hatch -vv run test:nowarn || hatch -v run test:nowarn --lf
test_prereleases:
name: Test Prereleases
Expand All @@ -127,7 +127,7 @@ jobs:
dependency_type: pre
- name: Run the tests
run: |
hatch run test:nowarn || hatch run test:nowarn --lf
hatch run test:nowarn || hatch -v run test:nowarn --lf
make_sdist:
name: Make SDist
Expand All @@ -148,7 +148,7 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1
with:
package_spec: -vv .
test_command: hatch run test:test || hatch run test:test --lf
test_command: hatch run test:test || hatch -v run test:test --lf

check_release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run the tests
run: hatch run cov:integration
run: hatch -v run cov:integration
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

integration_check_pypy:
Expand All @@ -196,7 +196,7 @@ jobs:
with:
python_version: "pypy-3.8"
- name: Run the tests
run: hatch run test:nowarn --integration_tests=true
run: hatch -v run test:nowarn --integration_tests=true

coverage:
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default [
{
"languageOptions": {
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
},
"rules": {
"semi": 1,
"no-cond-assign": 2,
"no-debugger": 2,
"comma-dangle": 0,
"no-unreachable": 2
},
"ignores": [
"*.min.js",
"*components*",
"*node_modules*",
"*built*",
"*build*"
]
}
];
13 changes: 0 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@
"bootstrap": "^3.4.0",
"copyfiles": "^2.4.1"
},
"eslintConfig": {
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"semi": 1,
"no-cond-assign": 2,
"no-debugger": 2,
"comma-dangle": 0,
"no-unreachable": 2
}
},
"eslintIgnore": [
"*.min.js",
"*components*",
Expand Down

0 comments on commit be994d2

Please sign in to comment.