diff --git a/.github/workflows/gkb_workflows/pytest.yml b/.github/workflows/gkb_workflows/pytest.yml deleted file mode 100644 index 4f00ce3..0000000 --- a/.github/workflows/gkb_workflows/pytest.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: build - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: ['3.9', '3.10'] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools - pip install .[test] - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 graphkb --count --select=E9,F63,F7,F82 --show-source --statistics - - name: Check with black - run: | - pip install black - black --check -S -l 100 graphkb tests - - name: Test with pytest - run: | - pip list - pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov graphkb --cov-report term --cov-report xml --durations 10 -vv - env: - GRAPHKB_USER: ${{ secrets.GKB_TEST_USER }} - GRAPHKB_PASS: ${{ secrets.GKB_TEST_PASS }} - EXCLUDE_INTEGRATION_TESTS: 0 - - name: Upload pytest test results - uses: actions/upload-artifact@master - with: - name: pytest-results-${{ matrix.python-version }} - path: junit/test-results-${{ matrix.python-version }}.xml - # Use always() to always run this step to publish test results when there are test failures - if: always() - - name: Update code coverage report to CodeCov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - name: codecov-umbrella - fail_ci_if_error: true - if: matrix.python-version == 3.9 diff --git a/.github/workflows/publishdevdocs.yml b/.github/workflows/publishdevdocs.yml index d312a1f..0fce624 100644 --- a/.github/workflows/publishdevdocs.yml +++ b/.github/workflows/publishdevdocs.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + python-version: [3.9] steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: install and build @@ -23,7 +23,7 @@ jobs: python -m pip install --upgrade pip setuptools pip install .[docs] pip install markdown_refdocs mkdocs mkdocs-material - markdown_refdocs ipr -o docs/reference --link + markdown_refdocs pori_python -o docs/reference --link mkdocs build - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/publishgkbdevdocs.yml b/.github/workflows/publishgkbdevdocs.yml deleted file mode 100644 index a9b4121..0000000 --- a/.github/workflows/publishgkbdevdocs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: publish gh-pages docs -on: - push: - branches: - - master -jobs: - - build: - name: Build - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9] - steps: - - name: checkout - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: install and build - run: | - python -m pip install --upgrade pip setuptools - pip install .[doc] - markdown_refdocs graphkb -o docs/docs_graphkb/reference --link - mkdocs build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build-docs diff --git a/.github/workflows/gkb_workflows/pypipublish.yml b/.github/workflows/pypitestpublish.yml similarity index 76% rename from .github/workflows/gkb_workflows/pypipublish.yml rename to .github/workflows/pypitestpublish.yml index a099257..e8a687b 100644 --- a/.github/workflows/gkb_workflows/pypipublish.yml +++ b/.github/workflows/pypitestpublish.yml @@ -1,12 +1,9 @@ # This workflows will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -name: upload to pypi +name: upload to testpypi -on: - release: - types: [released] - workflow_dispatch: +on: workflow_dispatch jobs: deploy: @@ -25,8 +22,8 @@ jobs: pip install setuptools wheel twine - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: ${{ secrets.PYPI_TEST_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }} run: | python setup.py sdist bdist_wheel install - twine upload dist/* + twine upload --repository testpypi dist/* diff --git a/setup.cfg b/setup.cfg index fed938d..c69b087 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,13 +35,13 @@ install_requires = progressbar2 pandas>=1.1.0 jsonschema - requests<2.29.0 - typing_extensions>=3.7.4.2,<4.4 + requests + typing_extensions>=3.7.4.2,<5 [options.extras_require] deploy = twine; wheel; m2r test = pytest; pytest-cov; pytest-runner -doc = mkdocs; mkdocs-material; markdown-refdocs; mkdocs-redirects +docs = mkdocs; mkdocs-material; markdown-refdocs; mkdocs-redirects dev = twine wheel