83 Commits

Author SHA1 Message Date
daveoconnor
f65a5c72fc Add old version alert to docs views (#1795) (#1960) 2025-10-17 11:27:48 -07:00
daveoconnor
900d3ba583 Correct release report added counts (#1865) 2025-08-11 10:22:30 -07:00
daveoconnor
301aaeac31 Decouple release reports from releases (#1737) 2025-07-08 16:09:01 -07:00
Greg Kaleka
5610f14f4c Fix word cloud font issue and improve logs (#1747) 2025-04-12 19:36:40 -04:00
Foo Bar
a55111ca74 Use display_name for "username" instead of first_name, last_name (#1640) (#1638) 2025-03-03 11:03:49 -08:00
Greg Kaleka
d537985bb8 Schedule report tasks and add report preview view (#1620) 2025-02-10 11:22:17 -05:00
Brian Perrett
a08c01617a Add management command to run all necessary tasks after a release. (#1562) 2024-12-20 13:01:33 -08:00
Brian Perrett
2981976b80 Add functionality to track LibraryVersion dependencies (#1524) 2024-12-16 14:28:33 -05:00
Brian Perrett
860e1723cc Add logging within commit update task. (#1520) 2024-12-04 15:12:57 -08:00
daveoconnor
1d31bef1e4 Library Version Based CPP versions and descriptions (#1422) 2024-11-12 15:49:16 -05:00
Greg Kaleka
44829f1556 Add category override mapping and use it in library update method (#1411)
Fixes #1034

- Adds a `CATEGORY_OVERRIDES` mapping
- Uses the override in `update_libraries` management command

### Manual testing
- Ran `./manage.py import_versions`
- Ran `./manage.py update_libraries`
- Static String had the correct category
<img width="440" alt="Screenshot 2024-11-04 at 5 24 05 PM"
src="https://github.com/user-attachments/assets/4b0cf4cb-15e2-4337-9284-7659afd40643">

### Post-deploy tasks
- Ensure `update_libraries` is run
- Verify **Container** category is orphaned
- Delete **Container** category

Co-authored-by: Greg Kaleka <gkaleka@energy-solution.com>
2024-11-05 13:49:00 -05:00
Brian Perrett
d166f41aab The "authors" value can sometimes be a string. (#1406)
- In the case that it is a string, convert it to a list.
- fixes #1396
2024-10-31 12:28:27 -07:00
Brian Perrett
646f916ee6 Updates and additions to release report stats (#1401)
- Add basic line change counts for each x.x.0 library versions.
- import line change counts during `import_commits` task.
- Add `update_issues` management command for importing Issues for each
LibraryVersion.
- Add update issues runnable command in `Issue` admin.
- Build word cloud using mailinglist content.
- Update release report with new data.
2024-10-31 10:14:41 -07:00
Brian Perrett
e230128f61 Add authors to LibraryVersions. (#1347)
- fixes #1325
- reuses the logic that imports authors for libraries to do the same for
LibraryVersions.
- Authors are only added if an email is listed for the author in the
metadata
2024-10-10 10:39:16 -07:00
Brian Perrett
23ebe24273 Import commits for minor versions (#1332)
- Fixes #1327
- Commit import will ignore patch and beta versions.
2024-10-07 11:57:30 -07:00
Brian Perrett
48c09d3d5e Import commits per release and create release reports (#1263)
View stats per release, we do this by
doing log diffs between release tags. Ex: `git log
boost-1.78.0..boost-1.79.0`. The output is parsed and the commits
are saved with a foreign key to the `LibraryVersion` it relates to.

- commits are imported by doing "bare" clones (no project files, only
git data) of repos into temporary directories, as created by python's
bulitin `tempfile.TemporaryDirectory`
- Added Commit model
- Added CommitAuthor model
- Added CommitAuthorEmail model
  - One CommitAuthor can have many emails.
- Added task for importing commits. (and admin link to trigger it)
- Added task for importing CommitAuthor github data (avatar and profile
url, with admin link to trigger it)
- Added a basic Library stat page which can be viewed by going to the
admin -> library -> view stats.
- Added a `Get Release Report` button in the `LibraryAdmin` which allows
a staff member to select a boost version and up to 8 libraries to
generate a report for. The report is just a webpage which attempts to
convert cleanly to a pdf using the browser's print to pdf functionality.
- Updated the Library Detail page to show commits per release instead of
per month.
- Updated the Library Detail page to show `Maintainers & Contributors`
sorted by maintainers, then the top contributors for the selected
release, then the top contributors overall by commits descending.
- Removed CommitData, which was tracking monthly commit stats
2024-09-25 15:09:07 -07:00
Lacey Williams Henschel
468615dad8 Fix bug where commit counts for libraries were not being updated monthly as they should have been
- Remove the kwargs from the call to update_libraries
- Add placeholder task for commit counts
- Refactor to simplify the commit count logic and pull it out of the management command and into a task
- Adjust schedule
- Add a separate task to update current month commit counts
- Add CommitData to admin, and add functionality to update the CommitData from the admin via button, like other admin features
2024-02-12 11:32:09 -08:00
Lacey Williams Henschel
1ec2a039a3 Add logic to exclude chrono/stopwatch from libraries 2024-02-06 11:23:28 -08:00
Lacey Williams Henschel
214f37986b Streamline import commands and add docs
Add data JSONField to LibraryVersion model

Add fields to library list admin display

Add commands to update authors and maintainers individually

Exclude data JSONField from view querysets

Silence some output from the library-version import management command

Remove unused field from the library-version import management command

Save library-versions more cleanly in the library-version import management command

Remove loading maintainers from the import command, since they now have their own command

Add docs for new commands

Add boost_setup command to run one command to import all data

Add docs on first-time data import

Better exception handling, quieter flow, reduce GH API calls

Graceful handling if there is not a github repo

Pass most recent 12 months to commit counts command

Add some user-friendly output to setup command
2023-09-19 11:17:05 -07:00
Lacey Williams Henschel
87347c7f05 Remove first github release date; unused 2023-09-12 10:36:12 -07:00
Lacey Williams Henschel
4712551827 Improvements to import/update libraries command
- Remove outdated options, quiet some logging
- Don't add authors yet -- need to add maintainers first
- Add GitHub token option to update_libraries
2023-09-07 15:58:07 -07:00
Lacey Williams Henschel
edc335597e Add JSON data field to Library model, and save libraries.json data there 2023-09-07 15:58:07 -07:00
Lacey Williams Henschel
00e68cf219 Remove unused Library model fields 2023-09-01 08:16:33 -07:00
Lacey Williams Henschel
7e847cc17f - Move GitHub retrieval and parser classes to the core/ app from the libraries/ app; moved tests, too, and updated import statements
- Add `verbose` flag to `import_versions` to allow user to silence the output
- Removed some unused options from `import_versions`
- Moved the exclusion logic in `import_versions` to its own function
- Stop getting the `github_url` from the github API. Instead, generate it from the tag. (reason: in older tags, the best URL GitHub gives us is a less-useful one to a _commit_ and not a tag. We can generate the url, though.)
- Move the retrieval of the `release_date` to its own task, so it can be loaded async. (reason: it's a separate API call per version to get the date)
- Make `release_date` optional on the `Version` model (reason: make the field easier to load async)
- Simplify logic to retrieve `release_date` and just always retrieve it from the commit
- Stop loading the version `description` from GitHub. We don't use it on the frontend anyway, and in all but the most recent couple of versions, the `description` is the comment from the commit, which is usually not useful.
2023-08-31 15:32:16 -07:00
Lacey Williams Henschel
da1a28451d Skip time-consuming github data for local dev 2023-07-21 10:32:37 -07:00
Lacey Williams Henschel
9f5db36d3f Try to get the library-version repo with another field if it fails with the submodule name 2023-07-20 09:23:00 -07:00
Lacey Williams Henschel
dd039d20c2 Catch the error with version 1.61.0 2023-07-20 09:23:00 -07:00
Lacey Williams Henschel
b897e2d679 Explain an import error log 2023-07-20 09:23:00 -07:00
Lacey Williams Henschel
91a1936dcd Change monthly refresh to update only last month's commit counts 2023-07-10 06:22:36 -07:00
Lacey Williams Henschel
0c6593fdfa Improve locating author records 2023-07-10 06:22:36 -07:00
Lacey Williams Henschel
f8475f1009 Refactor to fetch API commit data in method that adds the CommitData objects 2023-07-10 06:22:36 -07:00
Lacey Williams Henschel
b26c319bb0 Fix bug related to getting tag info in get_ref 2023-07-10 06:22:36 -07:00
Lacey Williams Henschel
f82d299559 Refactor to make update methods simpler, remove duplicate method 2023-07-10 06:22:36 -07:00
Natalia
8a9af8a137 Fixed code style issues. 2023-06-16 22:04:04 -03:00
Lacey Williams Henschel
688ae87e76 Add methods to retrieve adoc content for libraries
(Part of #394 and #252)

- Add method to the GitHub API class to retrieve a specific file from a repo by its tag and path (to retrieve README or adocc files)
- Add method to Library model to retrieve the description content and render it
- Fail gracefully if no content is found
- Add caching logic for redis and database caching
2023-06-15 15:08:42 -07:00
Natalia
a8cd8f507a Ran pre-commit run -a
Completed runs of black and rest of pre-commit checks.
2023-05-30 23:21:53 -03:00
Lacey Williams Henschel
ccf21dffa5 Better paging logic 2023-05-26 09:48:55 -07:00
Lacey Williams Henschel
bd6d229248 Minor bugfixes 2023-05-26 09:48:55 -07:00
Lacey Williams Henschel
5115efd421 Add method to save commit data to model 2023-05-26 09:48:55 -07:00
Lacey Williams Henschel
f3fbe63827 Refactor get_commits to include dates 2023-05-26 09:48:55 -07:00
Lacey Williams Henschel
9dee6b0e5c Add methods to get number of commits per month 2023-05-26 09:48:55 -07:00
Lacey Williams Henschel
3d17a9ce3c 🔧 Minor refactor, bugfix 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
fdc7fce1e8 📝 Update field names 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
649b7add15 Minor corrections 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
04ecc158d0 🏦 Add date field, save date 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
90f2cc8e06 📝 Fix docstring 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
233d87bc71 Add method to get date first tag for library 2023-05-19 12:55:02 -07:00
Lacey Williams Henschel
480dd2422e Add default val 2023-05-18 09:25:20 -07:00
Lacey Williams Henschel
2499c4891e Style changes, changes per PR review 2023-05-18 09:25:20 -07:00
Lacey Williams Henschel
dedd103807 Add command to import library-versions 2023-05-18 09:25:20 -07:00