**docs(brainy-models): add Code of Conduct and Contributing Guide**
- Added `CODE_OF_CONDUCT.md` to establish community standards for behavior and inclusivity. - Added `CONTRIBUTING.md` with detailed guidelines for contributing to the `brainy-models-package`: - Model quality, testing, and optimization requirements. - Development setup instructions, including build and test scripts. - Pull request and commit message conventions. - Package-specific utility scripts and file structure overview. **Purpose**: Provide clear contribution and community guidelines to foster collaboration and maintain project quality standards.
This commit is contained in:
parent
1bc1f08c4e
commit
c677b561d7
2 changed files with 152 additions and 0 deletions
49
brainy-models-package/CODE_OF_CONDUCT.md
Normal file
49
brainy-models-package/CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the project maintainers responsible for enforcement at
|
||||||
|
conduct@soulcraft.com.
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
103
brainy-models-package/CONTRIBUTING.md
Normal file
103
brainy-models-package/CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
# Contributing to @soulcraft/brainy-models
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to the Brainy Models package! This package provides pre-bundled TensorFlow models for the Brainy vector database.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The `@soulcraft/brainy-models` package is part of the larger Brainy ecosystem. For general contribution guidelines, please refer to the main [Brainy Contributing Guide](https://github.com/soulcraft-research/brainy/blob/main/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Package-Specific Guidelines
|
||||||
|
|
||||||
|
### Model Contributions
|
||||||
|
|
||||||
|
When contributing to the models package, please consider:
|
||||||
|
|
||||||
|
- **Model Quality**: Ensure models are properly tested and validated
|
||||||
|
- **Model Size**: Be mindful of package size impact (current package is ~25MB)
|
||||||
|
- **Compatibility**: Ensure models work with the target TensorFlow.js versions
|
||||||
|
- **Documentation**: Update README.md with new model information
|
||||||
|
|
||||||
|
### Development Setup
|
||||||
|
|
||||||
|
1. Fork and clone the main repository
|
||||||
|
2. Navigate to the models package: `cd brainy-models-package`
|
||||||
|
3. Install dependencies: `npm install`
|
||||||
|
4. Download models: `npm run download-models`
|
||||||
|
5. Build the package: `npm run build`
|
||||||
|
6. Run tests: `npm test`
|
||||||
|
|
||||||
|
### Testing Models
|
||||||
|
|
||||||
|
Before submitting changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Test model functionality
|
||||||
|
npm test
|
||||||
|
|
||||||
|
# Test model compression
|
||||||
|
npm run compress-models
|
||||||
|
|
||||||
|
# Verify package integrity
|
||||||
|
npm run pack
|
||||||
|
```
|
||||||
|
|
||||||
|
### Model Scripts
|
||||||
|
|
||||||
|
The package includes several utility scripts:
|
||||||
|
|
||||||
|
- `download-models` - Download the Universal Sentence Encoder model
|
||||||
|
- `compress-models` - Create optimized model variants
|
||||||
|
- `test` - Verify model functionality
|
||||||
|
|
||||||
|
### Commit Guidelines
|
||||||
|
|
||||||
|
Follow the same commit message conventions as the main Brainy project:
|
||||||
|
|
||||||
|
- Use conventional commit format
|
||||||
|
- Keep first line under 50 characters
|
||||||
|
- Use imperative mood ("Add model" not "Added model")
|
||||||
|
- Reference issues where appropriate
|
||||||
|
|
||||||
|
### Pull Request Process
|
||||||
|
|
||||||
|
1. Ensure your changes don't break existing functionality
|
||||||
|
2. Update documentation if you're adding new models or features
|
||||||
|
3. Test model loading and embedding generation
|
||||||
|
4. Verify package size impact is acceptable
|
||||||
|
5. Submit PR to the main Brainy repository
|
||||||
|
|
||||||
|
### Model Optimization
|
||||||
|
|
||||||
|
When working with models:
|
||||||
|
|
||||||
|
- **Float16**: For balanced performance and size
|
||||||
|
- **Int8**: For memory-constrained environments
|
||||||
|
- **Original**: For maximum accuracy
|
||||||
|
|
||||||
|
### File Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
brainy-models-package/
|
||||||
|
├── models/ # Model files
|
||||||
|
├── src/ # TypeScript source
|
||||||
|
├── dist/ # Compiled output
|
||||||
|
├── scripts/ # Utility scripts
|
||||||
|
└── test/ # Test files
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
This project follows the same [Code of Conduct](CODE_OF_CONDUCT.md) as the main Brainy project.
|
||||||
|
|
||||||
|
## Questions and Support
|
||||||
|
|
||||||
|
For questions specific to the models package:
|
||||||
|
|
||||||
|
- [GitHub Issues](https://github.com/soulcraft-research/brainy/issues) - Use the `brainy-models` label
|
||||||
|
- [Main Documentation](https://github.com/soulcraft-research/brainy)
|
||||||
|
|
||||||
|
For general Brainy questions, refer to the main repository.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue