Skip to content

Commit

Permalink
Remove comments from import blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Oct 21, 2024
1 parent 90a885a commit e11581b
Show file tree
Hide file tree
Showing 68 changed files with 36 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
#
# You should have received a copy of the GNU General Public License
# along with Archivematica. If not, see <http://www.gnu.org/licenses/>.
# /src/dashboard/src/main/models.py
import collections
import csv
import sys
import traceback

import archivematicaFunctions

# archivematicaCommon


def parseMetadata(job, SIPPath, state):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from lxml import etree
from main import models

# dashboard


def _create_premis_object(premis_object_type):
"""Return new PREMIS element container (``lxml._Element`` instance).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#
# You should have received a copy of the GNU General Public License
# along with Archivematica. If not, see <http://www.gnu.org/licenses/>.
# /src/dashboard/src/main/models.py
import sys
import uuid

Expand All @@ -25,9 +24,6 @@
from countryCodes import getCodeForCountry
from main.models import RightsStatement

# dashboard
# archivematicaCommon

RIGHTS_BASIS_OTHER = ["Policy", "Donor"]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from django.core.exceptions import ValidationError
from main.models import File

# dashboard


def getTrimDmdSec(job, baseDirectoryPath, sipUUID):
# containerMetadata
Expand Down
4 changes: 1 addition & 3 deletions src/MCPClient/lib/clientScripts/assign_file_uuids.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
from django.db import transaction

django.setup()
# dashboard

import metsrw
import namespaces as ns

# archivematicaCommon
from archivematicaFunctions import chunk_iterable
from archivematicaFunctions import find_mets_file
from custom_handlers import get_script_logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@
import django

django.setup()
# dashboard

from archivematicaFunctions import format_subdir_path
from archivematicaFunctions import get_dir_uuids
from archivematicaFunctions import str2bool

# archivematicaCommon
from custom_handlers import get_script_logger
from django.core.exceptions import ValidationError
from django.db import transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import django

django.setup()
# archivematicaCommon

from archivematicaFunctions import get_setting
from bagit import make_bag
from django.conf import settings as mcpclient_settings
Expand Down
4 changes: 2 additions & 2 deletions src/MCPClient/lib/clientScripts/bind_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
from django.db import transaction

django.setup()
# dashboard
# archivematicaCommon


import bindpid
from archivematicaFunctions import str2bool
from custom_handlers import get_script_logger
Expand Down
4 changes: 0 additions & 4 deletions src/MCPClient/lib/clientScripts/bind_pids.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@

django.setup()
import namespaces as ns

# archivematicaCommon
from archivematicaFunctions import str2bool
from bindpid import BindPIDException
from bindpid import _validate_entity_type_required_params
Expand All @@ -60,8 +58,6 @@
from django.db import transaction
from lxml import etree
from main.models import SIP

# dashboard
from main.models import DashboardSetting
from main.models import Directory

Expand Down
4 changes: 0 additions & 4 deletions src/MCPClient/lib/clientScripts/change_object_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@

django.setup()
import change_names

# archivematicaCommon
from custom_handlers import get_script_logger
from django.db import transaction
from main.models import SIP
from main.models import Directory

# dashboard
from main.models import Event
from main.models import File
from main.models import Transfer
Expand Down
2 changes: 0 additions & 2 deletions src/MCPClient/lib/clientScripts/change_sip_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
django.setup()
from change_names import change_path
from django.db import transaction

# dashboard
from main.models import SIP
from main.models import Transfer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
from django.db import transaction

django.setup()
# dashboard
from fileOperations import rename

# archivematicaCommon
from fileOperations import rename
from fileOperations import updateFileLocation
from main.models import File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from django.db import transaction

django.setup()
# dashboard

from main.models import File


Expand Down
4 changes: 2 additions & 2 deletions src/MCPClient/lib/clientScripts/compress_aip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from django.db import transaction

django.setup()
# dashboard
# archivematicaCommon


import databaseFunctions
from executeOrRunSubProcess import executeOrRun
from main.models import SIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import django
from lxml import etree

# Database functions requires Django to be set up.

django.setup()

import metsrw
Expand Down
4 changes: 1 addition & 3 deletions src/MCPClient/lib/clientScripts/create_aic_mets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
from lxml.builder import ElementMaker

django.setup()
# dashboard
import create_mets_v2

# archivematicaCommon
import create_mets_v2
import databaseFunctions
import fileOperations
import namespaces as ns
Expand Down
4 changes: 1 addition & 3 deletions src/MCPClient/lib/clientScripts/create_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@

import django

# databaseFunctions requires Django to be set up

django.setup()
# archivematicaCommon

from databaseFunctions import insertIntoEvents
from django.db import transaction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import metsrw
from custom_handlers import get_script_logger

# Create a module level logger.
logger = get_script_logger("archivematica.mcp.client.createMETSDataverse")


Expand Down
4 changes: 1 addition & 3 deletions src/MCPClient/lib/clientScripts/create_mets_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import metsrw

django.setup()
# dashboard

import archivematicaCreateMETSMetadataXML
import archivematicaCreateMETSReingest
import namespaces as ns
Expand All @@ -47,8 +47,6 @@
from archivematicaCreateMETSTrim import getTrimDmdSec
from archivematicaCreateMETSTrim import getTrimFileAmdSec
from archivematicaCreateMETSTrim import getTrimFileDmdSec

# archivematicaCommon
from archivematicaFunctions import normalizeNonDcElementName
from bagit import Bag
from bagit import BagError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@
import django

django.setup()
# archivematicaCommon

import archivematicaFunctions
from django.core.exceptions import ValidationError
from django.db import transaction
from main.models import SIP
from main.models import Agent
from main.models import Directory

# dashboard
from main.models import File
from main.models import Transfer
from main.models import UnitVariable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from django.db import transaction

django.setup()
# dashboard
# archivematicaCommon


import archivematicaFunctions
import databaseFunctions
from main.models import File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from lxml import etree

django.setup()
# dashboard

from client import metrics
from main.models import Transfer

Expand Down
4 changes: 0 additions & 4 deletions src/MCPClient/lib/clientScripts/create_transfer_mets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@

django.setup()
import metsrw

# archivematicaCommon
from archivematicaFunctions import get_dashboard_uuid
from countryCodes import getCodeForCountry

# dashboard
from main.models import Agent
from main.models import Derivation
from main.models import Directory
Expand Down
6 changes: 1 addition & 5 deletions src/MCPClient/lib/clientScripts/extract_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@
from django.db import transaction

django.setup()
# dashboard

from archivematicaFunctions import format_subdir_path
from archivematicaFunctions import get_dir_uuids

# archivematicaCommon
from custom_handlers import get_script_logger
from databaseFunctions import fileWasRemoved
from executeOrRunSubProcess import executeOrRun
from fileOperations import addFileToTransfer
from fileOperations import updateSizeAndChecksum
from fpr.models import FPCommand

# clientScripts
from has_packages import already_extracted
from main.models import Directory
from main.models import File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@
django.setup()
from django.core.exceptions import ValidationError
from django.db import transaction

# archivematicaCommon
from externals.extractMaildirAttachments import parse
from fileOperations import addFileToTransfer
from fileOperations import updateSizeAndChecksum

# dashboard
from main.models import File


Expand Down
4 changes: 0 additions & 4 deletions src/MCPClient/lib/clientScripts/extract_zipped_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@

django.setup()
from django.db import transaction

# archivematicaCommon
from executeOrRunSubProcess import executeOrRun
from fileOperations import get_extract_dir_name

# dashboard
from main.models import Transfer


Expand Down
4 changes: 2 additions & 2 deletions src/MCPClient/lib/clientScripts/failed_sip_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from django.db import transaction

django.setup()
# dashboard
# archivematicaCommon


import storageService as storage_service
from client import metrics
from main import models
Expand Down
2 changes: 1 addition & 1 deletion src/MCPClient/lib/clientScripts/failed_transfer_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import django

django.setup()
# archivematicaCommon

import storageService as storage_service
from client import metrics
from django.db import transaction
Expand Down
2 changes: 0 additions & 2 deletions src/MCPClient/lib/clientScripts/file_to_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

django.setup()
from django.db import transaction

# dashboard
from main.models import Transfer


Expand Down
4 changes: 1 addition & 3 deletions src/MCPClient/lib/clientScripts/get_aip_storage_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

import django

# storageService requires Django to be set up

django.setup()

# archivematicaCommon

import storageService as storage_service
from custom_handlers import get_script_logger

Expand Down
2 changes: 1 addition & 1 deletion src/MCPClient/lib/clientScripts/identify_dspace_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from lxml import etree

django.setup()
# dashboard

from main.models import File


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import django

django.setup()
# dashboard

from django.db import transaction
from main.models import File

Expand Down
Loading

0 comments on commit e11581b

Please sign in to comment.