Skip to content

Projects that belong to courses are now non-billable#240

Merged
QuanMPhm merged 2 commits into
CCI-MOC:mainfrom
QuanMPhm:is_course
Mar 2, 2026
Merged

Projects that belong to courses are now non-billable#240
QuanMPhm merged 2 commits into
CCI-MOC:mainfrom
QuanMPhm:is_course

Conversation

@QuanMPhm

Copy link
Copy Markdown
Contributor

Closes https://github.com/CCI-MOC/non-billable-projects/issues/66. Leveraging the private field Is Course? in Coldfront [1], if this field is set to Yes, the project/allocation is considered part of a course and therefore non-billable.
If the field is not set, it's assumed to be not part of a course

[1] https://github.com/ubccr/coldfront/blob/a4b6b4c1d18535f61de5aa4bbfe509d7d8ca4b0f/coldfront/core/allocation/management/commands/add_allocation_defaults.py#L56

@QuanMPhm

QuanMPhm commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

@joachimweyl @knikolla @naved001 I've updated this PR to make courses only nonbillable if institution == "Boston University"

Comment thread process_report/invoices/invoice.py
Comment thread process_report/processors/validate_billable_pi_processor.py Outdated
@QuanMPhm

Copy link
Copy Markdown
Contributor Author

@knikolla @naved001 I've added a second commit to move some functions from utils.py into InstituteList.

@joachimweyl

Copy link
Copy Markdown
Contributor

@QuanMPhm do we know what the conflicts are that need to be resolved?

@QuanMPhm

Copy link
Copy Markdown
Contributor Author

@joachimweyl I see that this PR is now relevant to the Iceberg project. I'll resolve the conflicts today

@QuanMPhm QuanMPhm force-pushed the is_course branch 2 times, most recently from 1524272 to 9f092e9 Compare February 20, 2026 15:06
@QuanMPhm

Copy link
Copy Markdown
Contributor Author

@naved001 Would like your approval

@naved001 naved001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good

):
institute_list = util.load_institute_list()

print(data)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

probably meant for debugging, right? can be removed now.

@knikolla knikolla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Remove print statement mentioned in comment.

Leveraging the private field `Is Course?` in Coldfront [1],
if this field is set to `Yes`, the project/allocation is considered part
of a course.

For now, any project that is a part of a course
and belongs to Boston University is non-billable. [2]

If the field is not set, it's assumed to be not part of a course

[1] https://github.com/ubccr/coldfront/blob/a4b6b4c1d18535f61de5aa4bbfe509d7d8ca4b0f/coldfront/core/allocation/management/commands/add_allocation_defaults.py#L56
[2] CCI-MOC/invoicing-private-data#66 (comment)
- Moved functions related to `InstituteList` into the class
@QuanMPhm QuanMPhm merged commit 6f4afb4 into CCI-MOC:main Mar 2, 2026
6 checks passed
@jimmysway jimmysway mentioned this pull request Mar 3, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants