diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index ff320231b5f..7c9f0cf2da4 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,13 +1,16 @@ name: Deploy to GitHub Pages on: - push: + pull_request: branches: - main + types: [closed] + jobs: generate: name: Generate and Deploy documentation + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Git checkout diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 23870d226d1..2357cc8fc89 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,8 +10,8 @@ env: on: push: branches: - - "feature/*" - - "hotfix/*" + - 'feature/*' + - 'hotfix/*' - 'release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?' # Cancel previous runs that are not yet completed. @@ -40,7 +40,7 @@ jobs: restore-keys: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }} - run: | - pip install bandit black codespell mypy==0.982 pyupgrade safety pylint==2.15.2 packaging==22 ruff + pip install bandit black codespell mypy==0.982 pyupgrade safety pylint==2.15.2 packaging==22 ruff==0.0.212 pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six - run: bandit -x ./tests -r . || true - run: black --diff --check . diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c597d7d9798..739e8de0a29 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -92,7 +92,7 @@ jobs: MPLBACKEND: Agg run: | source $VENV - pytest tests/ --optimization + pytest tests/ --optimization --autodoc - name: Start Terminal and exit run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff30966ee2a..7521b1b93f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1530,13 +1530,15 @@ Network model. to go back to step 3 to add these. ### Branch Naming Conventions + The accepted branch naming conventions are: -- `feature/feature-name` -- `hotfix/hotfix-name` -- `release/2.1.0` or `release/2.1.0rc0`. +- `feature/feature-name` +- `hotfix/hotfix-name` +- `release/2.1.0` or `release/2.1.0rc0`. All `feature/feature-name` related branches can only have PRs pointing to `develop` branch. `hotfix/hotfix-name` and `release/2.1.0` or `release/2.1.0rc0` branches can only have PRs pointing to `main` branch. + ## Add a Test Unit tests minimize errors in code and quickly find errors when they do arise. Integration tests are standard usage examples, which are also used to identify errors. diff --git a/gitflow.py b/gitflow.py deleted file mode 100644 index 922fe1f0de9..00000000000 --- a/gitflow.py +++ /dev/null @@ -1,4 +0,0 @@ -print("Hello, World!") - -# print another -print("Hello, World!") \ No newline at end of file diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 5ceecf9070e..7820199cf70 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -1,5 +1,6 @@ import pandas as pd + def no_dfs(args: list, kwargs: dict) -> bool: """Returns false if there are in dataframe objects given""" for item in args: @@ -8,4 +9,4 @@ def no_dfs(args: list, kwargs: dict) -> bool: for item in kwargs.values(): if isinstance(item, pd.DataFrame): return False - return True \ No newline at end of file + return True