This repository contains the DB underlying RESSLAB Hub. The main branch points to the website in production, the test branch points to the test deployement. See RESSLAB Hub's repository.
Automated data upload pipeline is still under active development and testing.
Data dictionaries are available as CSVs in each tab's folder, e.g. steel_braces_data_dictionary.csv. They contain:
- column_name : column name all lowercase, no spaces
- type : choose type among :
Numeric(general type for numbers),DecimalFloat(floating-point number with high precision),SmallInteger(integer smaller than 30 000),BigInteger(big integer, e.g 10^9),Integer(any integer),String(text),Date(date in format dd.mm.yyyy. If date is a year only, make it integer - eventually will update to ISO format),Boolean(yes/no) - example_value (optional) : sample value for this column
- symbol (optional) : symbol in markdown format, for automated documentation generation
- description : plain text description of the column, for future users
- unit (optional) : units acceptable. None if unitless.
- nullable : True if this column accepts NA. (Clarify distinction NA/NR for the user).
Currently documented only for Connections DB
This guide explains how to add, modify, or delete data in the repository while ensuring data quality through our automated validation system.
- A GitHub account
- Basic understanding of Git (clone, commit, push)
- Access to the repository
- Fork/Clone the repository
- Create a new branch
- Make your changes
- Submit a Pull Request (PR)
- Wait for validation checks
- Address any validation issues
- Get approval and merge
#Clone the repository
git clone <repository-url>
cd <repository-name>
#Create a new branch
git switch -c data/your-changes-descriptionYou can modify data in any of these directories:
braces/columns/connections/hss_columns/material/cyclic_coupons/material/tensile_coupons/material/ductile_fracture/residual_stresses/eccentric_braced_frames
When making changes:
- You can make multiple commits while working on your changes
- The validation pipeline will check the total diff between your branch and the base branch
- All commits will and must be squashed during the PR merge
- The CI pipeline on 'main' uses only the final squashed commit for validation (diff between HEAD~1 and HEAD)
This means you can:
- Make frequent small commits as you work
- Iterate and fix validation issues with new commits
- Not worry about keeping a "clean" commit history
But remember:
- The PR must be set to "Squash and merge" when merging
- The final squashed commit message should clearly describe all changes
- Open the relevant CSV file
- Add your new row(s) following the existing format
- Ensure all mandatory fields (nullable=false in data dictionary) are filled
- Use "NA" (not empty cells) for missing values in nullable fields
- Locate the row(s) you want to modify
- Make your changes while maintaining the correct format
- Document your changes in the commit message
- Remove the relevant row(s)
- Ensure referential integrity is maintained
- Document the reason for deletion in the commit message
#Stage your changes
git add path/to/modified/file.csv
#Commit with a descriptive message
git commit -m "data: add/modify/delete [brief description] \
Detailed explanation of changes \
Reference to source documents if applicable"
#Push to your branch
git push origin data/your-changes-description- Go to GitHub repository
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
- Add relevant labels
- Submit the PR
The automated validation will check:
- CSV format integrity
- Data types correctness
- Required fields presence
- Value ranges and constraints
- Cross-references integrity
If validation fails:
- Check the GitHub Actions tab for detailed error messages
- Make necessary corrections in your branch
- Push the updates
- Validation will run automatically again
| Error | Solution |
|---|---|
| "Invalid data type" | Check the data_dictionary.csv for correct type |
| "Missing required field" | Ensure all non-nullable fields have values |
| "Value out of range" | Verify the value meets the specified constraints |
| "Invalid format" | Ensure dates, numbers, etc. follow the required format |
| "NA in non-nullable field" | Provide a valid value for mandatory fields |
- One Change Per PR: Keep changes focused and related
- Documentation:
- Reference source documents
- Explain significant changes
- Note any special considerations
- Data Quality:
- Double-check values before submitting
- Use consistent units
- Follow naming conventions
- Communication:
- Respond to reviewer comments promptly
- Ask questions if validation errors are unclear
- Check the data dictionary for field specifications
- Review existing data for examples
- Open an issue for questions
- Contact repository maintainers for clarification
- The validation process is automatic and runs on every PR
- All changes must pass validation before merging
- Reviewers may request additional changes even if validation passes
- Keep PR discussions focused on the data changes
tar --exclude-vcs -czf data.tar.gz *
# all
curl -L http://127.0.0.1:8000/upload/?type=all -F file=@data.tar.gz -u user:changeit
# all-brace
curl -L http://127.0.0.1:8000/upload/?type=all-brace -F file=@data.tar.gz -u user:changeit# Like above but with the validate endpooint
tar --exclude-vcs -czf data.tar.gz *
# http://127.0.0.1:8000 is the localhost of the backend of resslab-hub
curl -L http://127.0.0.1:8000/validate/\?type\=all -F file=@data.tar.gz -u user:changeit
# you can use jq to prettyfy the json output like so
# curl -L http://127.0.0.1:8000/validate/\?type\=all -F file=@data.tar.gz -u user:changeit | jq -r