Skip to content

#312 Change subjectType from airQualityControl to airQualitySensor #487

Open
ShreejeetaMandal wants to merge 1 commit intoConnectedPlacesCatapult:masterfrom
ShreejeetaMandal:master
Open

#312 Change subjectType from airQualityControl to airQualitySensor #487
ShreejeetaMandal wants to merge 1 commit intoConnectedPlacesCatapult:masterfrom
ShreejeetaMandal:master

Conversation

@ShreejeetaMandal
Copy link

Description

  • Change subjectType from airQualityControl to airQualitySensor
  • Change datasourceId form airQualityControl to airQuality

Checklist

  • Ran all test(s)

… to airQualitySensor and change datasourceId form airQualityControl to airQuality
Copy link
Contributor

@lorenaqendro lorenaqendro left a comment

Choose a reason for hiding this comment

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

Hi @ShreejeetaMandal, thank you for taking care of this issue. I have left you two comments you can have a look at and make the changes needed.
Also, the issue mentioned a couple of other points:

  • Change package name from lac to laqn
  • Change provider from erg.kcl.ac.uk to uk.ac.kcl.erg
    Do you wish to add them here or on another PR? I cannot close the issue until they're done ;)

Please, tag me when you address the comments so I can approve the changes.

private static final String LAQN_PROVIDER_LABEL = "erg.kcl.ac.uk";
private static final String LAQN_PROVIDER_NAME = "Environmental Research Group Kings College London";
private static final String LAQN_SUBJECT_TYPE_LABEL = "airQualityControl";
private static final String LAQN_SUBJECT_TYPE_LABEL = "airQualitySensor";
Copy link
Contributor

Choose a reason for hiding this comment

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

This importer is missing a proper datasourceId and is using the subject type label for it, this is why in the tests you had to insert the subject type instead. My suggestion is to add another static variable here and use it in line 45.
private static final String DATASOURCE_ID = "airQuality"; and in line 45

datasourceSpec = new DatasourceSpec(getClass(), DATASOURCE_ID, "Air Quality London",
                 "Data captured by sensors operated by London Air", dataSourceURL);

Now you can use the datasourceId airQuality in the tests and the recipes will run.

@Test
public void testGetProvider() throws Exception {
laqnImporter.importDatasource("airQualityControl",
laqnImporter.importDatasource("airQualitySensor",
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in the first the comment on the top, now you can have "airQuality" here and in the other importDatascource() methods in the test.

Copy link
Contributor

@lorenaqendro lorenaqendro left a comment

Choose a reason for hiding this comment

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

Please, have a look at the comments and address them.

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.

2 participants