aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model
Commit message (Collapse)AuthorAge
* Add a new page to show package versions available on a branchChristopher Baines2019-09-27
| | | | | This is useful when looking back through history at what package versions were previously available.
* Tweak the textual search to rank exact name matches higherChristopher Baines2019-09-26
| | | | | | | | Previously, if you searched for packages like Ruby or Guile, the actual Ruby and Guile packages would be low in the rankings, as the terms Ruby or Guile don't appear much in the descriptions. Therefore, change the ordering to make these exact matches appear higher up.
* Use numeric ids for git repositoriesChristopher Baines2019-09-05
|
* Use numbers for ids in the derivation modelChristopher Baines2019-09-05
| | | | | As this is easier to handle when doing queries with PostgreSQL, as you can use the type information to determine how to handle the values.
* Fix data input for package-metadataChristopher Baines2019-09-05
| | | | | Represent non-string home pages as NULL, and delete duplicates, as package metadata entries can be duplicated.
* Improve error handling for insert-missing-data-and-return-all-idsChristopher Baines2019-09-05
|
* Support deleting duplicates in insert-missing-data-and-return-all-idsChristopher Baines2019-09-05
| | | | | | This is useful when you want to pass in data with some duplicates, and get back a list of ids, where the duplicate entries are represented by the same id.
* Improve the package and package-metadata modulesChristopher Baines2019-09-05
| | | | | | | Add tests around the package module, extract out the use of the inferior-package record assessors so that they aren't part of the tests, and switch across the package-metadata module to use insert-missing-data-and-return-all-ids.
* Start handling ids as numbers, rather than stringsChristopher Baines2019-09-05
| | | | | | | | | squee, returns all data as strings, and expects strings as inputs to queries. So, keeping the ids as strings was easy initially, but it means that you can't tell from the type whether it should be quoted, or not... Therefore, handle ids as strings, converting them to numbers when they're fetched from the database, and back to strings as part of the queries.
* Reduce code duplication in the package moduleChristopher Baines2019-09-05
| | | | By using insert-missing-data-and-return-all-ids.
* Reduce code duplication in the package-derivation moduleChristopher Baines2019-09-04
| | | | Through using insert-missing-data-and-return-all-ids.
* Change license code to use insert-missing-data-and-return-all-idsChristopher Baines2019-09-04
| | | | As this now supports inserting sets of data.
* Improve insert-missing-data-and-return-all-idsChristopher Baines2019-09-04
| | | | | | Use exec-query-with-null-handling to distinguish NULL values, change it to just take a list of fields and remove the handlers. Also, add a sets-of-data? parameter so that this can be used licenses.
* Change normalise-database-values to normalise-valuesChristopher Baines2019-09-02
| | | | As these values are not from the database, which is why they're not strings.
* Add lint warnings to the package pageChristopher Baines2019-09-01
|
* Support filtering lint warnings by linterChristopher Baines2019-09-01
|
* Add lint-checkers-for-revision to the lint-checker moduleChristopher Baines2019-09-01
|
* Add a new table guix_revision_lint_checkersChristopher Baines2019-09-01
| | | | | | | | | To associate a set of lint checkers with a specific revision. While there is the association through the lint warnings, that only works for checkers where there are lint warnings for that revision. Therefore, to allow finding all the checkers for a specific revision, also associate them directly with the revision.
* Handle a change in guix with the <derivation-input> recordChristopher Baines2019-09-01
| | | | | | | | The first field is now a <derivation> record, rather than a store path for the derivation. It's probably not necessary to cope with two versions, but this is what I've done currently.
* Add lint-warnings-for-guix-revision to the lint-warning moduleChristopher Baines2019-09-01
|
* Add lint-warning-count-by-lint-checker-for-revisionChristopher Baines2019-09-01
| | | | | To return counts of lint warnings, grouped by lint checker for a specific revision.
* Store lint warnings in the databaseChristopher Baines2019-09-01
| | | | | | | | | | This commit adds the relevant tables and code to store lint warnings in the database. Currently, only lint checkers which don't require access to the network will be run, as this allows the processing to happen without network access. Also, this functionality won't work in older versions of Guix which don't expose the lint warnings in a compatible way.
* Add insert-missing-data-and-return-all-ids to the model utils moduleChristopher Baines2019-08-31
| | | | | This should help greatly with populating the database with new entries, and greatly reduce code duplication.
* Use $STR$ for better quoting in quote-stringChristopher Baines2019-08-31
|
* Add value->sql-boolean to (guix-data-service model utils)Christopher Baines2019-08-31
|
* Fix insert-guix-revision to return an idChristopher Baines2019-08-31
| | | | Rather than an id wrapped in a list.
* Fix some duplicated values in tablesChristopher Baines2019-08-04
| | | | | | | | | | | | | The licenses table, along with the package_metadata table had duplicate values. This could happen as the unique constraints on those tables didn't properly account for the nullable fields. The duplicates in those tables also affected the license_sets, packages, package_derivations tables in a similar way. Finally, the guix_revision_package_derivations table was also affected. This commit adds a migration to fix the data, as well as the constraints. THe code to populate the licenses and package_metadata tables is also updated.
* Add a function to get the cgit URL bases for revisionsChristopher Baines2019-07-29
| | | | To enable adding a link to cgit to the comparison page.
* Fix the latest-processed-revision pagesChristopher Baines2019-07-27
|
* Show links to the cgit pages for repositories on the index pageChristopher Baines2019-07-22
|
* Link from a revision to the git repository pageChristopher Baines2019-07-19
|
* Improve how repositories and branches are handledChristopher Baines2019-07-19
| | | | | Make the link between repositories and branches clearer, replacing the /branches and /branch pages by /repository/ and /repository/*/branch/* pages.
* Fix a bug where the list of 0 licenses wasn't handled correctlyChristopher Baines2019-07-12
| | | | | This happened for a package with #f as the licenses. That's incorrect, but try to handle it without erroring.
* Use revision labels on the index page as wellChristopher Baines2019-06-19
| | | | | Also flip the branch and revision columns around, and add date information to the branch column.
* Add labels to revisions on the branches and branch pagesChristopher Baines2019-06-19
| | | | | And always link to the revision page. Now the label let's you know if you should expect information or not for that revision.
* Use line buffering for the input and output portsChristopher Baines2019-06-17
| | | | | As these are used for logging, which is done on a line by line basis. Remove the now redundant calls to (force-output).
* Support accessing the latest processed revision for a branchChristopher Baines2019-06-13
| | | | | | This makes is easier to get the latest data for a branch in a single request, rather than making one request to find the latest revision, then another to get the data.
* Don't show failing jobs on the index pageChristopher Baines2019-06-13
| | | | | | I'm not sure quite how to treat these yet, but for now, just stick with the previous behaviour of showing revisions which haven't been processed yet, along with the ones that have been successfully processed.
* Add more detailed new revision job handlingChristopher Baines2019-06-02
| | | | | | | | Create a new events table for the new guix revision jobs, and update this when processing a job starts, as well as finished with success or failure. Additionally, remove the dependnency on open-inferior/container, as this functionality isn't merged in to Guix master yet.
* Add git-branches-with-repository-details-for-commitChristopher Baines2019-05-18
| | | | | To get git repository and git branch information suitable for the revision page.
* Add a utility to group list valuesChristopher Baines2019-05-18
| | | | This is useful for some queries with duplicated parts of the results.
* Allow specifying the fields on the packages pageChristopher Baines2019-05-16
| | | | | This is mostly for the JSON output, as it allows much more information to be included.
* Fix how email dates are inserted in to PostgreSQLChristopher Baines2019-05-16
| | | | | Previously, the timezone was stripped off, so the timestamps were off. This commit changes the code to use a Unix timestamp, which avoids this issue.
* Store license information for packagesChristopher Baines2019-05-15
| | | | | | | | | | And display this on the package page. This uses a couple of new tables, and an additional field in the package_metadata table. Currently, the order of the licenses in the package definition isn't stored, as I'm not sure the order in the list is significant.
* Fix type issues with the location idsChristopher Baines2019-05-14
| | | | | | | | On one code path, they were handled as numbers, whereas elsewhere they were handled as strings. This led to the package-metadata code trying to insert duplicate entries. Instead, just handle them as strings everywhere.
* Order the all-git-repositories resultsChristopher Baines2019-05-13
| | | | So at least they're stable.
* Store and display the location of packagesChristopher Baines2019-05-13
| | | | | | | Store the location a package can be found at, and display this on the package page. If available, link off to the git repository containing the package.
* Add a function for searching for packagesChristopher Baines2019-05-12
|
* Add some basic pagination to the packages pageChristopher Baines2019-05-12
| | | | | Lower powered devices will have problems displaying all ~9000+ packages, so return a smaller number by default.
* Remove the sha1_hash from the package_metadata tableChristopher Baines2019-05-12
| | | | | | | | I'm thinking about adding more fields to this table, and the sha1_hash values will make this tricker. Therefore, remove the value, and adjust the existing code to cope. This commit also adds a new test which coveres some of the changed functionality.