Skip to content

Commit

Permalink
#5 add pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Mar 5, 2025
1 parent 6657ec7 commit 41e42ec
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@ The project implements all of the core components (accession, dissemination) and

Each source and disseination target should be developed in a separate accelerator-source-xxx or accelerator-dissemination-xxx repository



## Developer Notes

This project uses pre-commit hooks to validate code, run tests, and accomplish other tasks.

Loading the requirements.txt into your dev environment will install pre-commit, then you can set up the pre-commit
hooks by running:

```
pre-commit install
```

This should be the first thing you do when cloning this project
3 changes: 1 addition & 2 deletions accelerator_core/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

## Description

This accel.json file, and the accompanying JSON schema, represent the core data model for Accelerator.
This accel.json file, and the accompanying JSON schema, represent the core data model for Accelerator.


## Development process

The initial accel.json file is derived from the Excel model of the 1.5 CHORDS model
found here: https://nih.sharepoint.com/:f:/r/sites/NIH-DataAcceleratorProgram/Shared%20Documents/General/Design/term%20mappings?csf=1&web=1&e=1JTZT1

2 changes: 1 addition & 1 deletion accelerator_core/schema/accel.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@
}
]
}
}
}
2 changes: 1 addition & 1 deletion accelerator_core/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def determine_resource_path(resource_package, resource_name) -> Path:

with importlib.resources.path(resource_package, resource_name) as fspath:
logger.debug(f"resource path:{fspath}")
return fspath
return fspath
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
setuptools~=65.6.3
jsonschema~=4.23.0
pre-commit~=4.1.0
pre-commit~=4.1.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9",
)
)

0 comments on commit 41e42ec

Please sign in to comment.