Skip to content

Commit

Permalink
Merge branch 'enh-codespell' of github.com:yarikoptic/civic-v2 into y…
Browse files Browse the repository at this point in the history
…arikoptic-enh-codespell
  • Loading branch information
acoffman committed Apr 23, 2024
2 parents 2f314ec + 9cca66e commit 56ba2c3
Show file tree
Hide file tree
Showing 38 changed files with 70 additions and 39 deletions.
8 changes: 8 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
# generated/ was excluded but might need to be fixed as well!
skip = .git*,*.svg,*.lock,*.css,.codespellrc,*.js,generated,assets,variants-summary.page.html
check-hidden = true
# Ignore super long lines -- must be minimized etc
ignore-regex = ^.{120,}|\b(AllTime|allTime)\b
ignore-words-list = iif
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All content created in CIViC is, and will continue to be, freely available, with
## Getting Started
CIViC is a Rails backend serving a GraphQL API to an Angular frontend. The same API that powers the frontend is available for anyone to use. The easiest way to get started is to experiment in the [GraphiQL user interface](https://civicdb.org/api/graphiql). You can also browse autogenerated documentation [here](https://griffithlab.github.io/civic-v2/).
### Dependencies
* Ruby >= 3.0 (recomended install via rbenv)
* Ruby >= 3.0 (recommended install via rbenv)
* PostgreSQL >= 14
* Node >= 14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
nzLabel="Combined"></nz-option>
<nz-option
nzValue="UNKNOWN"
nzLabel="Unkown"></nz-option>
nzLabel="Unknown"></nz-option>
<nz-option
nzValue="NA"
nzLabel="N/A"></nz-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{chemInfo.chebiDefinition}}
</ng-container>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Inidications" [nzSpan]="2">
<nz-descriptions-item nzTitle="Indications" [nzSpan]="2">
<ng-container *ngIf="chemInfo.indications.length > 0; else noValue">
<cvc-tag-list>
<nz-tag *ngFor="let i of chemInfo.indications">{{i}}</nz-tag>
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/core/utilities/closeable-tag-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export abstract class BaseCloseableTag implements OnInit {
popoverVisible = false
abstract idFunction(): number

// TODO: implement as getter/setters to remove ngOnInit depdendency for virtual scroll cache
// TODO: implement as getter/setters to remove ngOnInit dependency for virtual scroll cache
// Low priority as closable tags are not currently used in virtual scroll viewports.
ngOnInit(): void {
if (this.onCloseClicked) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const tooltips: tooltipMap = {
},
}

// a map of tooltips that differ based on their display context (entity type, evidence/asssertion type)
// a map of tooltips that differ based on their display context (entity type, evidence/assertion type)
export type ContextualTooltipMap = {
[key: string | symbol]: {
// TODO: type as [key in ContextualAttribute]?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*ngIf="errors.length > 1"
[nzDescription]="errorList"
nzShowIcon
nzMessage="Submit Errors Occured"></nz-alert>
nzMessage="Submit Errors Occurred"></nz-alert>

<ng-template
#errorList
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/forms/mixins/entity-select-field.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface EntitySelectFieldOptions<
* TAF = typeahead query optional parameters fragment
* TQ = tag query
* TV = tag query variables
* TAP = optional typeahead query paramters type
* TAP = optional typeahead query parameters type
* */

export function EntitySelectField<
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/forms/mixins/string-select-field.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export interface StringSelectFieldOptions<
* TAQ = typeahead query
* TAV = typeahead query variables
* TAF = typeahead query optional parameters fragment
* TAP = optional typeahead query paramters type
* TAP = optional typeahead query parameters type
* */

export function StringSelectField<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<th>Popover</th>
<th>Closeable</th>
<th>Checkable</th>
<th>Trucate</th>
<th>Truncate</th>
<th>Group</th>
<th>Unlinked</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const columnKeyToQueryVariableMap: EvidenceManagerColQueryMap = {
therapies: 'therapyName',
evidenceItem: 'id',
}
// colum keys included here will be hidden in preference panel, preventing
// column keys included here will be hidden in preference panel, preventing
// defaults from being changed by the user
export const omittedFromPrefs: EvidenceManagerColKey[] = ['selected', 'id']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ interface TagConfig {
// most entity tag cols can be customized using TagConfig.
// if showStatus set to true, tag will display status styles.
// NOTE: use BaseColumnConfig's 'context' option if it's necessary
// to render an entity tag in a column whos row[colKey] data
// to render an entity tag in a column whose row[colKey] data
// is not a LinkableEntity, e.g. evidence-manager table's 'id' col
interface EntityTagConfig {
showStatus?: boolean // display tag status indicator styles
Expand Down Expand Up @@ -314,7 +314,7 @@ export const colTypeGuards = {
// These guard attributes on col options, currently not used
// in the TypeGuard pipe, but in logic that handles column options.
// FIXME(?): I had hoped that the discriminated union type ColumnOptionType
// above would have made guard functions like this unecessary, but I was unable to
// above would have made guard functions like this unnecessary, but I was unable to
// write some of the generic cols/prefs handling functions w/o them. Not
// sure if this is bc the types are not constructed properly.
export const hasSortOptions: TypeGuard<any, SortConfig> = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class MpExpressionEditorComponent implements AfterViewInit, OnChanges {
)
.subscribe((res) => {
// FIXME: this casting of 'res' is a total hack, need proper gate functions for this error/response
// logic, or refactor the parser to use rxjs error handling (which will also simplfy template logic)
// logic, or refactor the parser to use rxjs error handling (which will also simplify template logic)
if (this.isMpParseError(res)) {
const err = res as MpParseError
this.expressionMessage$.next(undefined)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class CvcOrgSubmitButtonComponent
organizations$: Observable<Organization[]>
mostRecentOrg$: Observable<Maybe<Organization>>

// these syncronize submit button & org dropdown button states, styles
// these synchronize submit button & org dropdown button states, styles
isDisabled$: Subject<boolean>
isHidden$: Subject<boolean>
buttonClass$!: BehaviorSubject<string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const columnKeyToQueryVariableMap: VariantManagerColQueryMap = {
aliases: 'variantAlias'
}

// colum keys included here will be hidden in preference panel, preventing
// column keys included here will be hidden in preference panel, preventing
// defaults from being changed by the user
export const omittedFromPrefs: VariantManagerColKey[] = ['selected', 'id']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ interface TagConfig {
// most entity tag cols can be customized using TagConfig.
// if showStatus set to true, tag will display status styles.
// NOTE: use BaseColumnConfig's 'context' option if it's necessary
// to render an entity tag in a column whos row[colKey] data
// to render an entity tag in a column whose row[colKey] data
// is not a LinkableEntity, e.g. variant-manager table's 'id' col
interface EntityTagConfig {
showStatus?: boolean // display tag status indicator styles
Expand Down Expand Up @@ -329,7 +329,7 @@ export const colTypeGuards = {
// These guard attributes on col options, currently not used
// in the TypeGuard pipe, but in logic that handles column options.
// FIXME(?): I had hoped that the discriminated union type ColumnOptionType
// above would have made guard functions like this unecessary, but I was unable to
// above would have made guard functions like this unnecessary, but I was unable to
// write some of the generic cols/prefs handling functions w/o them. Not
// sure if this is bc the types are not constructed properly.
export const hasSortOptions: TypeGuard<any, SortConfig> = (
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/forms/wrappers/form-row/form-row.wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ResponsiveColConfig = {
type FormRowOptions = {
// nz-row gutter
gutter?: number | [number, number] | null
// NOTE: if gutter[1] (vertial gutter) is set to 0, row will receive no top margin (see mp-finder config)
// NOTE: if gutter[1] (vertical gutter) is set to 0, row will receive no top margin (see mp-finder config)
// nz-col's nzSpan, nzXs - nzXXl config applied to every field
span?: string | number | null
responsive?: ResponsiveColConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ng-container *ngIf="assertion$ | ngrxPush as assertion">
<!-- page layout row -->
<nz-row [nzGutter]="[8, 16]">
<!-- LEFT COLUMN: assertion summary, desciption, attributes -->
<!-- LEFT COLUMN: assertion summary, description, attributes -->
<nz-col [nzSpan]="12">
<!-- layout row for description blocks -->
<nz-row [nzGutter]="[8, 8]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Features</h2>
nzExpandable
[nzEllipsisRows]="2">
CIViC Features include a feature-level summary, a link to the Drug
Gene Interation Database, and extensive gene details from MyGene.info.
Gene InteractionDatabase, and extensive gene details from MyGene.info.
</p>
</nz-col>
<nz-col
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h2>Data Releases</h2>
dynamically obtained from resources external to CIViC (e.g.
MyVariant.Info, MyGene.Info). Variant TSV releases only include
variant records with accepted evidence records. Variant TSV releases
from before August 2020 include all variant records, irregardless of
from before August 2020 include all variant records, regardless of
the status of the associated evidence items. Evidence TSV releases
only include accepted evidence items and exclude pending or rejected
evidence items. Assertion TSV releases only include accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<ng-container *ngrxLet="this.variantGroup$ as variantGroup">
<cvc-variants-table
[variantGroupId]="variantGroup?.id"
cvcTitle="Variants in Variant Groupt {{variantGroup?.name}}"></cvc-variants-table>
cvcTitle="Variants in Variant Group {{variantGroup?.name}}"></cvc-variants-table>
</ng-container>
</nz-col>
</nz-row>
Expand Down
2 changes: 1 addition & 1 deletion client/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { environment } from './environments/environment'
if (environment.production) {
enableProdMode()
} else {
// enable RXjs Spy on non production bulds only
// enable RXjs Spy on non production builds only
const spy = create()
// deactivate CyclePlugin, which spams console w/
// an alert about a next cycle in table-scroll.directive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
.header-description {
padding: @default-padding-sm;
// adjust headline and desctiption to fit nicely with
// adjust headline and description to fit nicely with
// the larger icon
h2 {
color: #262626;
Expand Down
2 changes: 1 addition & 1 deletion server/app/graphql/loaders/association_count_loader.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Loaders
class AssociationCountLoader < GraphQL::Batch::Loader
def initialize(model, association: assocation)
def initialize(model, association: association)
@model = model
@association = association
end
Expand Down
2 changes: 1 addition & 1 deletion server/app/graphql/mutations/resolve_flag.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Mutations::ResolveFlag < Mutations::MutationWithOrg
description <<~DOC.strip
Resolve a flag on a CIViC entity indicating that it was either erronously flagged or the issue has been resolved.
Resolve a flag on a CIViC entity indicating that it was either erroneously flagged or the issue has been resolved.
Any user may resolve their own flag however only editors with valid conflict of interest statements can resolve other flags.
DOC

Expand Down
2 changes: 1 addition & 1 deletion server/app/graphql/mutations/update_coi.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Mutations::UpdateCoi < Mutations::BaseMutation
description "Update the currentlly logged in User's Conflict of Interest statement"
description "Update the currently logged in User's Conflict of Interest statement"

argument :coi_present, Boolean, required: true,
description: 'Does the user report having a conflict of interest? Mark true if so.'
Expand Down
2 changes: 1 addition & 1 deletion server/app/graphql/resolvers/activities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Activities < GraphQL::Schema::Resolver
end

option(:mode, type: Types::Events::EventFeedMode) do |_, _|
#accesed in connection, yuck
#accessed in connection, yuck
end
end
end
2 changes: 1 addition & 1 deletion server/app/graphql/resolvers/top_level_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ class Resolvers::TopLevelEvents < GraphQL::Schema::Resolver
end

option(:mode, type: Types::Events::EventFeedMode) do |_, _|
#accesed in connection, yuck
#accessed in connection, yuck
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ActivitiesConnection < Types::BaseConnection
description: 'When filtered on a subject, user, or organization, the total number of events for that subject/user/organization, irregardless of other filters.'

field :activity_types, [Types::Activities::ActivityTypeInputType], null: false,
description: 'List of activity types that have occured on this entity.'
description: 'List of activity types that have occurred on this entity.'

field :subject_types, [Types::Activities::ActivitySubjectInputType], null: false

Expand Down
2 changes: 1 addition & 1 deletion server/app/graphql/types/connections/events_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class EventsConnection < Types::BaseConnection
description: 'List of all users that have generated an event on the subject entity.'

field :event_types, [Types::Events::EventActionType], null: false,
description: 'List of event types that have occured on this entity.'
description: 'List of event types that have occurred on this entity.'

field :participating_organizations, [Types::Entities::OrganizationType], null: false,
description: 'List of all organizations who are involved in this event stream.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NotificationsConnection < Types::BaseConnection
description: 'Users who have performed an action (other than a mention) that created a notification.'

field :event_types, [Types::Events::EventActionType], null: false,
description: 'List of event types that have occured on this entity.'
description: 'List of event types that have occurred on this entity.'

field :organizations, [Types::Entities::OrganizationType], null: false,
description: 'List of all organizations who are involved in this notification stream.'
Expand Down
4 changes: 2 additions & 2 deletions server/app/graphql/types/entities/user_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def authorized?(object, args, context)

field :notifications, Types::Entities::NotificationType.connection_type, null: true do
description 'Filterable list of notifications for the logged in user.'
type_desc = 'Filter the response to include only notifications of a certaint type (ex: mentions).'
sub_desc = 'Filter the reponse to include only notifications generated by a particular subscription.'
type_desc = 'Filter the response to include only notifications of a certain type (ex: mentions).'
sub_desc = 'Filter the response to include only notifications generated by a particular subscription.'
event_desc = 'Filter the response to include only notifications generated by certain actions (ex: commenting).'

argument :notification_type, Types::NotificationReasonType, required: false, description: type_desc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class MolecularProfileDisplayFilterType < Types::BaseEnum
value 'WITH_ACCEPTED_OR_SUBMITTED',
description: 'Display only molecular profiles which have evidence in either an accepted or submitted state.'
value 'WITH_SUBMITTED',
description: 'Display molecular profiles which have at least one submited evidence item.'
description: 'Display molecular profiles which have at least one submitted evidence item.'
value 'ALL',
description: 'Display all molecular profiles regardless of attached evidence status.'
end
Expand Down
2 changes: 1 addition & 1 deletion server/app/lib/importer/disease_ontology_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def assign_synonyms(disease, synonyms)
end

def delete_unprocessed_diseases
#sanity check for the DOID api, bail early if we cant find "cancer"
#sanity check for the DOID api, bail early if we can't find "cancer"
uri = URI(url_from_doid(162))
resp = Net::HTTP.get_response(uri)
if resp.code != '200'
Expand Down
2 changes: 1 addition & 1 deletion server/app/models/my_chem_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def response
def parse_response(resp)
p = JSON.parse(resp)
if p['hits'] && p['hits'].size > 1
return nil #it was ambiguous somehow, shouldnt happen with a NCIT
return nil #it was ambiguous somehow, shouldn't happen with a NCIT
end

if p['hits'] && p['hits'].size == 1
Expand Down
2 changes: 1 addition & 1 deletion server/app/models/my_disease_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def response
def parse_response(resp)
p = JSON.parse(resp)
if p['hits'] && p['hits'].size > 1
return nil #it was ambiguous somehow, shouldnt happen with a DOID
return nil #it was ambiguous somehow, shouldn't happen with a DOID
end

if p['hits'] && p['hits'].size == 1
Expand Down
2 changes: 1 addition & 1 deletion server/config/initializers/trestle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# config.site_logo_small = "logo-small.png"

# Speficy a favicon to be used within the admin.
# Specify a favicon to be used within the admin.
#
# config.favicon = "favicon.ico"

Expand Down

0 comments on commit 56ba2c3

Please sign in to comment.