Skip to content

Commit

Permalink
Fixed typos (#4564)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelstudios authored Mar 12, 2024
1 parent 6867836 commit 34a9494
Show file tree
Hide file tree
Showing 40 changed files with 57 additions and 55 deletions.
Binary file modified locale/en_US/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions locale/en_US/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3401,8 +3401,8 @@ msgstr "There is also a link to the SEED-Platform Users forum, where you can con
msgid "There was an error loading the page"
msgstr "There was an error loading the page"

msgid "This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?"
msgstr "This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?"
msgid "This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?"
msgstr "This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?"

msgid "This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated."
msgstr "This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated."
Expand Down
Binary file modified locale/fr_CA/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion locale/fr_CA/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3427,7 +3427,7 @@ msgstr "Il y a aussi un lien vers le forum SEED-Platform Users, où vous pouvez
msgid "There was an error loading the page"
msgstr "Une erreur s'est produite lors du chargement de la page"

msgid "This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?"
msgid "This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?"
msgstr "Cette action remplace n'importe laquelle de vos colonnes actuelles par les colonnes délimitées par des virgules que vous avez fournies. Voulez-vous continuer?"

msgid "This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated."
Expand Down
2 changes: 1 addition & 1 deletion seed/analysis_pipelines/better/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def _process_results(self, analysis_id):
for data_path in column_data_paths:
value = get_json_path(data_path.json_path, raw_better_results)
if value is not None:
# some of the ee_measures return an empty string, which should be falsey
# some of the ee_measures return an empty string, which should be falsy
if 'ee_measures' in data_path.json_path and value == '':
value = 0.0 * data_path.unit_multiplier # to be consistent
else:
Expand Down
2 changes: 1 addition & 1 deletion seed/analysis_pipelines/bsyncr.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _parse_analysis_property_view_id(filepath):
analysis_property_view_id_elem = input_file_tree.xpath(id_xpath, namespaces=NAMESPACES)

if len(analysis_property_view_id_elem) != 1:
raise AnalysisPipelineException(f'Expected BuildlingSync file to have exactly one "{PREMISES_ID_NAME}" PremisesIdentifier')
raise AnalysisPipelineException(f'Expected BuildingSync file to have exactly one "{PREMISES_ID_NAME}" PremisesIdentifier')
return int(analysis_property_view_id_elem[0].text)


Expand Down
2 changes: 1 addition & 1 deletion seed/building_sync/building_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def _parse_version(self):
if not bsync_element.tag.endswith('BuildingSync'):
raise ParsingError('Expected BuildingSync element as root element in xml')

# first check for a version attribute in the buldingsync tag
# first check for a version attribute in the buildingsync tag
if "version" in bsync_element.attrib:
return bsync_element.attrib["version"]

Expand Down
2 changes: 1 addition & 1 deletion seed/building_sync/tests/test_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def test_update_tree_changes_text_on_existing_element(self):
# tree should remain valid as well after inserting
self.xmlschema.validate(etree.tostring(self.tree).decode())

def test_update_tree_changes_text_on_nonexisting_element(self):
def test_update_tree_changes_text_on_nonexistent_element(self):
# -- Setup
# auc:PremisesName does not exist in the tree
xpath = '/'.join([
Expand Down
2 changes: 1 addition & 1 deletion seed/data_importer/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def filter_duplicate_states(unmatched_states, sub_progress_key):
elif len(present_ali_ids) == 1:
canonical_state = states_with_ali[0]

# More than one ali was speficied! all are of these duplicates are invalid
# More than one ali was specified! all are of these duplicates are invalid
else:
errors_state_ids += [s["id"] for s in states]
continue
Expand Down
2 changes: 1 addition & 1 deletion seed/data_importer/tests/integration/test_data_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def test_promote_properties(self):

# For some reason if you comment out the next two test cases (TestMappingPropertiesOnly and
# TestMappingTaxLotsOnly), the test_views_matching.py file will fail. I cannot figure out
# what is causing this and it is really annoying. Inherenting from DataMappingBaseTestCase
# what is causing this and it is really annoying. Inheriting from DataMappingBaseTestCase
# will delete all the model data upon completion, Maybe because FAKE_MAPPINGS
# is not a copy, rather a pointer?

Expand Down
2 changes: 1 addition & 1 deletion seed/data_importer/tests/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_mapping_takes_into_account_selected_units(self):
self.assertAlmostEqual(state.gross_floor_area, (100 * ureg('m**2')).to('ft**2'))


class TestMappingAcccessLevelInstance(DataMappingBaseTestCase):
class TestMappingAccessLevelInstance(DataMappingBaseTestCase):
def setUp(self):
selfvars = self.set_up(ASSESSED_RAW)
self.user, self.org, self.import_file, self.import_record, self.cycle = selfvars
Expand Down
2 changes: 1 addition & 1 deletion seed/lib/mcm/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def XLSDictReader(self, sheet, header_row=0):
:param sheet: xlrd Sheet
:param header_row: the row index to start with
:returns: Generator yeilding a row as Dict
:returns: Generator yielding a row as Dict
"""

# save off the headers into a member variable. Only do this once. If XLSDictReader is
Expand Down
4 changes: 2 additions & 2 deletions seed/lib/merging/merging.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def merge_state(merged_state, state1, state2, priorities, ignore_merge_protectio
state2_present_columns
)

deafult_ali = state1.raw_access_level_instance
merged_state.raw_access_level_instance = deafult_ali if deafult_ali is not None else state2.raw_access_level_instance
default_ali = state1.raw_access_level_instance
merged_state.raw_access_level_instance = default_ali if default_ali is not None else state2.raw_access_level_instance

# merge measures, scenarios, simulations
if isinstance(merged_state, PropertyState):
Expand Down
2 changes: 1 addition & 1 deletion seed/lib/superperms/orgs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def _assert_alns_are_valid(org):
alns = org.access_level_names

if len(set(alns)) != len(alns): # if not unique
raise ValueError("Organiation's access_level_names must be unique.")
raise ValueError("Organization's access_level_names must be unique.")

columns_with_same_names = Column.objects.filter(organization=org, display_name__in=alns)
if columns_with_same_names.count() > 0:
Expand Down
10 changes: 5 additions & 5 deletions seed/models/certification.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
)
from seed.utils.strings import titlecase

DEFAULT_GREEN_ASSESSEMENT_VALIDITY_DURATION = getattr(
DEFAULT_GREEN_ASSESSMENT_VALIDITY_DURATION = getattr(
settings, 'GREEN_ASSESSMENT_DEFAULT_VALIDITY_DURATION', None
)
if DEFAULT_GREEN_ASSESSEMENT_VALIDITY_DURATION:
DEFAULT_GREEN_ASSESSEMENT_VALIDITY_DURATION = datetime.timedelta(
DEFAULT_GREEN_ASSESSEMENT_VALIDITY_DURATION
if DEFAULT_GREEN_ASSESSMENT_VALIDITY_DURATION:
DEFAULT_GREEN_ASSESSMENT_VALIDITY_DURATION = datetime.timedelta(
DEFAULT_GREEN_ASSESSMENT_VALIDITY_DURATION
)

# logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -91,7 +91,7 @@ def __str__(self):
is_integer_score = models.BooleanField(default=True)
validity_duration = models.DurationField(
null=True, blank=True,
default=DEFAULT_GREEN_ASSESSEMENT_VALIDITY_DURATION
default=DEFAULT_GREEN_ASSESSMENT_VALIDITY_DURATION
)

class Meta:
Expand Down
4 changes: 2 additions & 2 deletions seed/models/data_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def evaluate(self, columns, user_ali):
# 'Average': 123,
# 'Count': 123,
# 'Maximum': 123,
# 'Minumum': 123,
# 'Minimum': 123,
# 'Sum': 123,
# 'views_by_default_field: {
# view.state.default_field || state.id: 123,
Expand Down Expand Up @@ -223,7 +223,7 @@ def _evaluate_extra_data(self, states, aggregation, column):
return round(type_to_aggregate[aggregation], 2)

def _evaluate_derived_column(self, states, aggregation, column):
# to evluate a derived_column: DerivedColumn.evaluate(propertyState)
# to evaluate a derived_column: DerivedColumn.evaluate(propertyState)
values = []

for state in states:
Expand Down
6 changes: 3 additions & 3 deletions seed/serializers/data_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def update(self, instance, validated_data):
instance.save()

# if new parameters are provided, delete previous ones so we can create the new params
paramters_data = validated_data.get('parameters')
if paramters_data:
parameters_data = validated_data.get('parameters')
if parameters_data:
DataViewParameter.objects.filter(data_view=instance).delete()

for parameter in paramters_data:
for parameter in parameters_data:
DataViewParameter.objects.create(data_view=instance, **parameter)

return instance
4 changes: 2 additions & 2 deletions seed/serializers/goals.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def validate(self, data):
raise ValidationError('Cycles must be unique.')

if baseline_cycle.end > current_cycle.end:
raise ValidationError('Baseline Cycle must preceed Current Cycle.')
raise ValidationError('Baseline Cycle must precede Current Cycle.')

if not all([
getattr(baseline_cycle, 'organization', None) == organization,
Expand All @@ -39,7 +39,7 @@ def validate(self, data):
]):
raise ValidationError('Organization mismatch.')

# non Null columns must be uniuqe
# non Null columns must be unique
eui_columns = [data.get('eui_column1'), data.get('eui_column2'), data.get('eui_column3')]
unique_columns = {column for column in eui_columns if column is not None}
if len(unique_columns) < len([column for column in eui_columns if column is not None]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ angular.module('BE.seed.controller.column_mappings', []).controller('column_mapp
'<div class="modal-header">' +
'<h3 class="modal-title" translate>Replacing Existing Columns</h3>' +
'</div>' +
'<div class="modal-body" translate>This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?</div>' +
'<div class="modal-body" translate>This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?</div>' +
'<div class="modal-footer">' +
'<button type="button" class="btn btn-warning" ng-click="$dismiss()" translate>Cancel</button>' +
'<button type="button" class="btn btn-primary" ng-click="$close()" autofocus translate>Yes</button>' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ angular.module('BE.seed.controller.program_setup', []).controller('program_setup
$scope.compliance_metrics_error.push(`${key}: ${error}`);
}
} else {
// success. the ID would already be saved so this block seems unnecesary
// success. the ID would already be saved so this block seems unnecessary
if (!$scope.selected_compliance_metric.id) {
$scope.selected_compliance_metric.id = data.id;
}
Expand Down
2 changes: 1 addition & 1 deletion seed/static/seed/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
"The password link was invalid, possibly because it has already been used. Please request a new password reset.": "The password link was invalid, possibly because it has already been used. Please request a new password reset.",
"There is also a link to the SEED-Platform Users forum, where you can connect with other users.": "There is also a link to the SEED-Platform Users forum, where you can connect with other users.",
"There was an error loading the page": "There was an error loading the page",
"This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?": "This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?",
"This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?": "This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?",
"This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated.": "This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated.",
"This cycle name is already taken.": "This cycle name is already taken.",
"This email link is invalid.": "This email link is invalid.",
Expand Down
2 changes: 1 addition & 1 deletion seed/static/seed/locales/fr_CA.json
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
"The password link was invalid, possibly because it has already been used. Please request a new password reset.": "Le lien de mot de passe était invalide, peut-être parce qu'il a déjà été utilisé. Veuillez demander une nouvelle réinitialisation du mot de passe.",
"There is also a link to the SEED-Platform Users forum, where you can connect with other users.": "Il y a aussi un lien vers le forum SEED-Platform Users, où vous pouvez vous connecter avec d'autres utilisateurs.",
"There was an error loading the page": "Une erreur s'est produite lors du chargement de la page",
"This action replaces any of your current columns with the comma-delmited columns you provided. Would you like to continue?": "Cette action remplace n'importe laquelle de vos colonnes actuelles par les colonnes délimitées par des virgules que vous avez fournies. Voulez-vous continuer?",
"This action replaces any of your current columns with the comma-delimited columns you provided. Would you like to continue?": "Cette action remplace n'importe laquelle de vos colonnes actuelles par les colonnes délimitées par des virgules que vous avez fournies. Voulez-vous continuer?",
"This action updates properties within the selected cycle with data from the Audit Template account associated with this organization. Only Properties with Audit Template Building IDs corresponding to those saved in Audit Template will be updated.": "Cette action met à jour les propriétés du cycle sélectionné avec les données du compte de modèle d'audit associé à cette organisation. Seules les propriétés avec des ID de bâtiment de modèle d'audit correspondant à ceux enregistrés dans le modèle d'audit seront mises à jour.",
"This cycle name is already taken.": "Ce nom de cycle est déjà pris.",
"This email link is invalid.": "Cette opération est irréversible.",
Expand Down
2 changes: 1 addition & 1 deletion seed/tests/test_audit_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_batch_get_building_xml_bad_data(self, mock_request):
self.assertEqual(response['success'], False)
self.assertEqual(response['message'], exp_message)

# missing audit tempalte building id
# missing audit template building id
url = reverse('api:v3:audit_template-batch-get-building-xml') + '?organization_id=' + str(self.org.id) + '&cycle_id=' + str(self.cycle.id)
content_type = 'application/json'
data = json.dumps([
Expand Down
2 changes: 1 addition & 1 deletion seed/tests/test_column_list_profiles_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_update_column_profile(self):
self.assertEqual(result['data']['columns'][0]['pinned'], True)


class ColumnsListProfileViewPermisionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
class ColumnsListProfileViewPermissionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
def setUp(self):
super().setUp()

Expand Down
2 changes: 1 addition & 1 deletion seed/tests/test_column_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def test_rename_column_dne(self):
self.assertEqual(result['message'], 'Cannot find column in org=%s with pk=-999' % self.org.id)


class ColumnsViewPermisionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
class ColumnsViewPermissionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
def setUp(self):
super().setUp()
self.column = Column.objects.create(column_name='test', organization=self.org, table_name='PropertyState', is_extra_data=True)
Expand Down
8 changes: 4 additions & 4 deletions seed/tests/test_data_view_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def test_data_view_create_bad_data(self):
expected = 'Data Validation Error'
self.assertEqual(expected, data['message'])

def test_data_view_retreive_endpoint(self):
def test_data_view_retrieve_endpoint(self):
response = self.client.get(
reverse('api:v3:data_views-detail', args=[self.data_view1.id]) + '?organization_id=' + str(self.org.id)
)
Expand Down Expand Up @@ -326,7 +326,7 @@ def setUp(self):
ureg.eui = ureg.eui = ureg.kilobritish_thermal_unit / ureg.ft**2 / ureg.year

# generate property states that are either 'Office' or 'Retail' for filter groups
# generate property views that are attatched to a property and a property-state
# generate property views that are attached to a property and a property-state
self.state10 = self.property_state_factory.get_property_state(property_name='state10', property_type='office', site_eui=10 * ureg.eui, total_ghg_emissions=100, extra_data={'extra_col': 1000})
self.state11 = self.property_state_factory.get_property_state(property_name='state11', property_type='office', site_eui=11 * ureg.eui, total_ghg_emissions=110, extra_data={'extra_col': 1100})
self.state12 = self.property_state_factory.get_property_state(property_name='state12', property_type='retail', site_eui=12 * ureg.eui, total_ghg_emissions=120, extra_data={'extra_col': 1200})
Expand Down Expand Up @@ -851,7 +851,7 @@ def setUp(self):
ureg.eui = ureg.eui = ureg.kilobritish_thermal_unit / ureg.ft**2 / ureg.year

# generate property states that are either 'Office' or 'Retail' for filter groups
# generate property views that are attatched to a property and a property-state
# generate property views that are attached to a property and a property-state
self.state10 = self.property_state_factory.get_property_state(property_name='state10', property_type='office', site_eui=10 * ureg.eui, total_ghg_emissions=100, extra_data={'extra_col': 1000})
self.state11 = self.property_state_factory.get_property_state(property_name='state11', property_type='office', site_eui=11 * ureg.eui, total_ghg_emissions=110, extra_data={'extra_col': 1100})
self.state12 = self.property_state_factory.get_property_state(property_name='state12', property_type='retail', site_eui=12 * ureg.eui, total_ghg_emissions=120, extra_data={'extra_col': 1200})
Expand Down Expand Up @@ -1008,7 +1008,7 @@ def test_inventory_endpoint(self):
self.assertEqual(sorted(exp), sorted(list(data[str(self.fg_exc.id)].values())))


class DataViewViewSetPermisionsTests(AccessLevelBaseTestCase):
class DataViewViewSetPermissionsTests(AccessLevelBaseTestCase):
def setUp(self):
super().setUp()
self.cycle = FakeCycleFactory(organization=self.org, user=self.root_owner_user).get_cycle(name="Cycle A", end=datetime(2022, 1, 1, tzinfo=pytz.UTC))
Expand Down
2 changes: 1 addition & 1 deletion seed/tests/test_gbr_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from seed.tests.util import AccessLevelBaseTestCase, DeleteModelsTestCase


class GBRPropertiesViewPermisionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
class GBRPropertiesViewPermissionsTests(AccessLevelBaseTestCase, DeleteModelsTestCase):
def setUp(self):
super().setUp()
self.root_property = self.property_factory.get_property(access_level_instance=self.root_level_instance)
Expand Down
Loading

0 comments on commit 34a9494

Please sign in to comment.