Skip to content

Commit

Permalink
rebase on edge for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLondon committed Sep 17, 2019
1 parent 92de0fa commit 57a97a2
Show file tree
Hide file tree
Showing 24 changed files with 138 additions and 80 deletions.
27 changes: 14 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,9 @@ If you create the key as `~/.ssh/robot_key` and `~/.ssh/robot_key.pub` then `mak

Our release process is still a work-in-progress. The app and API projects are currently versioned together to ensure interoperability.


1. Ensure you have a buildroot release created in GitHub with all the changes you want in this release, if any. If there are no buildroot changes, you don't have to create a new release; the last tag in buildroot is used for release builds.
2. Checkout `edge` and make a release branch, without any new changes. The branch name should match `release_*` to make `make bump` usage easier and make it clear this is a release.


```shell
git checkout edge
git pull
Expand Down Expand Up @@ -432,26 +430,28 @@ git push origin v${version}
12. Run QA on this release. If issues are found, create PRs targeted on the release branch. To create new alpha releases, repeat steps 4-11.
13. Once QA is a pass, bump to the target release version (review [the section below](#make-bump-usage) again)
14. Fix up the autogenerated changelogs to remove the references to alpha versions and make sure the release version has all changes since the latest release
- Make sure the comparison link is to the latest release verison (e.g.: `compare/v3.11.4...v3.12.0)` instead of `compare/v3.12.0-alpha.1...v3.12.0)`)
- Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
- Make sure the comparison link is to the latest release verison (e.g.: `compare/v3.11.4...v3.12.0)` instead of `compare/v3.12.0-alpha.1...v3.12.0)`)
- Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
15. Do a NORMAL MERGE into `master`. Do NOT squash or rebase. This should be done from your local command line (and will succeed as long as the release PR is reviewed and status checks have passed):
```shell
# note: make sure you have pulled the latest changes for branch
# note: make sure you have pulled the latest changes for branch
# release_${version} locally before merging into master
git checkout master
git merge --ff-only release_${version}
git push origin master
```
15. Tag the release:
15. Tag the release:
```shell
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
```
16. Open a PR of `master` into `edge`. Give the PR a name like `chore(release): Merge changes from ${version} into edge`. Once it passes, on the command line merge it into `edge`:
16. Open a PR of `master` into `edge`. Give the PR a name like `chore(release): Merge changes from ${version} into edge`. Once it passes, on the command line merge it into `edge`:
```shell
git checkout edge
Expand All @@ -466,7 +466,6 @@ git merge --no-ff master
1. Ensure you have a buildroot release created in GitHub with all the changes you want to see, if any. If there aren't any, you don't have to create a new buildroot release; by default, the last tag is used for release builds.
2. Checkout `master` and make a release branch, without any new changes. The branch name should match `hotfix_*` to make it clear this is a hotfix, and make `make bump` usage simpler.
```shell
git checkout master
git pull
Expand Down Expand Up @@ -495,26 +494,28 @@ git push origin v${version}
12. Run QA on this release. If issues are found, create PRs targeted on the release branch. To create new alpha releases, repeat steps 4-11.
13. Once QA is a pass, bump to your target version (review [the section below](#make-bump-usage) again)
14. Fix up the autogenerated changelogs to remove the references to alpha versions and make sure the release version has all changes since the last release
- Make sure the comparison link is to the latest release verison (e.g.: `compare/v3.11.4...v3.12.0)` instead of `compare/v3.12.0-alpha.1...v3.12.0)`)
- Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
- Make sure the comparison link is to the latest release verison (e.g.: `compare/v3.11.4...v3.12.0)` instead of `compare/v3.12.0-alpha.1...v3.12.0)`)
- Delete the sub-sections that relate only to alpha releases, so that the changelog is against the latest actual release
15. Do a NORMAL MERGE into `master`. Do NOT squash or rebase. This should be done from your local command line (and will succeed as long as the release PR is reviewed and status checks have passed):
```shell
# note: make sure you have pulled the latest changes for branch
# note: make sure you have pulled the latest changes for branch
# release_${version} locally before merging into master
git checkout master
git merge --ff-only release_${version}
git push origin master
```
15. Tag the release:
15. Tag the release:
```shell
git tag -a v${version} -m 'chore(release): ${version}'
git push origin v${version}
```
16. Open a PR of `master` into `edge`. Give the PR a name like `chore(release): Merge changes from ${version} into edge`. Once it passes, on the command line merge it into `edge`:
16. Open a PR of `master` into `edge`. Give the PR a name like `chore(release): Merge changes from ${version} into edge`. Once it passes, on the command line merge it into `edge`:
```shell
git checkout edge
Expand Down
20 changes: 12 additions & 8 deletions app-shell/src/buildroot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ export function registerBuildrootUpdate(dispatch: Dispatch) {
log.info('Starting robot premigration', { robot })

startPremigration(robot)
.then((): BuildrootAction => ({
type: 'buildroot:PREMIGRATION_DONE',
payload: robot.name,
}))
.catch((error: Error): BuildrootAction => ({
type: 'buildroot:PREMIGRATION_ERROR',
payload: { message: error.message },
}))
.then(
(): BuildrootAction => ({
type: 'buildroot:PREMIGRATION_DONE',
payload: robot.name,
})
)
.catch(
(error: Error): BuildrootAction => ({
type: 'buildroot:PREMIGRATION_ERROR',
payload: { message: error.message },
})
)
.then(dispatch)

break
Expand Down
8 changes: 6 additions & 2 deletions app/src/components/ModuleLiveStatusCards/ThermocyclerCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@ const ThermocyclerCard = ({
<LabeledValue
label="Cycle #"
className={styles.compact_labeled_value}
value={`${module.data.currentCycleIndex} / ${module.data.totalCycleCount}`}
value={`${module.data.currentCycleIndex} / ${
module.data.totalCycleCount
}`}
/>
<LabeledValue
label="Step #"
className={styles.compact_labeled_value}
value={`${module.data.currentStepIndex} / ${module.data.totalStepCount}`}
value={`${module.data.currentStepIndex} / ${
module.data.totalStepCount
}`}
/>
<span
className={cx(
Expand Down
40 changes: 21 additions & 19 deletions components/src/deck/Deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,29 @@ function renderLabware(
return flatMap(
SLOTNAME_MATRIX,
(columns: Array<DeckSlotId>, row: number): Array<React.Node> => {
return columns.map((slot: DeckSlotId, col: number): React.Node => {
if (slot === TRASH_SLOTNAME) return null
return columns.map(
(slot: DeckSlotId, col: number): React.Node => {
if (slot === TRASH_SLOTNAME) return null

const props = {
slot,
width: SLOT_RENDER_WIDTH,
height: SLOT_RENDER_HEIGHT,
}
const transform = `translate(${[
SLOT_RENDER_WIDTH * col + SLOT_SPACING_MM * (col + 1),
SLOT_RENDER_HEIGHT * row + SLOT_SPACING_MM * (row + 1),
].join(',')})`
const props = {
slot,
width: SLOT_RENDER_WIDTH,
height: SLOT_RENDER_HEIGHT,
}
const transform = `translate(${[
SLOT_RENDER_WIDTH * col + SLOT_SPACING_MM * (col + 1),
SLOT_RENDER_HEIGHT * row + SLOT_SPACING_MM * (row + 1),
].join(',')})`

return (
// $FlowFixMe: (mc, 2019-04-18) don't know why flow doesn't like this, don't care because this is going away
<g key={slot} transform={transform}>
<EmptyDeckSlot {...props} />
{LabwareComponent && <LabwareComponent {...props} />}
</g>
)
})
return (
// $FlowFixMe: (mc, 2019-04-18) don't know why flow doesn't like this, don't care because this is going away
<g key={slot} transform={transform}>
<EmptyDeckSlot {...props} />
{LabwareComponent && <LabwareComponent {...props} />}
</g>
)
}
)
}
)
}
Expand Down
4 changes: 3 additions & 1 deletion components/src/deck/LabwareRender.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default function LabwareRender(props: LabwareRenderProps) {
const cornerOffsetFromSlot = props.definition.cornerOffsetFromSlot
return (
<g
transform={`translate(${cornerOffsetFromSlot.x}, ${cornerOffsetFromSlot.y})`}
transform={`translate(${cornerOffsetFromSlot.x}, ${
cornerOffsetFromSlot.y
})`}
>
<StaticLabware
definition={props.definition}
Expand Down
8 changes: 6 additions & 2 deletions components/src/deck/LabwareRender.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const fixture_tiprack_300_ul = require('@opentrons/shared-data/labware/fixtures/
let definition = fixture_96_plate

;<RobotWorkSpace
viewBox={`0 0 ${definition.dimensions.xDimension} ${definition.dimensions.yDimension}`}
viewBox={`0 0 ${definition.dimensions.xDimension} ${
definition.dimensions.yDimension
}`}
>
{() => (
<LabwareRender
Expand All @@ -33,7 +35,9 @@ const fixture_tiprack_300_ul = require('@opentrons/shared-data/labware/fixtures/
let definition = fixture_tiprack_300_ul

;<RobotWorkSpace
viewBox={`0 0 ${definition.dimensions.xDimension} ${definition.dimensions.yDimension}`}
viewBox={`0 0 ${definition.dimensions.xDimension} ${
definition.dimensions.yDimension
}`}
>
{() => (
<LabwareRender
Expand Down
19 changes: 10 additions & 9 deletions labware-library/src/labware-creator/labwareFormSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,16 @@ const labwareFormSchema = Yup.object()
brand: requiredString(LABELS.brand),
brandId: Yup.mixed()
.nullable()
.transform((currentValue: ?string, originalValue: ?string): $PropertyType<
ProcessedLabwareFields,
'brandId'
> =>
(currentValue || '')
.trim()
.split(',')
.map(s => s.trim())
.filter(Boolean)
.transform(
(
currentValue: ?string,
originalValue: ?string
): $PropertyType<ProcessedLabwareFields, 'brandId'> =>
(currentValue || '')
.trim()
.split(',')
.map(s => s.trim())
.filter(Boolean)
),

loadName: Yup.string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const LabwarePreview = (props: Props) => {
<div className={styles.labware_detail_row}>
<div className={styles.labware_render_wrapper}>
<RobotWorkSpace
viewBox={`0 0 ${labwareDef.dimensions.xDimension} ${labwareDef.dimensions.yDimension}`}
viewBox={`0 0 ${labwareDef.dimensions.xDimension} ${
labwareDef.dimensions.yDimension
}`}
>
{() => <LabwareRender definition={labwareDef} />}
</RobotWorkSpace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function getDisabledChangeTipOptions(
}
default: {
console.warn(
`getChangeTipOptions for stepType ${rawForm.stepType} not yet implemented!`
`getChangeTipOptions for stepType ${
rawForm.stepType
} not yet implemented!`
)
return null
}
Expand Down
4 changes: 3 additions & 1 deletion protocol-designer/src/components/labware/SingleLabware.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ type Props = React.ElementProps<typeof LabwareRender>
export default function SingleLabware(props: Props) {
return (
<RobotWorkSpace
viewBox={`0 0 ${props.definition.dimensions.xDimension} ${props.definition.dimensions.yDimension}`}
viewBox={`0 0 ${props.definition.dimensions.xDimension} ${
props.definition.dimensions.yDimension
}`}
>
{() => <LabwareRender {...props} />}
</RobotWorkSpace>
Expand Down
4 changes: 3 additions & 1 deletion protocol-designer/src/file-data/selectors/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ export const getRobotStateTimeline: Selector<StepGeneration.Timeline> = createSe

if (!reducedCommandCreator) {
console.warn(
`commandCreatorFnName "${stepArgs.commandCreatorFnName}" not yet implemented for robotStateTimeline`
`commandCreatorFnName "${
stepArgs.commandCreatorFnName
}" not yet implemented for robotStateTimeline`
)
return acc
}
Expand Down
16 changes: 9 additions & 7 deletions protocol-designer/src/step-forms/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,15 @@ export const labwareInvariantProperties = handleActions<
state: NormalizedLabwareById,
action: ReplaceCustomLabwareDef
): NormalizedLabwareById =>
mapValues(state, (prev: NormalizedLabware): NormalizedLabware =>
action.payload.defURIToOverwrite === prev.labwareDefURI
? {
...prev,
labwareDefURI: getLabwareDefURI(action.payload.newDef),
}
: prev
mapValues(
state,
(prev: NormalizedLabware): NormalizedLabware =>
action.payload.defURIToOverwrite === prev.labwareDefURI
? {
...prev,
labwareDefURI: getLabwareDefURI(action.payload.newDef),
}
: prev
),
},
initialLabwareState
Expand Down
4 changes: 3 additions & 1 deletion protocol-designer/src/step-forms/selectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ function _hydrateLabwareEntity(
const def = defsByURI[l.labwareDefURI]
assert(
def,
`could not hydrate labware ${labwareId}, missing def for URI ${l.labwareDefURI}`
`could not hydrate labware ${labwareId}, missing def for URI ${
l.labwareDefURI
}`
)
return {
...l,
Expand Down
4 changes: 3 additions & 1 deletion protocol-designer/src/step-forms/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export function denormalizePipetteEntities(
const spec = getPipetteNameSpecs(pipette.name)
if (!spec) {
throw new Error(
`no pipette spec for pipette id "${pipetteId}", name "${pipette.name}"`
`no pipette spec for pipette id "${pipetteId}", name "${
pipette.name
}"`
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const transfer = (args: TransferArgs): CompoundCommandCreator => (
*/
assert(
args.sourceWells.length === args.destWells.length,
`Transfer command creator expected N:N source-to-dest wells ratio. Got ${args.sourceWells.length}:${args.destWells.length}`
`Transfer command creator expected N:N source-to-dest wells ratio. Got ${
args.sourceWells.length
}:${args.destWells.length}`
)
// TODO Ian 2018-04-02 following ~10 lines are identical to first lines of consolidate.js...
const actionName = 'transfer'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export default function getNextRobotStateAndWarnings(
default:
assert(
false,
`unknown command: ${command.command} passed to getNextRobotStateAndWarning`
`unknown command: ${
command.command
} passed to getNextRobotStateAndWarning`
)
return { robotState: prevRobotState, warnings: [] }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export function getMaxDisposalVolumeForMultidispense(
if (!rawForm) return null
assert(
rawForm.path === 'multiDispense',
`getMaxDisposalVolumeForMultidispense expected multiDispense, got path ${rawForm.path}`
`getMaxDisposalVolumeForMultidispense expected multiDispense, got path ${
rawForm.path
}`
)
const volume = Number(rawForm.volume)
const pipetteEntity = pipetteEntities[rawForm.pipette]
Expand All @@ -82,7 +84,9 @@ export function volumeInCapacityForMulti(
const volume = Number(rawForm.volume)
assert(
rawForm.pipette in pipetteEntities,
`volumeInCapacityForMulti expected pipette ${rawForm.pipette} to be in pipetteEntities`
`volumeInCapacityForMulti expected pipette ${
rawForm.pipette
} to be in pipetteEntities`
)
const pipetteEntity = pipetteEntities[rawForm.pipette]
const pipetteCapacity = pipetteEntity && getPipetteCapacity(pipetteEntity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ const moveLiquidFormToArgs = (
): MoveLiquidStepArgs => {
assert(
hydratedFormData.stepType === 'moveLiquid',
`moveLiquidFormToArgs called with stepType ${hydratedFormData.stepType}, expected "moveLiquid"`
`moveLiquidFormToArgs called with stepType ${
hydratedFormData.stepType
}, expected "moveLiquid"`
)

const fields = hydratedFormData.fields
Expand Down Expand Up @@ -185,7 +187,9 @@ const moveLiquidFormToArgs = (
sourceWellsUnordered.length === 1 ||
destWellsUnordered.length === 1 ||
sourceWellsUnordered.length === destWellsUnordered.length,
`cannot do moveLiquidFormToArgs. Mismatched wells (not 1:N, N:1, or N:N!) for path="single". Neither source (${sourceWellsUnordered.length}) nor dest (${destWellsUnordered.length}) equal 1`
`cannot do moveLiquidFormToArgs. Mismatched wells (not 1:N, N:1, or N:N!) for path="single". Neither source (${
sourceWellsUnordered.length
}) nor dest (${destWellsUnordered.length}) equal 1`
)

switch (path) {
Expand Down
Loading

0 comments on commit 57a97a2

Please sign in to comment.