Skip to content

Commit

Permalink
feat: codespell: config, workflow + fixing typos #230
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Apr 26, 2024
1 parent 560f351 commit 01b9789
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,*.pdf,*.svg,package-lock.json,*.min.js,*.ipynb,overview-lotties.js
# ignore-words-list =
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Codespell

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

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

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v1
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Bug fixes:

- In organize dataset: When moving files/folders to another location there will be a check if any duplicates are there already.
- On startup the server will try to connect continuosly. (backOff was replaced)
- On startup the server will try to connect continuously. (backOff was replaced)
- Organize dataset: import dataset will correctly check manifest details.
- Guided Mode: Fixed the automatically generated headers for manifest files
- Guided Mode: Changed the generated filepath from the filepath on the user's local machine to the path relative to the
Expand Down Expand Up @@ -589,7 +589,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Hidden files can now be imported except .DS_Store and Thumbs.db files.
- The input for renaming or creating a new dataset no longer references undefined function in its HTML.
- The navigation buttons in each individual Prepare Metadata section have been updated to match the perceived flow from the Prepare Metadata tab.
- The Add/edit subtitle feature has been updated so that the chracter limit matches the SDS 2.0 specification. This fixes a bug that would cause an error if a user met the character limit enforced by SODA and then tried to add or edit their subtitle.
- The Add/edit subtitle feature has been updated so that the character limit matches the SDS 2.0 specification. This fixes a bug that would cause an error if a user met the character limit enforced by SODA and then tried to add or edit their subtitle.

### Known Issues:

Expand Down Expand Up @@ -842,7 +842,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue where libraries were being loaded out of order leading to errors when opening SODA for the first time.
- When uploading a dataset, we have now locked the sidebar to prevent accidental clicks that would take you out of the UI.
- Fixed a bug where loading an award from Airtable would require two attempts.
- Fixed a bug where macOS version of SODA would run the pre-check message everytime the app lost focus.
- Fixed a bug where macOS version of SODA would run the pre-check message every time the app lost focus.

### Known issues:

Expand All @@ -868,7 +868,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a bug where manifest file data wasn't being pulled down correctly on Windows.
- Fixed a bug where .tiff images were not being converted by SODA.
- Fixed an issue where multiple sample id imports from the primary folder would not work.
- Fixed a bug where the import primary folder button would dissapear when starting over.
- Fixed a bug where the import primary folder button would disappear when starting over.

### Known issues:

Expand Down Expand Up @@ -912,7 +912,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Fixed a bug where certain message input boxes would take accidental clicks outside the clickable area and clear the input
- The dataset_description file will no longer enforce a 5 keyword limit.
- Fixed a bug where the siebar would open up when exiting a datset curation workflow.
- Fixed a bug where the siebar would open up when exiting a dataset curation workflow.

### Known issues:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ SODA is distributed under the MIT License. See [LICENSE](https://github.com/fair

## Privacy Policy

