Thank you for your interest in contributing to OpenQC-VSCode! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
We are committed to providing a welcoming and inspiring community for all. Please read and follow our Code of Conduct.
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive criticism
- Show empathy towards others
- Node.js 18 or higher
- Python 3.8 or higher
- VSCode 1.85 or higher
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/OpenQC-VSCode.git cd OpenQC-VSCode - Add upstream remote:
git remote add upstream https://github.com/newtontech/OpenQC-VSCode.git
# Node.js dependencies
npm install
# Python dependencies
pip install -e .[dev]# Compile TypeScript
npm run compile
# Watch mode
npm run watch# TypeScript tests
npm test
# Python tests
pytest
# With coverage
npm run test:coverage
pytest --cov=src- Open project in VSCode
- Press
F5to launch Extension Development Host - Test your changes in the new VSCode window
- Check if the bug has already been reported in Issues
- If not, create a new issue using the Bug Report template
- Include:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Screenshots (if applicable)
- Check existing Issues for similar requests
- Create a new issue using the Feature Request template
- Describe:
- Problem it solves
- Proposed solution
- Use cases
- Alternatives considered
-
Look for issues labeled:
good first issue- Good for newcomershelp wanted- Community help neededbug- Bug fixesfeature- New features
-
Comment on the issue to indicate you're working on it
-
Follow the TDD Guidelines for development
# Update main branch
git checkout main
git pull upstream main
# Create feature branch
git checkout -b feature/issue-123-vasp-parser- Follow Coding Standards
- Write tests first (TDD)
- Update documentation
- Keep commits focused
We follow Conventional Commits:
feat: add INCAR parser
fix: correct POSCAR coordinate parsing
docs: update installation instructions
test: add tests for Gaussian parser
refactor: simplify conversion logic
style: format code with prettier
chore: update dependencies
git push origin feature/issue-123-vasp-parserThen create a Pull Request on GitHub.
Before submitting, ensure:
- Tests pass (
npm test,pytest) - Coverage maintained (≥ 80%)
- Linter passes (
npm run lint) - Documentation updated
- CHANGELOG.md updated
- PR references issue (e.g., "Closes #123")
- PR template filled out
- Respond to all comments
- Make requested changes
- Push new commits (don't force push)
- Request re-review when ready
A maintainer will merge your PR after:
- All CI checks pass
- At least one approval
- All comments resolved
We use:
- ESLint for linting
- Prettier for formatting
- TypeScript strict mode
# Check linting
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format// Use interfaces for object shapes
interface ParseResult {
success: boolean;
data: unknown;
}
// Use async/await over promises
async function parseFile(path: string): Promise<ParseResult> {
const content = await fs.readFile(path, 'utf-8');
return parser.parse(content);
}
// Use descriptive names
const numberOfAtoms = atoms.length; // Good
const n = atoms.length; // Bad
// Document public APIs
/**
* Parse VASP INCAR file
* @param content - Raw file content
* @returns Parsed parameters
*/
export function parseIncar(content: string): Record<string, unknown> {
// ...
}We follow PEP 8 with:
- Black for formatting
- Flake8 for linting
- MyPy for type checking
# Format code
black src tests
# Check linting
flake8 src tests
# Type check
mypy srcfrom typing import Dict, List, Optional
def parse_incar(content: str) -> Dict[str, any]:
"""
Parse VASP INCAR file.
Args:
content: Raw file content
Returns:
Dictionary of parameters
Raises:
ParseError: If content is invalid
"""
# Use descriptive variable names
parameters = {}
# Document complex logic
for line in content.split('\n'):
# Skip comments and empty lines
if line.startswith('#') or not line.strip():
continue
# Parse parameter
key, value = parse_parameter(line)
parameters[key] = value
return parametersWe follow Test-Driven Development (TDD). See TDD-GUIDELINES.md for details.
tests/
├── unit/ # Fast, isolated tests
├── integration/ # Test component interactions
├── e2e/ # Test complete workflows
└── fixtures/ # Test data
// tests/unit/parsers/incarParser.test.ts
import { IncarParser } from '@/parsers/vasp';
describe('IncarParser', () => {
describe('parse()', () => {
it('should parse basic parameters', () => {
const input = 'ENCUT = 520\nISMEAR = 0';
const result = IncarParser.parse(input);
expect(result.success).toBe(true);
expect(result.data).toEqual({
ENCUT: 520,
ISMEAR: 0
});
});
it('should throw error on invalid input', () => {
const input = 'INVALID = abc';
expect(() => IncarParser.parse(input)).toThrow(ParseError);
});
});
});- Overall: ≥ 80%
- Critical paths (parsers, converters): ≥ 90%
- UI components: ≥ 70%
- Document all public APIs
- Use JSDoc/TSDoc for TypeScript
- Use docstrings for Python
- Include examples
- Update README.md for user-facing changes
- Update docs/ for detailed guides
- Add examples to docs/examples/
Update CHANGELOG.md:
## [Unreleased]
### Added
- New INCAR parser with validation
### Changed
- Improved POSCAR parsing performance
### Fixed
- Bug in Gaussian coordinate parsingOpenQC-VSCode/
├── .github/ # GitHub configs
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ └── workflows/ # CI/CD pipelines
├── docs/ # Documentation
│ ├── architecture/ # Architecture docs
│ └── api/ # API reference
├── src/ # TypeScript source
│ ├── parsers/ # File parsers
│ ├── converters/ # Format converters
│ ├── visualization/ # 3D rendering
│ └── ai/ # AI features
├── tests/ # Test suites
│ ├── unit/
│ ├── integration/
│ ├── e2e/
│ └── fixtures/
├── docs/project/PLAN.md # Project roadmap
├── docs/project/TDD-GUIDELINES.md # Testing guide
├── docs/project/TASK-MANAGEMENT.md # Task management
└── README.md # This file
- 💬 GitHub Discussions
- 🐛 GitHub Issues
- 📧 Email: support@newtontech.com
- 💬 Discord: Join our community
Contributors are recognized in:
- README.md contributors section
- Release notes
- GitHub contributors page
Thank you for contributing! 🎉
Agent-ready work must have a GitHub issue with a goal, acceptance criteria, required tests, and out-of-scope notes. Branches should use agent/issue-<number>-<slug>, and PR bodies must include Fixes #<issue-number>.
Before requesting review, run make format, make lint, make typecheck, make test, and make check. Code changes should include tests or an explicit no-test justification in the PR body.