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
Changes from 1 commit
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
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
commit 74a1531793b5b3f7d5af2e18c1b196d50785e2e8
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": [
@@ -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,
2 changes: 1 addition & 1 deletion docs/component.md
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ D,John,Fish`;
<script>
ReactDOM.render(
React.createElement(Taxonium, { sourceData: sourceData }),
document.getElementById("root")
document.getElementById("root"),
);
</script>
</body>
26 changes: 13 additions & 13 deletions taxonium_backend/server.js
Original file line number Diff line number Diff line change
@@ -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();
@@ -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);
});
@@ -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.");
@@ -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");
@@ -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,
);
});

@@ -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,
);
});

@@ -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);
});
@@ -439,7 +439,7 @@ const loadData = async () => {
logStatusMessage,
ReadableWebToNodeStream.ReadableWebToNodeStream,
parser,
streamValues
streamValues,
);

logStatusMessage({
@@ -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);
@@ -464,7 +464,7 @@ const loadData = async () => {
processedData.overallMaxY,
processedData.overallMinX,
processedData.overallMaxX,
"x_dist"
"x_dist",
);

cached_starting_values = result;
2 changes: 1 addition & 1 deletion taxonium_component/README.md
Original file line number Diff line number Diff line change
@@ -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>
8 changes: 4 additions & 4 deletions taxonium_component/src/Deck.jsx
Original file line number Diff line number Diff line change
@@ -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);

@@ -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;
@@ -157,7 +157,7 @@ function Deck({
onViewStateChange,
xzoom,
deckRef,
]
],
);

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

const { layers, layerFilter, keyStuff, triggerSVGdownload } = useLayers({
6 changes: 3 additions & 3 deletions taxonium_component/src/Taxonium.jsx
Original file line number Diff line number Diff line change
@@ -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);
@@ -100,7 +100,7 @@ function Taxonium({
setTitle,
query,
configDict,
configUrl
configUrl,
);
const colorBy = useColorBy(config, query, updateQuery);
const [additionalColorMapping, setAdditionalColorMapping] = useState({});
@@ -119,7 +119,7 @@ function Taxonium({
(xType) => {
updateQuery({ xType });
},
[updateQuery]
[updateQuery],
);

const { data, boundsForQueries, isCurrentlyOutsideBounds } =
6 changes: 3 additions & 3 deletions taxonium_component/src/components/Basic.jsx
Original file line number Diff line number Diff line change
@@ -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}
@@ -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}
@@ -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}
10 changes: 5 additions & 5 deletions taxonium_component/src/components/DeckSettingsModal.jsx
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ const DeckSettingsModal = ({
checked={settings.displayTextForInternalNodes}
onChange={() =>
settings.setDisplayTextForInternalNodes(
!settings.displayTextForInternalNodes
!settings.displayTextForInternalNodes,
)
}
/>{" "}
@@ -90,7 +90,7 @@ const DeckSettingsModal = ({
checked={settings.displayPointsForInternalNodes}
onChange={() =>
settings.setDisplayPointsForInternalNodes(
!settings.displayPointsForInternalNodes
!settings.displayPointsForInternalNodes,
)
}
/>{" "}
@@ -110,7 +110,7 @@ const DeckSettingsModal = ({
onChange={() =>
settings.setMutationTypeEnabled(
key,
!settings.mutationTypesEnabled[key]
!settings.mutationTypesEnabled[key],
)
}
/>{" "}
@@ -133,7 +133,7 @@ const DeckSettingsModal = ({
value={settings.thresholdForDisplayingText}
onChange={(e) =>
settings.setThresholdForDisplayingText(
parseFloat(e.target.value)
parseFloat(e.target.value),
)
}
step="0.1"
@@ -263,7 +263,7 @@ const DeckSettingsModal = ({
checked={settings.displaySearchesAsPoints}
onChange={() =>
settings.setDisplaySearchesAsPoints(
!settings.displaySearchesAsPoints
!settings.displaySearchesAsPoints,
)
}
/>{" "}
2 changes: 1 addition & 1 deletion taxonium_component/src/components/JBrowseErrorBoundary.jsx
Original file line number Diff line number Diff line change
@@ -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).",
);
}
}
6 changes: 3 additions & 3 deletions taxonium_component/src/components/JBrowsePanel.jsx
Original file line number Diff line number Diff line change
@@ -283,7 +283,7 @@ function JBrowsePanel(props) {
state.session.view
) {
freezeTracks.forEach((t) =>
state.session.view.showTrack(t.configuration.trackId)
state.session.view.showTrack(t.configuration.trackId),
);
}
}, [freezeTracks, state]);
@@ -308,7 +308,7 @@ function JBrowsePanel(props) {
const widget = state.session.addWidget(
"AddTrackWidget",
"addTrackWidget",
{ view: state.session.view.id }
{ view: state.session.view.id },
);
// AddTrackWidget calls session.addTrackConf, which
// doesn't appear to be defined in the session object
@@ -332,7 +332,7 @@ function JBrowsePanel(props) {
":" +
props.treenomeState.ntBoundsExt[0] +
".." +
props.treenomeState.ntBoundsExt[1]
props.treenomeState.ntBoundsExt[1],
);
props.treenomeState.setNtBoundsExt(null);
}, [props.settings.chromosomeName, props.treenomeState, state.session.view]);
Loading
Loading