-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into entity-events-api…
…-descriptions
- Loading branch information
Showing
116 changed files
with
5,590 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import setuptools | ||
|
||
folders = ["./smoke-test/tests"] | ||
|
||
for folder in folders: | ||
print(f"Checking folder {folder}") | ||
a = [i for i in setuptools.find_packages(folder) if "cypress" not in i] | ||
b = [i for i in setuptools.find_namespace_packages(folder) if "cypress" not in i] | ||
|
||
in_a_not_b = set(a) - set(b) | ||
in_b_not_a = set(b) - set(a) | ||
|
||
assert ( | ||
len(in_a_not_b) == 0 | ||
), f"Found packages in {folder} that are not in namespace packages: {in_a_not_b}" | ||
assert ( | ||
len(in_b_not_a) == 0 | ||
), f"Found namespace packages in {folder} that are not in packages: {in_b_not_a}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
datahub-web-react/src/app/entity/shared/containers/profile/sidebar/EntityInfo/EntityInfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import Link from 'antd/lib/typography/Link'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import PlatformContent from '../../header/PlatformContent'; | ||
import { useEntityData } from '../../../../EntityContext'; | ||
import { useEntityRegistry } from '../../../../../../useEntityRegistry'; | ||
import { StyledDivider } from '../FormInfo/components'; | ||
import { DatasetStatsSummarySubHeader } from '../../../../../dataset/profile/stats/stats/DatasetStatsSummarySubHeader'; | ||
import LinkOut from '../../../../../../../images/link-out.svg?react'; | ||
import FormInfo from '../FormInfo/FormInfo'; | ||
|
||
const EntityName = styled.div` | ||
font-size: 16px; | ||
font-weight: 700; | ||
line-height: 24px; | ||
margin-bottom: 8px; | ||
`; | ||
|
||
const EntityInfoWrapper = styled.div` | ||
padding-top: 20px; | ||
`; | ||
|
||
const StyledLink = styled(Link)` | ||
font-size: 14px; | ||
line-height: 18px; | ||
display: inline-flex; | ||
align-items: center; | ||
svg { | ||
height: 14px; | ||
width: 14px; | ||
} | ||
`; | ||
|
||
const FormInfoWrapper = styled.div` | ||
margin-top: 12px; | ||
`; | ||
|
||
interface Props { | ||
formUrn: string; | ||
} | ||
|
||
export default function EntityInfo({ formUrn }: Props) { | ||
const entityRegistry = useEntityRegistry(); | ||
const { entityType, entityData } = useEntityData(); | ||
const entityName = entityData ? entityRegistry.getDisplayName(entityType, entityData) : ''; | ||
|
||
return ( | ||
<EntityInfoWrapper> | ||
<PlatformContent /> | ||
<EntityName>{entityName}</EntityName> | ||
<StyledLink | ||
href={entityRegistry.getEntityUrl(entityType, entityData?.urn || '')} | ||
target="_blank" | ||
rel="noreferrer noopener" | ||
> | ||
View Profile <LinkOut style={{ marginLeft: '4px' }} /> | ||
</StyledLink> | ||
<DatasetStatsSummarySubHeader properties={{ shouldWrap: true }} /> | ||
<FormInfoWrapper> | ||
<FormInfo shouldDisplayBackground formUrn={formUrn} /> | ||
</FormInfoWrapper> | ||
<StyledDivider /> | ||
</EntityInfoWrapper> | ||
); | ||
} |
Oops, something went wrong.