This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.express.task_management.services import TaskService, WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowStatus | |
from fund_admin.reporting.services import FinancialPackageService | |
from fund_admin.fund_properties.amendable_properties.services import FundPropertiesService | |
from fund_admin.reporting.services.financial_package.express import TaskTemplate | |
workflow_template = "publish-financial-package" | |
object_type = "reporting.FinancialPackageReport" | |
gp_publish_tasks_with_incorrect_due_date = list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.reporting.tasks import regenerate_financial_package | |
from fund_admin.reporting.constants import FinancialReportExportType | |
regenerate_financial_package( | |
package_id=43550, | |
user_id=0, | |
export_type=FinancialReportExportType.SEND_FOR_APPROVAL, | |
capital_account_fund_uuids=None | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import transaction | |
from fund_admin.express.task_management.services import WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowStatus, WorkflowTemplateName, TaskStatus | |
from fund_admin.reporting.models.package import FinancialPackageReport | |
@transaction.atomic | |
def force_complete_workflow_for_package(package_id): | |
workflow = WorkflowService().get_active_workflow_for_object( | |
str(package_id), | |
FinancialPackageReport._meta.label, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.fund_admin.models import Fund | |
from fund_admin.fund_properties.amendable_properties.models import FundTerms | |
from fund_admin.fund_properties.amendable_properties.models import LPADocuments | |
terms = FundTerms.objects.filter(domicile_country__isnull=True, country__isnull=False, country="US").order_by('created_at') | |
print(f"Num Terms to Update: {terms.count()}") | |
if terms.count() > 0: | |
for term in terms: | |
lpa_document = LPADocuments.objects.get(pk=term.lpa_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scripts.utils import ScriptRunner | |
from carta_identity.filters.user import EmailFilter as PrimaryEmailFilter, IsActiveFilter | |
from fund_admin.identity import get_carta_identity_client | |
from fund_admin.express.task_management.services import WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowTemplateName | |
from fund_admin.approvers.models import DesignatedApprover | |
from fund_admin.fund_admin.models import Firm, Fund, FundFamily | |
from django.db.models import Q | |
class RemoveDesignatedApprover(ScriptRunner): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Soft deleting FundLimitedPartnerDocuments created between Nov 2, 2023 7:00 AM ET and 12:00 PM ET | |
https://carta1.atlassian.net/browse/ISD-7964 | |
""" | |
from datetime import datetime | |
from eshares.investor_services.models import FundLimitedPartnerDocument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import csv | |
import time | |
from dataclasses import dataclass | |
from fund_admin.identity.cache import get_user | |
from fund_admin.reporting.models.templates import FinancialPackageTemplateSettings | |
from fund_admin.reporting.models.package import FinancialPackageReport | |
from fund_admin.documents.services import DocumentService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from more_itertools import more | |
from fund_admin.express.overview.services import ExpressDashboardService | |
from fund_admin.express.overview.queries import firms_for_dashboard, funds_for_dashboard | |
from fund_admin.express.periodic_reporting.models import ReportingPeriod | |
from fund_admin.express.periodic_reporting.services import ExpressPeriodicReportService | |
BATCH_SIZE = 15 | |
# Add the missing Express Entity rows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.audited_celery.models import CeleryTask | |
tasks = CeleryTask.objects.filter(name__contains='create_schedule_k1s_for_fund_partners').order_by('-created_at')[:10] | |
for task in tasks: | |
created_at_str = task.created_at.strftime('%m/%d at %H:%M') | |
job_status = task.state | |
print(f'Started: {created_at_str}') | |
print(f'Status: {job_status}') | |
if job_status == 'SUCCESS': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from fund_admin.tax.schedule_k1.scheduled_tasks import create_schedule_k1s_for_fund_partners | |
tic = time.perf_counter() | |
print('----------Starting K-1 Job----------') | |
create_schedule_k1s_for_fund_partners() | |
toc = time.perf_counter() | |
print(f'Job completed in {toc - tic:0.4f} second') | |
print('----------Completed K-1 Job----------') |
NewerOlder