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

Modernize #65

merged 20 commits into from
Feb 15, 2025

Conversation

douglatornell
Copy link
Member

@douglatornell douglatornell commented Feb 15, 2025

  • moved env descriptions & requirements.txt to envs/ directory
  • added dependabot workflow to monitor actions versions
  • added GHA workflow to auto-assign issues & PRs
  • added GHA workflow to to run CodeQL analysis
  • added GHA workflow to to run pytest-with-coverage
  • added pre-commit config and updated coding style
  • modernized packaging

Relocated 'environment.yaml' and 'requirements.txt' to a dedicated 'envs/'
directory for better organization. This change improves project structure and
simplifies environment file management.
Introduce a Dependabot configuration file to automate version checks for GitHub
Actions. The setup schedules weekly checks and ensures actions are kept
up to date via pull requests. This improves maintenance and security by
automating dependency updates.
This workflow triggers on issue or PR creation and reopening events. It uses a
shared workflow from UBC-MOAD/gha-workflows/.
@douglatornell douglatornell added the maintenance Codebase & repo maintenance label Feb 15, 2025
This commit introduces a GitHub Actions workflow to run CodeQL analysis. It
helps identify potential security vulnerabilities in Python code with scheduled
weekly scans and branch-specific triggers.
Create a new conda environment file for testing and coverage analysis,
specifying required dependencies for testing the SOG-Bloomcast-Ensemble package.
Add a GitHub Actions workflow to automate running pytest with coverage checks
and reporting. The workflow uses a reusable workflow from UBC-MOAD/gha-workflows.
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Updated the test environment file to include installation of the SOG package in
editable mode via a GitHub URL. This ensures the latest SOG code is pulled
directly from the repository, alongside the existing SOG-Bloomcast-Ensemble
package.
Renamed `environment.yml` to `environment-dev.yaml` and updated the environment
name to `bloomcast-dev` for clarity and consistency. Adjusted setup instructions
to reflect these changes, aligning the naming convention with
development-specific purposes.
Initial hooks:

* Code formatting by black
* Trim trailing whitespace
* Ensure that files are either empty, or end with one newline
* Confirm that YAML files have parsable syntax
* Confirm that TOML files have parsable syntax
* Prevent files larger than 500 kB from being committed
Updated environment-dev.yaml to include pytest-cov for test coverage monitoring
and pytest-randomly for randomized test execution. These additions aim to
improve testing comprehensiveness and robustness.
As recommended for reproducible builds on readthedocs:
https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
and to ensure that our docs build works with readthedocs changes to default
project dependencies:
https://blog.readthedocs.com/defaulting-latest-build-tools/
Replaced setup.py with pyproject.toml to modernize the project's build system and
comply with PEP 518 standards. Updated references in the codebase to use the new
configuration format. This change simplifies dependency management and aligns the
project with current Python packaging practices.
Updated `pyproject.toml` to replace Setuptools with Hatchling as the build
system. Added Hatch to the dev environment dependencies in `environment-dev.yaml`
for package management and consistency. Removed Setuptools-specific
configurations and aligned the project with Hatch's requirements.
Centralize package metadata in `pyproject.toml` and `bloomcast/__about__.py`,
removing legacy `__pkg_metadata__.py`. Updated Sphinx configuration to
dynamically fetch metadata, modernizing the documentation setup. Adjusted authors
list and introduced version automation with Hatch.
Updated the project name and package references in pyproject.toml to address
CI test import failures.
Transitioned the coverage settings to pyproject.toml for a cleaner and
centralized configuration. Removed the redundant .coveragerc file as its
contents are now fully integrated into the project’s primary configuration file.
Include pytest minimum version and the `tests/` path in pyproject.toml. This is
done to avoid collection of the dependency `env/src/sogcommand/SOGcommand/tests/`
directory in the GHA pytest-with-coverage workflow.
Copy link

codecov bot commented Feb 15, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@douglatornell douglatornell merged commit ffaa1c1 into main Feb 15, 2025
6 checks passed
@douglatornell douglatornell deleted the modernize branch February 15, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Codebase & repo maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant