diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 0000000..ab0e4da --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,36 @@ +name: example + +on: [push] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + base: + + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ubuntu, macos, windows] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Setup Python # Set Python version + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + # Install pip and pytest + - name: Install packages + run: | + python -m pip install --upgrade pip + python -m pip install pytest + python -m pip install --upgrade pip wheel setuptools + python -m pip install -r requirements/default.txt + python -m pip install -r requirements/test.txt + python -m pip install . + python -m pip list + - name: Test with pytest + run: pytest --doctest-modules diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 431997a..2b18bc0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: - name: Test NetworkY run: | - pytest --durations=10 --pyargs networky + pytest --durations=10 default: runs-on: ${{ matrix.os }}-latest @@ -53,13 +53,13 @@ jobs: - name: Test NetworkY run: | - pytest --doctest-modules --durations=10 --pyargs networky + pytest --doctest-modules --durations=10 - name: Test Dispatching # Limit this to only a single combination from the matrix if: ${{ (matrix.os == 'ubuntu') && (matrix.python-version == '3.11') }} run: | - NETWORKY_GRAPH_CONVERT=nx-loopback pytest --doctest-modules --durations=10 --pyargs networky + NETWORKY_GRAPH_CONVERT=nx-loopback pytest --doctest-modules --durations=10 extra: runs-on: ${{ matrix.os }} @@ -119,7 +119,7 @@ jobs: - name: Test NetworkY run: | - pytest --doctest-modules --durations=10 --pyargs networky + pytest --doctest-modules --durations=10 prerelease: runs-on: ${{ matrix.os }}-latest @@ -144,4 +144,4 @@ jobs: - name: Test NetworkY run: | - pytest --doctest-modules --durations=10 --pyargs networky + pytest --doctest-modules --durations=10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..528dc4e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +scripts \ No newline at end of file diff --git a/networky/tests/test_example.py b/networky/tests/test_example.py new file mode 100644 index 0000000..557b8a0 --- /dev/null +++ b/networky/tests/test_example.py @@ -0,0 +1,7 @@ +import pytest +import networky as nx + +class TestExample: + def test_ex(self): + G = nx.Graph() + assert G.is_directed() == False diff --git a/requirements/default.txt b/requirements/default.txt index 4b16544..95257cb 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1 +1,2 @@ -networkx >= 3.1 \ No newline at end of file +networkx + diff --git a/setup.py b/setup.py index f2ac3b7..40223d8 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,4 @@ description='Extended Graph Library on Top of NetworkX', packages=['networky'], install_requires= install_requires, - scripts=['scripts/update_nx.py'], - )