Skip to content

Commit

Permalink
[conda] refactoring and added info to schema and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Basit Ayantunde committed Feb 9, 2024
1 parent b1a85e8 commit f47143d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
15 changes: 15 additions & 0 deletions docs/determining-declared-license.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,18 @@
* source: https://cocoapods.org/
* The service then sets the declared license based on the registry information
* The ClearlyDefined summarizer pulls registry information from 'https://raw.githubusercontent.com/CocoaPods/Specs/master

### anaconda-main
* source: https://repo.anaconda.com/
* The crawler gets registry information from https://repo.anaconda.com/pkgs/main
* The ClearlyDefined summarizer sets the declared license to the license(s) in the registry information

### anaconda-r
* source: https://repo.anaconda.com/
* The crawler gets registry information from https://repo.anaconda.com/pkgs/r
* The ClearlyDefined summarizer sets the declared license to the license(s) in the registry information

### conda-forge
* source: https://conda.anaconda.org
* The crawler gets registry information from https://conda.anaconda.org/conda-forge
* The ClearlyDefined summarizer sets the declared license to the license(s) in the registry information
10 changes: 5 additions & 5 deletions routes/originConda.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ async function fetchCondaChannelData(channel) {

async function fetchCondaRepoData(channel, subdir) {
const key = `${channel}-${subdir}-repoData`
let channelData = condaCache.get(key)
if (!channelData) {
let repoData = condaCache.get(key)
if (!repoData) {
const url = `${condaChannels[channel]}/${subdir}/repodata.json`
channelData = await requestPromise({ url, method: 'GET', json: true })
condaCache.put(key, channelData, 8 * 60 * 60 * 1000) // 8 hours
repoData = await requestPromise({ url, method: 'GET', json: true })
condaCache.put(key, repoData, 8 * 60 * 60 * 1000) // 8 hours
}
return channelData
return repoData
}

router.get(
Expand Down
5 changes: 5 additions & 0 deletions schemas/coordinates-1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"type": {
"enum": [
"npm",
"conda",
"condasrc",
"crate",
"git",
"maven",
Expand All @@ -32,8 +34,11 @@
},
"provider": {
"enum": [
"anaconda-main",
"anaconda-r",
"npmjs",
"cocoapods",
"conda-forge",
"cratesio",
"github",
"gitlab",
Expand Down
6 changes: 6 additions & 0 deletions schemas/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ components:
example:
- git/github/microsoft/redie/194269b5b7010ad6f8dc4ef608c88128615031ca
- npm/npmjs/-/redie/0.3.0
- conda/conda-forge/linux-64/21cmfast/3.1.1-py36

noticeFile:
type: object
Expand Down Expand Up @@ -531,6 +532,8 @@ components:
type: string
enum:
- composer
- conda
- condasrc
- crate
- deb
- debsrc
Expand All @@ -551,7 +554,10 @@ components:
schema:
type: string
enum:
- anaconda-main
- anaconda-r
- cocoapods
- conda-forge
- cratesio
- debian
- github
Expand Down

0 comments on commit f47143d

Please sign in to comment.