From 3c104522ead63ab3e77ae999ff8ba73a8db90801 Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Wed, 7 Feb 2024 10:02:17 -0500 Subject: [PATCH] Update PPT --- .copier-answers.yml | 2 +- .github/ISSUE_TEMPLATE/0-general_issue.md | 8 ++++++++ .github/ISSUE_TEMPLATE/1-bug_report.md | 17 +++++++++++++++++ .github/ISSUE_TEMPLATE/2-feature_request.md | 18 ++++++++++++++++++ .github/dependabot.yml | 10 ++++++++++ .github/workflows/asv-main.yml | 8 ++++---- .github/workflows/asv-nightly.yml | 10 +++++----- .github/workflows/asv-pr.yml | 12 ++++++------ .github/workflows/build-documentation.yml | 4 ++-- .github/workflows/code_style.yml | 5 ++--- .github/workflows/pre-commit-ci.yml | 9 ++++----- .github/workflows/publish-benchmarks-pr.yml | 6 +++--- .github/workflows/publish-to-pypi.yml | 4 ++-- .github/workflows/smoke-test.yml | 10 +++------- .github/workflows/testing-and-coverage.yml | 9 +++++---- .pre-commit-config.yaml | 12 ------------ pyproject.toml | 1 + 17 files changed, 91 insertions(+), 54 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/0-general_issue.md create mode 100644 .github/ISSUE_TEMPLATE/1-bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/2-feature_request.md create mode 100644 .github/dependabot.yml diff --git a/.copier-answers.yml b/.copier-answers.yml index 3cf5e88..e2d4228 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v1.4.6-38-gc8eefc6 +_commit: v1.4.6-69-g9ab5459 _src_path: gh:lincc-frameworks/python-project-template author_email: hombit@gmail.com author_name: LINCC Frameworks diff --git a/.github/ISSUE_TEMPLATE/0-general_issue.md b/.github/ISSUE_TEMPLATE/0-general_issue.md new file mode 100644 index 0000000..84bb0d7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0-general_issue.md @@ -0,0 +1,8 @@ +--- +name: General issue +about: Quickly create a general issue +title: '' +labels: '' +assignees: '' + +--- \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md new file mode 100644 index 0000000..220a63d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug_report.md @@ -0,0 +1,17 @@ +--- +name: Bug report +about: Tell us about a problem to fix +title: 'Short description' +labels: 'bug' +assignees: '' + +--- +**Bug report** + + +**Before submitting** +Please check the following: + +- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem. +- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead. +- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2-feature_request.md b/.github/ISSUE_TEMPLATE/2-feature_request.md new file mode 100644 index 0000000..bcddd74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: 'Short description' +labels: 'enhancement' +assignees: '' + +--- + +** Feature request** + + +**Before submitting** +Please check the following: + +- [ ] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves. +- [ ] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality. +- [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps. \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3b5ca19 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/asv-main.yml b/.github/workflows/asv-main.yml index f9fd700..17c3d73 100644 --- a/.github/workflows/asv-main.yml +++ b/.github/workflows/asv-main.yml @@ -23,13 +23,13 @@ jobs: steps: - name: Cache Python ${{ env.PYTHON_VERSION }} - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.cache/pip key: python-${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: "${{ env.PYTHON_VERSION }}" @@ -46,12 +46,12 @@ jobs: steps: - name: Checkout main branch of the repository - uses: actions/checkout@v3 + uses: actions/checkout@main with: fetch-depth: 0 - name: Cache Python ${{ env.PYTHON_VERSION }} - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.cache/pip key: python-${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/asv-nightly.yml b/.github/workflows/asv-nightly.yml index fa8012c..ce5a335 100644 --- a/.github/workflows/asv-nightly.yml +++ b/.github/workflows/asv-nightly.yml @@ -25,18 +25,18 @@ jobs: steps: - name: Checkout main branch of the repository - uses: actions/checkout@v3 + uses: actions/checkout@main with: fetch-depth: 0 - name: Cache Python ${{ env.PYTHON_VERSION }} - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.cache/pip key: python-${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: "${{ env.PYTHON_VERSION }}" @@ -70,7 +70,7 @@ jobs: echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: Use last nightly commit hash from cache - uses: actions/cache@v3 + uses: actions/cache@main with: path: ${{ env.WORKING_DIR }} key: nightly-results-${{ steps.nightly-dates.outputs.yesterday }} @@ -87,7 +87,7 @@ jobs: echo $CURRENT_HASH > $HASH_FILE - name: Update last nightly hash in cache - uses: actions/cache@v3 + uses: actions/cache@main with: path: ${{ env.WORKING_DIR }} key: nightly-results-${{ steps.nightly-dates.outputs.today }} \ No newline at end of file diff --git a/.github/workflows/asv-pr.yml b/.github/workflows/asv-pr.yml index 5c83964..91601b3 100644 --- a/.github/workflows/asv-pr.yml +++ b/.github/workflows/asv-pr.yml @@ -24,12 +24,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Python ${{ env.PYTHON_VERSION }} - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.cache/pip key: python-${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: ${{ env.PYTHON_VERSION }} asv-pr: @@ -40,14 +40,14 @@ jobs: working-directory: ${{ env.WORKING_DIR }} steps: - name: Checkout PR branch of the repository - uses: actions/checkout@v3 + uses: actions/checkout@main with: fetch-depth: 0 - name: Display Workflow Run Information run: | echo "Workflow Run ID: ${{ github.run_id }}" - name: Cache Python ${{ env.PYTHON_VERSION }} - uses: actions/cache@v3 + uses: actions/cache@main with: path: ~/.cache/pip key: python-${{ env.PYTHON_VERSION }} @@ -61,7 +61,7 @@ jobs: - name: Save pull request number run: echo ${{ github.event.pull_request.number }} > ${{ env.ARTIFACTS_DIR }}/pr - name: Get current job logs URL - uses: Tiryoh/gha-jobid-action@v0 + uses: Tiryoh/gha-jobid-action@main id: jobs with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -80,7 +80,7 @@ jobs: env: STEP_URL: "${{ steps.jobs.outputs.html_url }}#step:11:1" - name: Upload artifacts (PR number and benchmarks output) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@main with: name: benchmark-artifacts path: ${{ env.ARTIFACTS_DIR }} \ No newline at end of file diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 35e5f72..3f57c7b 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -19,9 +19,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: '3.10' - name: Install dependencies diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index adf8da2..b76937d 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -21,16 +21,15 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | sudo apt-get update python -m pip install --upgrade pip - pip install . pip install .[dev] if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Analyze code with mypy diff --git a/.github/workflows/pre-commit-ci.yml b/.github/workflows/pre-commit-ci.yml index 8397877..08ff1d3 100644 --- a/.github/workflows/pre-commit-ci.yml +++ b/.github/workflows/pre-commit-ci.yml @@ -13,22 +13,21 @@ jobs: env: SKIP: "check-lincc-frameworks-template-version,pytest-check,no-commit-to-branch,validate-pyproject,check-added-large-files,sphinx-build" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: '3.10' - name: Install dependencies run: | sudo apt-get update python -m pip install --upgrade pip - pip install . pip install .[dev] if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@main # Still using Node 16 with: extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} - - uses: pre-commit-ci/lite-action@v1.0.1 + - uses: pre-commit-ci/lite-action@main if: always() \ No newline at end of file diff --git a/.github/workflows/publish-benchmarks-pr.yml b/.github/workflows/publish-benchmarks-pr.yml index 0fa6e07..1f5ab31 100644 --- a/.github/workflows/publish-benchmarks-pr.yml +++ b/.github/workflows/publish-benchmarks-pr.yml @@ -27,7 +27,7 @@ jobs: echo "Conclusion: ${{ github.event.workflow_run.conclusion }}" echo "Event: ${{ github.event.workflow_run.event }}" - name: Download artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@master with: name: benchmark-artifacts run_id: ${{ github.event.workflow_run.id }} @@ -38,14 +38,14 @@ jobs: printf "Output:\n$(cat output)" printf "pr=$(cat pr)" >> $GITHUB_OUTPUT - name: Find benchmarks comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@main id: find-comment with: issue-number: ${{ steps.pr-info.outputs.pr }} comment-author: 'github-actions[bot]' body-includes: view all benchmarks - name: Create or update benchmarks comment - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@main with: comment-id: ${{ steps.find-comment.outputs.comment-id }} issue-number: ${{ steps.pr-info.outputs.pr }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 3147bde..a3eed49 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -22,9 +22,9 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: '3.10' - name: Install dependencies diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 8e3705d..d57fe0d 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -23,17 +23,16 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | sudo apt-get update python -m pip install --upgrade pip - pip install . - pip install .[dev] + pip install -e .[dev] if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: List dependencies run: | @@ -41,6 +40,3 @@ jobs: - name: Run unit tests with pytest run: | python -m pytest - - name: Send failure email - run: | - echo "NOT IMPLEMENTED IN PPT, UPDATE PPT WHEN IT IS READY" diff --git a/.github/workflows/testing-and-coverage.yml b/.github/workflows/testing-and-coverage.yml index 5e48f55..b80e8b4 100644 --- a/.github/workflows/testing-and-coverage.yml +++ b/.github/workflows/testing-and-coverage.yml @@ -18,20 +18,21 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@main with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | sudo apt-get update python -m pip install --upgrade pip - pip install -e . pip install -e .[dev] if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Run unit tests with pytest run: | python -m pytest --cov=pandas_ts --cov-report=xml - name: Upload coverage report to codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@main + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d59724..7bf02fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,5 @@ fail_fast: true repos: - # Compare the local template version to the latest remote template version # This hook should always pass. It will print a message if the local version # is out of date. @@ -11,7 +10,6 @@ repos: name: Check template version description: Compare current template version against latest verbose: true - # Clear output from jupyter notebooks so that only the input cells are committed. - repo: local hooks: @@ -22,7 +20,6 @@ repos: stages: [commit] language: system entry: jupyter nbconvert --clear-output - # Prevents committing directly branches named 'main' and 'master'. - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 @@ -34,7 +31,6 @@ repos: name: Check for large files description: Prevent the user from committing very large files. args: ['--maxkb=500'] - # Verify that pyproject.toml is well formed - repo: https://github.com/abravalheri/validate-pyproject rev: v0.12.1 @@ -54,10 +50,6 @@ repos: name: Lint code using ruff # Disable ruff for notebooks since it is too strict. types_or: [ python, pyi ] - - - - # Analyze type hints and report errors. - repo: local hooks: - id: mypy @@ -68,12 +60,8 @@ repos: files: ^(src|tests)/ args: [ - "--ignore-missing-imports", # Ignore imports without type hints - ] - - # Run unit tests, verify that they pass. Note that coverage is run against # the ./src directory here because that is what will be committed. In the # github workflow script, the coverage is run against the installed package diff --git a/pyproject.toml b/pyproject.toml index 8bac525..81a0774 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ classifiers = [ "Programming Language :: Python", ] dynamic = ["version"] +requires-python = ">=3.9" dependencies = [ # We use internal pd._libs.missing and experimental ArrowExtensionArray "pandas>=2.2,<2.3",