From dcd98587fabcd827e388c503c62be7b5f0190c8c Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:04:48 -0700 Subject: [PATCH 1/8] remove old docs, update versions --- .../workflows/gkb_workflows/pypipublish.yml | 32 ---------- .github/workflows/gkb_workflows/pytest.yml | 60 ------------------- .github/workflows/publishdevdocs.yml | 6 +- .github/workflows/publishgkbdevdocs.yml | 31 ---------- setup.cfg | 2 +- 5 files changed, 4 insertions(+), 127 deletions(-) delete mode 100644 .github/workflows/gkb_workflows/pypipublish.yml delete mode 100644 .github/workflows/gkb_workflows/pytest.yml delete mode 100644 .github/workflows/publishgkbdevdocs.yml diff --git a/.github/workflows/gkb_workflows/pypipublish.yml b/.github/workflows/gkb_workflows/pypipublish.yml deleted file mode 100644 index a099257..0000000 --- a/.github/workflows/gkb_workflows/pypipublish.yml +++ /dev/null @@ -1,32 +0,0 @@ -# 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 - -on: - release: - types: [released] - workflow_dispatch: - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel install - twine upload dist/* 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..9f0f192 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 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/setup.cfg b/setup.cfg index fed938d..df72c07 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,7 +41,7 @@ install_requires = [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 From d38672c212cfb3c28fc5284f9e54a1fa6e9247ea Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:05:22 -0700 Subject: [PATCH 2/8] remove package version ceilings --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index df72c07..c69b087 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,8 +35,8 @@ 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 From 777818b1747ccb9641e5ffbc7f50f74acc354cd2 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:13:29 -0700 Subject: [PATCH 3/8] add testpypi workflow --- .github/workflows/pypitestpublish.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pypitestpublish.yml diff --git a/.github/workflows/pypitestpublish.yml b/.github/workflows/pypitestpublish.yml new file mode 100644 index 0000000..1176efc --- /dev/null +++ b/.github/workflows/pypitestpublish.yml @@ -0,0 +1,30 @@ +# 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 testpypi + +on: + - push + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel install + twine upload --repository testpypi dist/* From a48b84cf0f53bdf6cc6d22d9f020a1b1471e991b Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:21:59 -0700 Subject: [PATCH 4/8] use test credentials in test workflow --- .github/workflows/pypitestpublish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypitestpublish.yml b/.github/workflows/pypitestpublish.yml index 1176efc..209cc27 100644 --- a/.github/workflows/pypitestpublish.yml +++ b/.github/workflows/pypitestpublish.yml @@ -23,8 +23,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 --repository testpypi dist/* From af84644f0e147aa02afaaf6990277ee3850b3bfe Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:27:33 -0700 Subject: [PATCH 5/8] disable test workflow; working --- .github/workflows/pypitestpublish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypitestpublish.yml b/.github/workflows/pypitestpublish.yml index 209cc27..bd634fd 100644 --- a/.github/workflows/pypitestpublish.yml +++ b/.github/workflows/pypitestpublish.yml @@ -4,7 +4,7 @@ name: upload to testpypi on: - - push + # - push jobs: deploy: From dbcfe20501c43c9e45a379b5a66040b5b119d6b7 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:28:56 -0700 Subject: [PATCH 6/8] set to manual trigger --- .github/workflows/pypitestpublish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypitestpublish.yml b/.github/workflows/pypitestpublish.yml index bd634fd..e8a687b 100644 --- a/.github/workflows/pypitestpublish.yml +++ b/.github/workflows/pypitestpublish.yml @@ -3,8 +3,7 @@ name: upload to testpypi -on: - # - push +on: workflow_dispatch jobs: deploy: From ffcad959899516db1f4db736cb338dba3c73ccd5 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:48:09 -0700 Subject: [PATCH 7/8] update docs workflow --- .github/workflows/publishdevdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publishdevdocs.yml b/.github/workflows/publishdevdocs.yml index 9f0f192..7ef6eae 100644 --- a/.github/workflows/publishdevdocs.yml +++ b/.github/workflows/publishdevdocs.yml @@ -24,6 +24,7 @@ jobs: pip install .[docs] pip install markdown_refdocs mkdocs mkdocs-material markdown_refdocs ipr -o docs/reference --link + markdown_refdocs graphkb -o docs/docs_graphkb/reference --link mkdocs build - name: Deploy uses: peaceiris/actions-gh-pages@v3 From 7429410b02e3cd001965b66976d8cac76b8ee328 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Jul 2024 14:51:39 -0700 Subject: [PATCH 8/8] updates --- .github/workflows/publishdevdocs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publishdevdocs.yml b/.github/workflows/publishdevdocs.yml index 7ef6eae..0fce624 100644 --- a/.github/workflows/publishdevdocs.yml +++ b/.github/workflows/publishdevdocs.yml @@ -23,8 +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 graphkb -o docs/docs_graphkb/reference --link + markdown_refdocs pori_python -o docs/reference --link mkdocs build - name: Deploy uses: peaceiris/actions-gh-pages@v3