Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into Namnn/needs-lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatnamnguyengtvthcm committed Sep 14, 2023
2 parents b69da59 + 6f28dc2 commit 27bd083
Show file tree
Hide file tree
Showing 29 changed files with 9,030 additions and 1,099 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: "Benchmark time & memory"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sphinx-version: "4.5.0"
docutils-version: "0.15"
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -50,7 +50,7 @@ jobs:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout 🛎️
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
-
name: Set up Docker Build 🐋
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}
Expand All @@ -56,14 +56,14 @@ jobs:
-
# Login to Docker Hub Docker Registry for deployment
name: Login to Docker Hub Docker Registry 🐸
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push html image to Doker Hub Docker Registry 🐳
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' && steps.deploycheck.outputs.value == 'y' }}
file: docker/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Docs-Linkcheck
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Update pip
run: |
pip install -U wheel
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
needs: publish_test
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
Expand Down
36 changes: 31 additions & 5 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ installed in an isolated environment by Poetry.
List make targets
-----------------

**Sphinx-Needs** uses ``make`` to invoke most development related actions.

Use ``make list`` to get a list of available targets.
Expand Down Expand Up @@ -92,20 +93,45 @@ To check if all used links in the documentation are still valid, run:
Running Tests
-------------
.. hint::

Please be sure to have the dependencies of the official documentation installed:
You can either run the tests directly using ``pytest``, in an existing environment:

.. code-block:: bash
pytest tests/
Or you can use the provided Makefile:

.. code-block:: bash
pip install -r docs/requirements.txt
make test
Note some tests use `syrupy <https://github.com/tophat/syrupy>`__ to perform snapshot testing.
These snapshots can be updated by running:

.. code-block:: bash
pytest tests/ --snapshot-update
.. hint::

Please be sure to have the dependencies of the official documentation also installed:

.. code-block:: bash
pip install -r docs/requirements.txt
Linting & Formatting
--------------------

**Sphinx-Needs** uses `black <https://github.com/psf/black>`_ and
`isort <https://pycqa.github.io/isort/>`_ to format its source code.
**Sphinx-Needs** uses `pre-commit <https://pre-commit.com/>`__ to run formatting and checking of source code.
This can be run directly using:

.. code-block:: bash
pre-commit run --all-files
or via the provided Makefile:

.. code-block:: bash
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
TEST_DEPENDENCIES = [
"pytest",
"pytest-xdist",
"syrupy",
"responses",
"lxml",
"pyparsing!=3.0.4",
Expand Down
Loading

0 comments on commit 27bd083

Please sign in to comment.