66 Commits

Author SHA1 Message Date
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
Lacey Williams Henschel
2b4c0a9399 📝 Add options for skipping existing versions and passing an API token 2023-05-16 11:19:37 -07:00
Lacey Williams Henschel
488ca4d3ba Final command, docs, linter 2023-05-15 10:19:32 -07:00
Lacey Williams Henschel
eb0a6884b6 168 import versions (#295)
* WIP get old versions

* 🏦 Add URL and data dict to Version model

* 🔧 Some refactoring how we get tag data

* First pass at uploading versions

* 🔧 Move parsing logic to the parser and add tests

* Retrieve url and save json data

* Improve version upload docs

* Linter
2023-05-11 05:59:49 -07:00
Lacey Williams Henschel
37b56805b9 🔧 Improve catching duplicates 2023-03-27 13:32:00 -07:00
Lacey Williams Henschel
7ffa23164c 🔧 Refactor maintainers into GitHub process 2023-03-27 12:39:18 -07:00
Lacey Williams Henschel
87cb14e991 🔧 Refactor contributor methods into GitHub processes 2023-03-27 12:08:52 -07:00
Lacey Williams Henschel
60595cadca 🔥 Skip this check 2023-03-24 15:03:17 -07:00
Lacey Williams Henschel
c54fdcf26c 🔥 Dead code 2023-03-24 14:57:08 -07:00
Lacey Williams Henschel
0c62320304 🔧 Final refactoring and tests 2023-03-24 14:37:38 -07:00
Lacey Williams Henschel
d87b190bce 🔧 Shuffle more methods around into clearer classes 2023-03-24 11:11:29 -07:00
Lacey Williams Henschel
5801bc2cae 🔧 Add the user call to the GH client class 2023-03-24 11:02:50 -07:00
Lacey Williams Henschel
15ee8a6464 🚧 Abstract the API stuff into a class, refactoring 2023-03-24 10:59:33 -07:00
Lacey Williams Henschel
f19cb79e39 🚧 Light refactoring 2023-03-24 10:00:14 -07:00
Lacey Williams Henschel
8eaa78e2c9 🚧 Refactor GitHub API calls into own class 2023-03-23 13:21:09 -07:00
Lacey Williams Henschel
f7e71ade6e 🐛 Fix uploading libraries bug, views bug 2023-03-15 15:41:31 -07:00
Lacey Williams Henschel
597253addb 🔧 👕 Light refactor 2023-03-02 09:12:34 -08:00
Lacey Williams Henschel
0070a37e6c 🚧 Add function to get user from GH API 2023-02-16 09:54:40 -08:00