Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Jellyfish (UPLOAD-1, UPLOAD-1399) #1599

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open

Conversation

gniezen
Copy link
Member

@gniezen gniezen commented Nov 27, 2023

Addresses UPLOAD-1. Supersedes #719 .

…w only upload through platform"

This reverts commit 39085e0.
@gniezen gniezen marked this pull request as ready for review October 21, 2024 14:00
@gniezen gniezen changed the title Remove Jellyfish (UPLOAD-1) Remove Jellyfish (UPLOAD-1, UPLOAD-1399) Oct 21, 2024
@gniezen gniezen requested a review from jh-bate October 22, 2024 09:12
Copy link
Contributor

@jh-bate jh-bate left a comment

Choose a reason for hiding this comment

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

@gniezen see initial feedback / questions

@@ -130,9 +130,12 @@ export class App extends Component {
? JSON.parse(localStore.getItem('selectedEnv'))
: null;

this.props.async.fetchInfo(() => {
this.props.async.fetchInfo((err, info) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

it appears we aren't doing anything with the err?

Copy link
Member Author

Choose a reason for hiding this comment

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

If there is an error we already dispatch an error message in fetchInfo itself, so I'll just log it to the console.

}
};

exports.strip = function(record) {
Copy link
Contributor

Choose a reason for hiding this comment

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

stripUnwantedFields or deleteUnwantedFields ... or just something a bit more descriptive?

Copy link
Contributor

Choose a reason for hiding this comment

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

test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a test.

/* eslint-disable global-require, import/no-unresolved, import/extensions */
device.deviceDrivers.Tandem = require('../drivers/tandem/tandemDriver');
device.deviceDrivers.TandemJellyfish = require('../drivers/tandem/jellyfish/tandemDriver');
} catch (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

error detail is of no use? also should it be err for the sake of consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, not really of any use, as it will just say the file can't be found if you don't have access to the private submodule. I'll rename it to err for consistency.


const dm = device.createDriverManager(driverId, options);
if (dm == null) {
cb(new Error('Driver not available.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

would the context of the driverId we are trying to create help here in the error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I can add it to the error message.

@@ -177,3 +177,128 @@ exports.addDurationToDeviceTime = function (event, duration) {
};

exports.fixFloatingPoint = (n) => Math.floor(n * 100 + 0.5) / 100;

Number.prototype.toFixedNumber = function(significant){
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's not exported but is there a test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a test.

return +( Math.round(this*pow) / pow );
};

exports.updateDuration = function(event, lastEvent) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a corresponding test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a test.

@gniezen gniezen requested a review from jh-bate October 29, 2024 15:06
jh-bate
jh-bate previously approved these changes Oct 30, 2024
Copy link
Contributor

@jh-bate jh-bate left a comment

Choose a reason for hiding this comment

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

I think just one minor typo but LGTM

test/lib/testCommonFunctions.js Outdated Show resolved Hide resolved
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