Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Conda Support #1019

Merged
merged 20 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
lamarrr marked this conversation as resolved.
Show resolved Hide resolved
* 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 })
qtomlinson marked this conversation as resolved.
Show resolved Hide resolved
Fixed Show fixed Hide fixed
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
lamarrr marked this conversation as resolved.
Show resolved Hide resolved
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