We're so thankful you're considering contributing to an open source project of the U.S. government! If you're unsure about anything, just ask -- or submit the issue or pull request anyway. The worst that can happen is you'll be politely asked to change something. We appreciate all friendly contributions.
We encourage you to read this project's CONTRIBUTING policy (you are here), its LICENSE, and its README.
If you're new to the project, look for issues labeled with good-first-issue or help-wanted to get started. These are typically easier problems that don't require deep knowledge of the codebase.
For more information on how to connect to the API implemented here, check out our developer documentation. You can also check out our Google Group for community discussions.
The Blue Button Web Server project is maintained by the CMS team and welcomes contributions from external developers. Please review our COMMUNITY.md file for details on team structure, roles, and responsibilities. All contributors should be familiar with OAuth2, FHIR standards, and Django development practices.
These instructions provide a quick start for developers new to the project. You'll need Python 3, pip, and some system-level dependencies.
System Requirements:
- Python 3.x
- pip and pip-tools
- C headers and development tools
Ubuntu/Debian example:
sudo apt-get install python3-dev libxml2-dev libxslt1-devMac Homebrew example:
brew install python libxml2 libxsltFor other operating systems: Install equivalent development packages for your platform.
Follow these steps to set up your development environment:
# Clone the repository
git clone https://github.com/CMSGov/bluebutton-web-server.git
cd bluebutton-web-server
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install --upgrade pip
pip install pip-tools
pip install -r requirements/requirements.dev.txtConfigure your environment: Copy the environment variables from .env.example to .env, editing what you need to for your local settings. Other environment variables used in the codebase are available in the docker-compose directory, in the different.env files. Please ensure to create and use your own keys and secrets.
Initialize the database:
python manage.py migrate
python manage.py loaddata apps/accounts/fixtures/groups.json
python manage.py createsuperuser
python manage.py create_admin_groups
python manage.py create_blue_button_scopes
python manage.py create_test_user_and_applicationOptional - Certificate setup: If your backend FHIR server requires x509 certificates:
mkdir ../certstore
# Copy both x509 files (in PEM format) to certstore directoryRun the development server:
python manage.py runserverFor a containerized development environment, see instructions in docker-compose/readme.md.
The majority of the styling this project uses is found within the static/ folder. This includes swagger, design-system, font-awesome, and a previously separate repository of scss called bluebutton-css.
To work with and build styles locally:
cd static/bluebutton-cssYou'll need to make sure you have NodeJS installed. Click here to find out more about NodeJS. Once you have NodeJs installed, run:
npm iTo export the CSS once, run:
npm run gulpTo watch the SCSS files for changes, run:
npm run gulp watchWe follow standard GitHub Flow practices:
- Fork the project (external contributors) or create a branch (internal contributors)
- Check out the
masterbranch - Create a feature branch with a descriptive name
- Write code and tests for your change
- From your branch, make a pull request against
CMSGov/bluebutton-web-server/master - Work with repo maintainers to get your change reviewed
- Wait for your change to be merged into
master - Delete your feature branch after successful merge
Running Tests:
- For details on how to run tests, please review the testing section in the ops/containers README
Test Requirements:
- Write tests for new functionality
Style Guidelines:
- Write clear, self-documenting code with appropriate comments
Linting:
- Each application has its own linting guidelines
When creating an issue, please use this format:
module-name: One line summary of the issue (less than 72 characters)
### Expected behavior
As concisely as possible, describe the expected behavior.
### Actual behavior
As concisely as possible, describe the observed behavior.
### Steps to reproduce the behavior
1. List all relevant steps to reproduce the observed behavior
2. Include specific API calls, user actions, or configuration
3. Mention any relevant environment details
### Additional context
- Django version
- Python version
- Operating system
- Any relevant logs or error messages
See our .github/ISSUE_TEMPLATE.md for more examples.
Pull Request Guidelines:
- File pull requests against the
masterbranch - Include a clear description of changes
- Reference any related issues
- Ensure all tests pass
- Include screenshots for UI changes
Review Process: The repository on GitHub is kept in sync with an internal repository at github.cms.gov. For the most part this process should be transparent to the project users, but it does have some implications for how pull requests are merged into the codebase.
When you submit a pull request on GitHub, it will be reviewed by the project community, and once the changes are approved, your commits will be brought into github.cms.gov's internal system for additional testing. Once the changes are merged internally, they will be pushed back to GitHub with the next sync.
We welcome improvements to the project documentation. This includes:
- API documentation updates
- Setup and configuration guides
- Developer tutorials
- Code comments and inline documentation
Please file an issue for documentation improvements or submit a pull request with your changes.
Documentation Resources:
- Developer documentation: https://cmsgov.github.io/bluebutton-developer-help/
- Current deployment: https://sandbox.bluebutton.cms.gov
- Community discussions: https://groups.google.com/forum/#!forum/developer-group-for-cms-blue-button-api
We adhere to the CMS Open Source Policy. If you have any questions, just shoot us an email.
Submit a vulnerability: Vulnerability reports can be submitted through Bugcrowd. Reports may be submitted anonymously. If you share contact information, we will acknowledge receipt of your report within 3 business days.
For more information about our Security, Vulnerability, and Responsible Disclosure Policies, see SECURITY.md.
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.