Skip to content

Add cmsRemoveTeam#1694

Open
pxsit wants to merge 2 commits intocms-dev:mainfrom
pxsit:cmscontrib-remove-team
Open

Add cmsRemoveTeam#1694
pxsit wants to merge 2 commits intocms-dev:mainfrom
pxsit:cmscontrib-remove-team

Conversation

@pxsit
Copy link
Copy Markdown
Contributor

@pxsit pxsit commented May 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 6, 2026 09:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new CMS contributor CLI command, cmsRemoveTeam, enabling removal of a Team record from the CMS database via a console script entry point.

Changes:

  • Register a new cmsRemoveTeam console script in setup.py.
  • Add cmscontrib/RemoveTeam.py implementing team lookup by code and deletion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
setup.py Registers the new cmsRemoveTeam console entry point.
cmscontrib/RemoveTeam.py Implements the CLI workflow and DB deletion logic for removing a team.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmscontrib/RemoveTeam.py
Comment on lines +34 to +42
def remove_team(code: str) -> bool:
with SessionGen() as session:
team = session.query(Team).filter(Team.code == code).first()
if team is None:
logger.error("Team %s does not exist.", code)
return False

session.delete(team)
session.commit()
Comment thread cmscontrib/RemoveTeam.py

"""
parser = argparse.ArgumentParser(
description="Remove a team from CMS .")
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.88%. Comparing base (6a28840) to head (1dcf938).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cmscontrib/RemoveTeam.py 0.00% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1694      +/-   ##
==========================================
- Coverage   53.89%   53.88%   -0.01%     
==========================================
  Files         341      342       +1     
  Lines       27977    28000      +23     
==========================================
+ Hits        15077    15087      +10     
- Misses      12900    12913      +13     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 53.88% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants