Skip to content

Commit

Permalink
Merge pull request #463 from NeurodataWithoutBorders/sophisticated_ex…
Browse files Browse the repository at this point in the history
…clusion

Add better exclusion control
  • Loading branch information
CodyCBakerPhD authored Oct 17, 2023
2 parents fc1c9db + 4231bc7 commit 9463ac6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,13 @@ export class JSONSchemaForm extends LitElement {
const res = entries
.map(([key, value]) => {
if (!value.properties && key === "definitions") return false; // Skip definitions
if (this.ignore.includes(key)) return false;
if (
this.ignore.find((v) => {
if (typeof v === "string") return v === key;
else return v.test(key);
})
)
return false;
if (this.showLevelOverride >= path.length) return isRenderable(key, value);
if (required[key]) return isRenderable(key, value);
if (this.#getLink([...this.base, ...path, key])) return isRenderable(key, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ export class GuidedMetadataPage extends ManagedPage {
results,
globals: aggregateGlobalMetadata,

ignore: ["Ophys", "subject_id", "session_id"],
ignore: [
"Ophys", // Always ignore ophys metadata (for now)
"Icephys", // Always ignore icephys metadata (for now)
"Behavior", // Always ignore behavior metadata (for now)
new RegExp("ndx-.+"), // Ignore all ndx extensions
"subject_id",
"session_id",
],

conditionalRequirements: [
{
Expand Down

0 comments on commit 9463ac6

Please sign in to comment.