mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
- Split import version into own task - Add beta field to Version model - Add task to import most recent beta version - Accommodate beta releases in Artifactory downloads - Fix bug in getting proper download files for beta releases - Add ability to delete old beta versions when importing new beta version - Hide release notes link for beta releases - Comment why we don't get old downloads - Add management command to get most recent beta release - Add beta import to boost setup command - Add docs on beta release import - Get newest beta release when importing releases - Add manager method to get most recent beta release - Skip a couple failing tests after confirming behavior is working as expected
2.9 KiB
2.9 KiB
Populating the Database for the First Time
This document contains information about importing Boost Versions (also called Releases), Libraries, and the data associated with those objects. It is concerned with importing data in deployed environments, but at the bottom of the page there is a section on importing data for local development.
Deployed Environments
There are several steps to populating the database with historical Boost data, because we retrieve Boost data from multiple sources.
You can run all of these steps in sequence in a single command with the command:
./manage.py boost_setup
The boost_setup command will run all of the processes listed here:
# Import Boost releases
./manage.py import_versions
# import_versions also runs import_artifactory_release_data
# Import Boost libraries
./manage.py update_libraries
# Save which Boost releases include which libraries
./manage.py import_library_versions
# import_library_versions retrieves documentation urls, so boost_setup
# doesn't run import_library_version_docs_urls
# Save other data we need for Libraries and LibraryVersions
./manage.py update_maintainers
./manage.py update_authors
./manage.py import_commit_counts
# Get the most recent beta release, and delete old beta releases
./manage.py import_beta_release --delete-versions
Read more aboout these management commands.
Collectively, this is what these management commands accomplish:
import_versions: Imports Boost releases asVersionobjects, and imports links to Boost downloads hosted on Artifactory.update_libraries: Imports Boost libraries and categories asLibraryandCategoryobjects.import_library_versions: Establishes which Boost libraries are included in which Boost versions. That information is stored inLibraryVersionobjects. This process also stores the link to the version-specific Boost documentation for this library.update_maintainers: For eachLibraryVersion, saves the maintainers asUserobjects and makes sure they are associated with theLibraryVersion.update_authors: For eachLibrary, saves the authors asUserobjects and makes sure they are associated with theLibrary.import_commit_counts: For eachLibrary, uses information in the GitHub API to save the last 12 months of commit history. OneCommitDataobject per library, per month is created to store the number of commits to themasterbranch of that library for that month.import_beta_release: Retrieves the most recent beta release from GitHub and imports it. If--delete-versionsis passed, will delete the existing beta releases in the database.
Further Reading
- Syncing Data about Boost Versions and Libraries with GitHub
- Read more aboout the management commands you see here.