generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validations): add validations yaml and set up repo docs
Sets up the `regtech-regex` repository with an initial validations file, sets up the Readme, and cleans up the boilerplate files. Gets this repo ready to become public! 🥳 ## Changes - add first version of validations.yaml - email - lei - rssd_id - simple_us_phone_number - tin - cleans up issue/pr templates with only parts relevant to the repo - updates the changelog for the initial version - added a basic `package.json` (making this a real [NPM package in the future](#4) may be helpful - updates the `CONTRIBUTING.md` file to not include browser support information - removes unnecessary `INSTALL.md` file - creates the Readme file with examples, documentation, and usage instructions ## Notes Here's the completed open source checklist with `~` next to ones that aren't applicable: - [x] **Has PII been removed?** - Use [Clouseau](https://github.com/virtix/clouseau) for scanning source code. - If there are images, visually inspect each image to ensure there is no CFPB-specific information. - [x] **Have security vulnerabilities been remediated?** - [x] **Are we including any other open source products? If so, is there any conflict with our public domain release?** - [x] **Is our `TERMS.md` included?** - [x] **Is a `CHANGELOG.md` present and does it contain structured, consistently formatted recent history?** - [x] **Are instructions for contributing included (`CONTRIBUTING.md`)?** - [x] **Are installation instructions clearly written in the `README` _and_ tested on a clean machine?** - [x] **Are all dependencies described in the `README`, `requirements.txt`, and/or `buildout.cfg`?** - [~] **Are the API docs generated?** - [~] **Are there unit tests?** - [~] **If applicable and possible, is it set up in TravisCI?** - [x] **Have multiple people reviewed the code?** - [x] **Is there a screenshot in the `README`, if applicable?** ## Todos **post-mvp wishlist** - #3 - #4 - #5 - #6 ## Checklist - [x] PR has an informative and human-readable title - [x] Changes are limited to a single goal (no scope creep) - [x] Code can be automatically merged (no conflicts) - [x] Passes all existing automated tests - [x] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG) - [x] Reviewers requested
- Loading branch information
Showing
10 changed files
with
98 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
All notable changes to this project will be documented in this file. | ||
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format. | ||
|
||
|
||
## x.y.z - YYYY-MM-DD | ||
## 1.0.0 - 2024-03-21 | ||
|
||
### Added | ||
- Lorem ipsum dolor sit amet | ||
|
||
### Deprecated | ||
- Nothing. | ||
|
||
### Removed | ||
- Nothing. | ||
|
||
### Fixed | ||
- Nothing. | ||
- Initial release of validations.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,64 @@ | ||
#### CFPB Open Source Project Template Instructions | ||
# regtech-regex | ||
|
||
1. Create a new project. | ||
2. [Copy these files into the new project](#installation) | ||
3. Update the README, replacing the contents below as prescribed. | ||
4. Add any libraries, assets, or hard dependencies whose source code will be included | ||
in the project's repository to the _Exceptions_ section in the [TERMS](TERMS.md). | ||
- If no exceptions are needed, remove that section from TERMS. | ||
5. If working with an existing code base, answer the questions on the [open source checklist](opensource-checklist.md) | ||
6. Delete these instructions and everything up to the _Project Title_ from the README. | ||
7. Write some great software and tell people about it. | ||
Shared data validations using regular expressions for use at the CFPB. This repo aims to collect sensible regex data validations in one YAML file for use across multiple tech stacks in the Small Business Lending project and maybe beyond. | ||
|
||
> Keep the README fresh! It's the first thing people see and will make the initial impression. | ||
## Installation | ||
|
||
To install all of the template files, run the following script from the root of your project's directory: | ||
|
||
``` | ||
bash -c "$(curl -s https://raw.githubusercontent.com/CFPB/development/main/open-source-template.sh)" | ||
``` | ||
|
||
---- | ||
|
||
# Project Title | ||
|
||
**Description**: Put a meaningful, short, plain-language description of what | ||
this project is trying to accomplish and why it matters. | ||
Describe the problem(s) this project solves. | ||
Describe how this software can improve the lives of its audience. | ||
|
||
Other things to include: | ||
|
||
- **Technology stack**: Indicate the technological nature of the software, including primary programming language(s) and whether the software is intended as standalone or as a module in a framework or other ecosystem. | ||
- **Status**: Alpha, Beta, 1.1, etc. It's OK to write a sentence, too. The goal is to let interested people know where this project is at. This is also a good place to link to the [CHANGELOG](CHANGELOG.md). | ||
- **Links to production or demo instances** | ||
- Describe what sets this apart from related-projects. Linking to another doc or page is OK if this can't be expressed in a sentence or two. | ||
|
||
|
||
**Screenshot**: If the software has visual components, place a screenshot after the description; e.g., | ||
|
||
![](https://raw.githubusercontent.com/cfpb/open-source-project-template/main/screenshot.png) | ||
This YAML file is subject to sudden and breaking changes while the Small Business Lending project is in development, so use at your own risk. | ||
|
||
![A rough diagram of the regtech-regex vision of a single YAML file sharing the same regular expression for validating data such as Research, Statistics, Supervision, Discount IDs across multiple use cases. The diagram shows a YAML object that contains a RSSD ID number along with a regex that ensures that the value is an integer. Two arrows point from the YAML: one arrow points to a file that has an RSSD ID that is 9999 with a green validation check mark, and the other arrow points toward a file that has an RSSD ID with a red invalid symbol of X](regtech-regex.svg) | ||
|
||
## Dependencies | ||
|
||
Describe any dependencies that must be installed for this software to work. | ||
This includes programming languages, databases or other storage mechanisms, build tools, frameworks, and so forth. | ||
If specific versions of other software are required, or known not to work, call that out. | ||
This repo doesn't currently have any dependencies. Just a good old YAML file. | ||
|
||
## Installation | ||
|
||
Detailed instructions on how to install, configure, and get the project running. | ||
This should be frequently tested to ensure reliability. Alternatively, link to | ||
a separate [INSTALL](INSTALL.md) document. | ||
|
||
## Configuration | ||
|
||
If the software is configurable, describe it in detail, either here or in other documentation to which you link. | ||
Import the `validations.yaml` file using the URL or via a package manager. | ||
|
||
## Usage | ||
|
||
Show users how to use the software. | ||
Be specific. | ||
Use appropriate formatting when showing code snippets. | ||
|
||
## How to test the software | ||
Here's an example of an entry in the `validations.yaml` file: | ||
|
||
```yaml | ||
rssd_id: | ||
description: must be an integer | ||
error_text: Must be a number. | ||
examples: | ||
- '9999' | ||
- '1' | ||
link: https://regex101.com/r/l3SyQi/3 | ||
references: | ||
regex: ^\d+$ | ||
``` | ||
If the software includes automated tests, detail how to run those tests. | ||
Each entry should be snake case, with common acronyms and initialisms being acceptable. | ||
## Known issues | ||
Each entry should have the following properties: | ||
Document any known significant shortcomings with the software. | ||
- description: a short description of how this value should be validated | ||
- error_text: a user-friendly message that could be displayed on a frontend form validation | ||
- examples: an array of strings that are examples of values that would be validated as being correct | ||
- link: a link to [regex101.com](https://regex101.com/) for live documentation and so devs can easily test the regular expression | ||
- references: an array of links to external documentation | ||
- regex: the regular expression that validates the value | ||
## Getting help | ||
Instruct users how to get help with this software; this might include links to an issue tracker, wiki, mailing list, etc. | ||
|
||
**Example** | ||
|
||
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker. | ||
## Getting involved | ||
This section should detail why people should get involved and describe key areas you are | ||
currently focusing on; e.g., trying to get feedback on features, fixing certain bugs, building | ||
important pieces, etc. | ||
|
||
General instructions on _how_ to contribute should be stated with a link to [CONTRIBUTING](CONTRIBUTING.md). | ||
Think you might have a simple regular expression that relates to consumer finance that might be helpful? Create an issue! See [CONTRIBUTING](CONTRIBUTING.md) for more details. | ||
|
||
---- | ||
--- | ||
## Open source licensing info | ||
1. [TERMS](TERMS.md) | ||
2. [LICENSE](LICENSE) | ||
3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/) | ||
|
||
---- | ||
--- | ||
## Credits and references | ||
1. Projects that inspired you | ||
2. Related projects | ||
3. Books, papers, talks, or other sources that have meaningful impact or influence on this project | ||
1. Screenshot uses icons from the [CFPB Design System](https://cfpb.github.io/design-system/foundation/iconography) and composed with [tldraw](https://www.tldraw.com/) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "regtech-regex", | ||
"license": "MIT", | ||
"private": true, | ||
"version": "1.0.0" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.