Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize #65

Merged
merged 20 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a377e56
Move environment files to the 'envs' directory
douglatornell Feb 15, 2025
f71c2f6
Add Dependabot config to monitor Actions versions
douglatornell Feb 15, 2025
17ad78c
Add GHA workflow for auto-assigning issues/PRs
douglatornell Feb 15, 2025
4b91019
Add GHA CodeQL analysis workflow
douglatornell Feb 15, 2025
d417e41
Add test environment and GHA pytest workflow
douglatornell Feb 15, 2025
c5bd643
Correct spelling of environment-test.yaml file name
douglatornell Feb 15, 2025
5a0efde
Update test env to install SOG package from GitHub
douglatornell Feb 15, 2025
bba7916
Correct SOGCommand pkg identifier in test environment
douglatornell Feb 15, 2025
32fceb6
Rename dev env file and update dev env name
douglatornell Feb 15, 2025
6386813
Add pre-commit to manage code style & repo QA
douglatornell Feb 15, 2025
318505c
Code style gardening by pre-commit
douglatornell Feb 15, 2025
66974b1
Add pytest-cov and pytest-randomly to dev env
douglatornell Feb 15, 2025
d23a11c
Pin versions of sphinx and optional extensions
douglatornell Feb 15, 2025
840f8a0
Switch to pyproject.toml for build configuration
douglatornell Feb 15, 2025
5744157
Chg to Hatch for project build system and pkg management
douglatornell Feb 15, 2025
b92645a
Refactor metadata handling and update project config
douglatornell Feb 15, 2025
973d674
Update pkgs & versions used in recent dev env
douglatornell Feb 15, 2025
c7490c8
Rename project and package to "bloomcast"
douglatornell Feb 15, 2025
4bb12c8
Move coverage config from .coveragerc to pyproject.toml
douglatornell Feb 15, 2025
8475968
Add pytest configuration to pyproject.toml
douglatornell Feb 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .coveragerc

This file was deleted.

13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Dependabot config to enable checking for version updates on actions
# and open pull requests to apply those updates
# refs:
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
18 changes: 18 additions & 0 deletions .github/workflows/assign-issue-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Assign Issue/PR

on:
issues:
types:
- reopened
- opened
pull_request:
types:
- reopened
- opened

jobs:
auto_assign:
permissions:
issues: write
pull-requests: write
uses: UBC-MOAD/gha-workflows/.github/workflows/auto-assign.yaml@main
22 changes: 22 additions & 0 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "CodeQL"

on:
push:
branches: [ '*' ]
schedule:
- cron: '01 12 * * 0'

jobs:
analyze:
name: Analyze
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
uses: UBC-MOAD/gha-workflows/.github/workflows/codeql-analysis.yaml@main
with:
language: ${{ matrix.language }}
25 changes: 25 additions & 0 deletions .github/workflows/pytest-with-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: pytest-with-coverage

on:
push:
branches: [ '*' ]
# Enable workflow to be triggered from GitHub CLI, browser, or via API
# primarily for testing conda env solution for new Python versions
workflow_dispatch:

jobs:
pytest-with-coverage:
permissions:
contents: read
pull-requests: write
strategy:
fail-fast: false
matrix:
python-version: [ '3.12' ]
uses: UBC-MOAD/gha-workflows/.github/workflows/pytest-with-coverage.yaml@main
with:
python-version: ${{ matrix.python-version }}
conda-env-file: envs/environment-test.yaml
conda-env-name: bloomcast-test
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,3 @@ flycheck_*.el

# network security
/network-security.data


21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Git pre-commit hooks config file
# Only takes effect if you have pre-commit installed in the env,
# and after you run `pre-commit install`
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Out-of-the-box hooks from the pre-commit org
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
# Code formatting with black
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
23 changes: 7 additions & 16 deletions __pkg_metadata__.py → bloomcast/__about__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# Copyright 2011-2021 Doug Latornell and The University of British Columbia

# Copyright 2011– present by Doug Latornell, Susan Allen, and The University of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Python packaging metadata for SoG-bloomcast.
"""


__all__ = [
'PROJECT', 'DESCRIPTION', 'VERSION', 'DEV_STATUS',
]
# SPDX-License-Identifier: Apache-2.0


PROJECT = 'SoG-bloomcast'
DESCRIPTION = 'Strait of Georgia spring diatom bloom predictor'
VERSION = '3.1'
DEV_STATUS = '5 - Production'
__version__ = "3.1" # pragma: no cover
1 change: 0 additions & 1 deletion bloomcast/__pkg_metadata__.py

This file was deleted.

Loading