diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53ccb6f..2f4677f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,4 +77,7 @@ jobs: run: | pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 + with: + name: Test + files: /home/runner/work/ipython/ipython/coverage.xml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5826baf..164757f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,8 +66,9 @@ Some guidelines on contributing to IPython: If you're making functional changes, you can clean up the specific pieces of code you're working on. -[Travis](http://travis-ci.org/#!/ipython/ipython) does a pretty good job testing -IPython and Pull Requests, but it may make sense to manually perform tests, +[GitHub Actions](https://github.com/ipython/ipython/actions/workflows/test.yml) does +a pretty good job testing IPython and Pull Requests, +but it may make sense to manually perform tests, particularly for PRs that affect `IPython.parallel` or Windows. For more detailed information, see our [GitHub Workflow](https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow). @@ -88,3 +89,30 @@ Only a single test (for example **test_alias_lifecycle**) within a single file c ```shell pytest IPython/core/tests/test_alias.py::test_alias_lifecycle ``` + +## Code style + +* Before committing, run `darker -r 60625f241f298b5039cb2debc365db38aa7bb522 ` to apply selective `black` formatting on modified regions using [darker](https://github.com/akaihola/darker). +* For newly added modules or refactors, please enable static typing analysis with `mypy` for the modified module by adding the file path in [`mypy.yml`](https://github.com/ipython/ipython/blob/main/.github/workflows/mypy.yml) workflow. +* As described in the pull requests section, please avoid excessive formatting changes; if a formatting-only commit is necessary, consider adding its hash to [`.git-blame-ignore-revs`](https://github.com/ipython/ipython/blob/main/.git-blame-ignore-revs) file. + +## Documentation + +Sphinx documentation can be built locally using standard sphinx `make` commands. To build HTML documentation from the root of the project, execute: + +```shell +pip install -r docs/requirements.txt # only needed once +make -C docs/ html SPHINXOPTS="-W" +``` + +To force update of the API documentation, precede the `make` command with: + +```shell +python3 docs/autogen_api.py +``` + +Similarly, to force-update the configuration, run: + +```shell +python3 docs/autogen_config.py +``` diff --git a/README.rst b/README.rst index 0371848..b004792 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ :target: https://pypi.python.org/pypi/ipython .. image:: https://github.com/ipython/ipython/actions/workflows/test.yml/badge.svg - :target: https://github.com/ipython/ipython/actions/workflows/test.yml) + :target: https://github.com/ipython/ipython/actions/workflows/test.yml .. image:: https://www.codetriage.com/ipython/ipython/badges/users.svg :target: https://www.codetriage.com/ipython/ipython/ diff --git a/docs/source/config/integrating.rst b/docs/source/config/integrating.rst index 07429ef..23cc1e5 100644 --- a/docs/source/config/integrating.rst +++ b/docs/source/config/integrating.rst @@ -128,7 +128,6 @@ More powerful methods Displays the object as a side effect; the return value is ignored. If this is defined, all other display methods are ignored. - This method is ignored in the REPL. Metadata diff --git a/pytest.ini b/pytest.ini index 81511e9..5cc9776 100644 --- a/pytest.ini +++ b/pytest.ini @@ -14,18 +14,10 @@ addopts = --durations=10 --ignore=IPython/sphinxext --ignore=IPython/terminal/pt_inputhooks --ignore=IPython/__main__.py - --ignore=IPython/config.py - --ignore=IPython/frontend.py - --ignore=IPython/html.py - --ignore=IPython/nbconvert.py - --ignore=IPython/nbformat.py - --ignore=IPython/parallel.py - --ignore=IPython/qt.py --ignore=IPython/external/qt_for_kernel.py --ignore=IPython/html/widgets/widget_link.py --ignore=IPython/html/widgets/widget_output.py --ignore=IPython/terminal/console.py - --ignore=IPython/terminal/ptshell.py --ignore=IPython/utils/_process_cli.py --ignore=IPython/utils/_process_posix.py --ignore=IPython/utils/_process_win32.py diff --git a/tools/release_helper.sh b/tools/release_helper.sh index 697ed85..d221f55 100644 --- a/tools/release_helper.sh +++ b/tools/release_helper.sh @@ -8,6 +8,7 @@ python -c 'import twine' python -c 'import sphinx' python -c 'import sphinx_rtd_theme' python -c 'import pytest' +python -c 'import build' BLACK=$(tput setaf 1)