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

[pre-commit.ci] pre-commit autoupdate #492

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"files": [
"README.md"
],
"files": ["README.md"],
"imageSize": 100,
"commit": false,
"contributors": [
Expand All @@ -10,67 +8,49 @@
"name": "Alex Kramer",
"avatar_url": "https://avatars.githubusercontent.com/u/6502785?v=4",
"profile": "https://github.com/amkram",
"contributions": [
"code",
"design",
"ideas"
]
"contributions": ["code", "design", "ideas"]
},
{
"login": "AngieHinrichs",
"name": "Angie Hinrichs",
"avatar_url": "https://avatars.githubusercontent.com/u/186983?v=4",
"profile": "http://genome.ucsc.edu/",
"contributions": [
"ideas",
"data"
]
"contributions": ["ideas", "data"]
},
{
"login": "richardgoater",
"name": "Richard Goater",
"avatar_url": "https://avatars.githubusercontent.com/u/1429721?v=4",
"profile": "https://github.com/richardgoater",
"contributions": [
"design",
"code"
]
"contributions": ["design", "code"]
},
{
"login": "chaoran-chen",
"name": "Chaoran Chen",
"avatar_url": "https://avatars.githubusercontent.com/u/18666552?v=4",
"profile": "https://github.com/chaoran-chen",
"contributions": [
"ideas"
]
"contributions": ["ideas"]
},
{
"login": "corneliusroemer",
"name": "Cornelius Roemer",
"avatar_url": "https://avatars.githubusercontent.com/u/25161793?v=4",
"profile": "https://github.com/corneliusroemer",
"contributions": [
"ideas"
]
"contributions": ["ideas"]
},
{
"login": "sungyeonkwon",
"name": "Sung Kwon",
"avatar_url": "https://avatars.githubusercontent.com/u/25865179?v=4",
"profile": "https://github.com/sungyeonkwon",
"contributions": [
"infra"
]
"contributions": ["infra"]
},
{
"login": "kvargha",
"name": "Koorous Vargha",
"avatar_url": "https://avatars.githubusercontent.com/u/35252220?v=4",
"profile": "https://kvargha.com/",
"contributions": [
"code"
]
"contributions": ["code"]
}
],
"contributorsPerLine": 7,
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1" # Use the sha / tag you want to point at
rev: "v4.0.0-alpha.8" # Use the sha / tag you want to point at
hooks:
- id: prettier
- repo: https://github.com/google/yapf
rev: v0.40.2
rev: v0.43.0
hooks:
- id: yapf
name: "yapf"
2 changes: 1 addition & 1 deletion docs/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ D,John,Fish`;
<script>
ReactDOM.render(
React.createElement(Taxonium, { sourceData: sourceData }),
document.getElementById("root")
document.getElementById("root"),
);
</script>
</body>
Expand Down
26 changes: 13 additions & 13 deletions taxonium_backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ program
.option("--data_url <data url>", "data url")
.option(
"--data_file <data file>",
"local data file, as alternative to data url"
"local data file, as alternative to data url",
);

program.parse();
Expand Down Expand Up @@ -158,7 +158,7 @@ app.get("/search", function (req, res) {
result.data.length +
" results in " +
(Date.now() - start_time) +
"ms"
"ms",
);
console.log("Result type was " + result.type);
});
Expand Down Expand Up @@ -300,7 +300,7 @@ app.get("/nodes/", function (req, res) {
max_y,
min_x,
max_x,
req.query.xType
req.query.xType,
);
}
console.log("Ready to send after " + (Date.now() - start_time) + "ms.");
Expand All @@ -312,19 +312,19 @@ app.get("/nodes/", function (req, res) {
(Date.now() - start_time) +
"ms, and output " +
result.length +
" nodes."
" nodes.",
);
});

function startListening() {
if (command_options.ssl) {
options = {
key: fs.readFileSync(
"/etc/letsencrypt/live/api.taxonium.org/privkey.pem"
"/etc/letsencrypt/live/api.taxonium.org/privkey.pem",
),
ca: fs.readFileSync("/etc/letsencrypt/live/api.taxonium.org/chain.pem"),
cert: fs.readFileSync(
"/etc/letsencrypt/live/api.taxonium.org/fullchain.pem"
"/etc/letsencrypt/live/api.taxonium.org/fullchain.pem",
),
};
https.createServer(options, app).listen(command_options.port, "0.0.0.0");
Expand Down Expand Up @@ -384,7 +384,7 @@ app.get("/node_details/", async (req, res) => {

res.send(detailed_node);
console.log(
"Request took " + (Date.now() - start_time) + "ms, and output " + node
"Request took " + (Date.now() - start_time) + "ms, and output " + node,
);
});

Expand All @@ -395,7 +395,7 @@ app.get("/tip_atts", async (req, res) => {
const atts = filtering.getTipAtts(processedData.nodes, node_id, att);
res.send(atts);
console.log(
"Request took " + (Date.now() - start_time) + "ms, and output " + atts
"Request took " + (Date.now() - start_time) + "ms, and output " + atts,
);
});

Expand All @@ -406,11 +406,11 @@ app.get("/nextstrain_json/:root_id", async (req, res) => {
root_id,
processedData.nodes,
config,
processedData.mutations
processedData.mutations,
);
res.setHeader(
"Content-Disposition",
"attachment; " + "filename=" + root_id + ".nextstrain.json"
"attachment; " + "filename=" + root_id + ".nextstrain.json",
);
res.send(json);
});
Expand Down Expand Up @@ -439,7 +439,7 @@ const loadData = async () => {
logStatusMessage,
ReadableWebToNodeStream.ReadableWebToNodeStream,
parser,
streamValues
streamValues,
);

logStatusMessage({
Expand All @@ -451,7 +451,7 @@ const loadData = async () => {
}

processedData.genes = new Set(
processedData.mutations.map((mutation) => mutation.gene)
processedData.mutations.map((mutation) => mutation.gene),
);
// as array
processedData.genes = Array.from(processedData.genes);
Expand All @@ -464,7 +464,7 @@ const loadData = async () => {
processedData.overallMaxY,
processedData.overallMinX,
processedData.overallMaxX,
"x_dist"
"x_dist",
);

cached_starting_values = result;
Expand Down
2 changes: 1 addition & 1 deletion taxonium_component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you're working with basic HTML, you can include the Taxonium component using
<script>
ReactDOM.render(
React.createElement(Taxonium, { sourceData: sourceData }),
document.getElementById("root")
document.getElementById("root"),
);
</script>
</body>
Expand Down
8 changes: 4 additions & 4 deletions taxonium_component/src/Deck.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Deck({
// Treenome state
const setMouseXY = useCallback(
(info) => view.setMouseXY([info.x, info.y]),
[view]
[view],
);
const [treenomeReferenceInfo, setTreenomeReferenceInfo] = useState(null);

Expand All @@ -99,7 +99,7 @@ function Deck({
mouseDownPos.current &&
Math.sqrt(
Math.pow(mouseDownPos.current[0] - event.clientX, 2) +
Math.pow(mouseDownPos.current[1] - event.clientY, 2)
Math.pow(mouseDownPos.current[1] - event.clientY, 2),
) > pan_threshold
) {
return false;
Expand Down Expand Up @@ -157,7 +157,7 @@ function Deck({
onViewStateChange,
xzoom,
deckRef,
]
],
);

const [hoverInfo, setHoverInfoRaw] = useState(null);
Expand All @@ -175,7 +175,7 @@ function Deck({
hoverDetails.clearNodeDetails();
}
},
[hoverDetails]
[hoverDetails],
);

const { layers, layerFilter, keyStuff, triggerSVGdownload } = useLayers({
Expand Down
6 changes: 3 additions & 3 deletions taxonium_component/src/Taxonium.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function Taxonium({
backendUrl ? backendUrl : query.backend,
query.sid,
url_on_fail,
sourceData
sourceData,
);
let hoverDetails = useHoverDetails();
const gisaidHoverDetails = useNodeDetails("gisaid-hovered", backend);
Expand All @@ -100,7 +100,7 @@ function Taxonium({
setTitle,
query,
configDict,
configUrl
configUrl,
);
const colorBy = useColorBy(config, query, updateQuery);
const [additionalColorMapping, setAdditionalColorMapping] = useState({});
Expand All @@ -119,7 +119,7 @@ function Taxonium({
(xType) => {
updateQuery({ xType });
},
[updateQuery]
[updateQuery],
);

const { data, boundsForQueries, isCurrentlyOutsideBounds } =
Expand Down
6 changes: 3 additions & 3 deletions taxonium_component/src/components/Basic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Button = ({
className={classNames(
"tx-button no-underline",
"border border-gray-400 shadow-sm rounded py-1 px-2 bg-gray-100 hover:bg-gray-200 text-sm text-gray-700",
className
className,
)}
href={href}
title={title}
Expand All @@ -32,7 +32,7 @@ export const Button = ({
className={classNames(
"tx-button",
"border border-gray-400 shadow-sm rounded py-1 px-2 bg-gray-100 hover:bg-gray-200 text-sm text-gray-700",
className
className,
)}
onClick={onClick}
title={title}
Expand All @@ -49,7 +49,7 @@ export const Select = ({ onChange, className, children, value, title }) => {
className={classNames(
"border bg-white text-gray-900 text-sm hover:text-gray-700 py-1 pl-2 pr-6",
"focus:ring-gray-800 focus:border-gray-800",
className
className,
)}
onChange={onChange}
value={value}
Expand Down
10 changes: 5 additions & 5 deletions taxonium_component/src/components/DeckSettingsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const DeckSettingsModal = ({
checked={settings.displayTextForInternalNodes}
onChange={() =>
settings.setDisplayTextForInternalNodes(
!settings.displayTextForInternalNodes
!settings.displayTextForInternalNodes,
)
}
/>{" "}
Expand All @@ -90,7 +90,7 @@ const DeckSettingsModal = ({
checked={settings.displayPointsForInternalNodes}
onChange={() =>
settings.setDisplayPointsForInternalNodes(
!settings.displayPointsForInternalNodes
!settings.displayPointsForInternalNodes,
)
}
/>{" "}
Expand All @@ -110,7 +110,7 @@ const DeckSettingsModal = ({
onChange={() =>
settings.setMutationTypeEnabled(
key,
!settings.mutationTypesEnabled[key]
!settings.mutationTypesEnabled[key],
)
}
/>{" "}
Expand All @@ -133,7 +133,7 @@ const DeckSettingsModal = ({
value={settings.thresholdForDisplayingText}
onChange={(e) =>
settings.setThresholdForDisplayingText(
parseFloat(e.target.value)
parseFloat(e.target.value),
)
}
step="0.1"
Expand Down Expand Up @@ -263,7 +263,7 @@ const DeckSettingsModal = ({
checked={settings.displaySearchesAsPoints}
onChange={() =>
settings.setDisplaySearchesAsPoints(
!settings.displaySearchesAsPoints
!settings.displaySearchesAsPoints,
)
}
/>{" "}
Expand Down
2 changes: 1 addition & 1 deletion taxonium_component/src/components/JBrowseErrorBoundary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class JBrowseErrorBoundary extends React.Component {
error.message === "Invalid array length"
) {
toast.error(
"Error displaying track. Please make sure your file is well-formatted (e.g., validated with https://github.com/EBIvariation/vcf-validator)."
"Error displaying track. Please make sure your file is well-formatted (e.g., validated with https://github.com/EBIvariation/vcf-validator).",
);
}
}
Expand Down
Loading
Loading