SODA uses Google Analytics to track user interactions with the application. Tracking is anonymous and no identifying personal information is collected. Tracking is implemented as part of our agreement with the SPARC program to report usage statistics for SODA. Tracking is also used to indentify errors and subsequently improve user experience. To learn more about what is tracked and how we use Google Analytics within SODA, please read our [Privacy Policy](https://github.com/fairdataihub/SODA-for-SPARC/wiki/Privacy-Policy).
SODA uses Google Analytics to track user interactions with the application. Tracking is anonymous and no identifying personal information is collected. Tracking is implemented as part of our agreement with the SPARC program to report usage statistics for SODA. Tracking is also used to identify errors and subsequently improve user experience. To learn more about what is tracked and how we use Google Analytics within SODA, please read our [Privacy Policy](https://github.com/fairdataihub/SODA-for-SPARC/wiki/Privacy-Policy).

## Acknowledgements

Expand Down
4 changes: 2 additions & 2 deletions src/pyflask/disseminate/disseminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def bf_get_doi(selected_bfaccount, selected_bfdataset):
Function to get current doi for a selected dataset
Args:
selected_bfaccount: name of selected Pennsieve acccount (string)
selected_bfaccount: name of selected Pennsieve account (string)
selected_bfdataset: name of selected Pennsieve dataset (string)
Return:
Current doi or "None"
Expand All @@ -50,7 +50,7 @@ def bf_reserve_doi(selected_bfaccount, selected_bfdataset):
Function to reserve doi for a selected dataset
Args:
selected_bfaccount: name of selected Pennsieve acccount (string)
selected_bfaccount: name of selected Pennsieve account (string)
selected_bfdataset: name of selected Pennsieve dataset (string)
Return:
Success or error message
Expand Down
4 changes: 2 additions & 2 deletions src/pyflask/manageDatasets/manage_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ def ps_add_permission_team(
selected_bfaccount, selected_bfdataset, selected_team, selected_role
):
"""
Function to add/remove permission fo a team to a selected dataset
Function to add/remove permission for a team to a selected dataset
Args:
selected_bfaccount: name of selected Pennsieve account (string)
Expand Down Expand Up @@ -1239,7 +1239,7 @@ def bf_get_banner_image(selected_bfaccount, selected_bfdataset):
Function to get url of current banner image associated with a selected dataset
Args:
selected_bfaccount: name of selected Pennsieve acccount (string)
selected_bfaccount: name of selected Pennsieve account (string)
selected_bfdataset: name of selected Pennsieve dataset (string)
Return:
url of banner image (string)
Expand Down
4 changes: 2 additions & 2 deletions src/pyflask/manifest/manifest_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def file_manifest_entry(file_key, file, relative_path, dict_folder_manifest):
unused_file_name, fileextension = get_name_extension(file_key)
# fileextension = name_split[1]
dict_folder_manifest["file type"].append(fileextension)
# addtional metadata
# additional metadata
if "additional-metadata" in file.keys():
dict_folder_manifest["Additional Metadata"].append(
file["additional-metadata"]
Expand All @@ -491,7 +491,7 @@ def file_manifest_entry(file_key, file, relative_path, dict_folder_manifest):

return dict_folder_manifest

# create local folder to save manifest files temporarly (delete any existing one first)
# create local folder to save manifest files temporarily (delete any existing one first)
if "auto-generated" in soda_json_structure["manifest-files"]:
if soda_json_structure["manifest-files"]["auto-generated"] == True:
manifest_files_structure = (
Expand Down
2 changes: 1 addition & 1 deletion src/pyflask/namespaces/configureNamespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def configure_namespaces():
Create namespaces for each pysoda file: pysoda ( now manage_datasets), prepare_metadata, etc
"""

manage_datasets_namespace = Namespace(NamespaceEnum.MANAGE_DATASETS.value, description='Routes for handling manage datsets functionality')
manage_datasets_namespace = Namespace(NamespaceEnum.MANAGE_DATASETS.value, description='Routes for handling manage datasets functionality')
namespaces[NamespaceEnum.MANAGE_DATASETS] = manage_datasets_namespace

curate_datasets_namespace = Namespace(NamespaceEnum.CURATE_DATASETS.value, description='Routes for handling dataset curation')
Expand Down
4 changes: 2 additions & 2 deletions src/pyflask/prepareMetadata/prepare_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
manifest_folder_path = join(userpath, "SODA", "manifest_files")

### Sets the TEMPLATE_PATH using SODA-for-SPARC's basepath so that the prepare_metadata section can find
### the templates stored in file_templates direcotory
### the templates stored in file_templates directory
def set_template_path(soda_base_path, soda_resources_path):
"""
Sets the TEMPLATE_PATH using SODA-for-SPARC's basepath so that the prepare_metadata section can find
the templates stored in file_templates direcotory.
the templates stored in file_templates directory.
"""
global TEMPLATE_PATH

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/assets/lotties/contact-us-lotties.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const contact_lottie = {
op: 200,
w: 1000,
h: 1000,
nm: "Work frome Home Mailing F 2",
nm: "Work from Home Mailing F 2",
ddd: 0,
assets: [],
layers: [
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/scripts/metadata-files/readme-changes.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ window.generateRCFilesHelper = (type) => {
if (textValue === "") {
Swal.fire({
title: "Incomplete information",
text: "Plase fill in the textarea.",
text: "Please fill in the textarea.",
heightAuto: false,
backdrop: "rgba(0,0,0, 0.4)",
icon: "error",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/scripts/validator/validator-UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ document.querySelector("#validate-local-dataset-path").addEventListener("click",
// show confirm button found under the input
let confirmDatasetBtn = document.querySelector("#validator-confirm-local-dataset-btn");

// set the field display property to none to remove the field margings
// set the field display property to none to remove the field margins
confirmDatasetBtn.parentElement.style.display = "flex";
}

Expand Down
4 changes: 2 additions & 2 deletions tools/soda-json-structure/soda-sparc-structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
dataset-strucuture: contains info about the dataset structure
1. The high-level SPARC folders are included in a "folders" key
2. Each file/folder info is stored in a key refering to the name of the file/folder (including the extension for files). If user renames the file/folder, this key should change to register that.
2. Each file/folder info is stored in a key referring to the name of the file/folder (including the extension for files). If user renames the file/folder, this key should change to register that.
3. The files/folders in each folder are stored in a "files"/"folders" key, respectively.
4. Each file/folder has a subkey "type" which is a string with value either "virtual" (only for folders, if created in SODA), "local", or "bf"
5. Each non virtual file/folder has a subkey "path" with is a string with value being the absolute path (for local files) or blackfynn id
6. Each non virtual file/folder has a subkey "action" which is an array containing "existing" (if it from an existing local or bf dataset) or "new" (if imported).
7. If "new", additional "action" could be "renamed". If "existing", addtional "action" could be "renamed", "moved" (if an existing file/folder is moved), and/or "deleted" (if delete is requested in the UI)
7. If "new", additional "action" could be "renamed". If "existing", additional "action" could be "renamed", "moved" (if an existing file/folder is moved), and/or "deleted" (if delete is requested in the UI)
8. If provided, a file with have the subkeys "description" and "additional-metadata" each contain a string value to be later included in the manifest files, if requested
"""
Expand Down

0 comments on commit 01b9789

Please sign in to comment.