oeg-upm / soca

Software Catalog Creator. A repository that given an organization URL, it will create a software catalog for browsing all repositories
Apache License 2.0
11 stars 5 forks source link

soca card for private repo is not showing on portal #119

Open debkantap opened 2 months ago

debkantap commented 2 months ago

Hi, I created on private repo in my github user. I am unable to extract that private repo info in first generated csv file. Then I manually edited the csv file and added my private repo link in the csv file.

  1. Then configured the somef with my git token
  2. Ran the "soca extract -i debkantap.csv -o debkantap-metadata" It created the extraction folder for my added private repo
  3. then ran the "soca portal -i debkantap-metadata -o debkantap-portal --title 'debkantap git repos' its output says that, it generated card for my private repo, but portal is not showing the private repo card.

Please help.

TR Deb

dgarijo commented 2 months ago

Hello, we don't support private repos so far, sorry :(

debkantap commented 2 months ago

@dgarijo ..sure I understand.. In this case one can modify the portal generation code for their customize need . right? Is this in your roadmap?

TR Deb

dgarijo commented 2 months ago

@debkantap one can edit the JSON of the cards, or create their own program to expand it, indeed.

If you add an authentication token with access to the private repo, the program may work, but I have not tried it. If you try it please let us know how that works.

Private repos are not in the roadmap for now because soca is designed for creating public catalogs. If your repos are private, why would you want to create a public catalog to find the tool? I do not see the use case for now.

We are prioritizing other open issues on usability and tracking best practices.

debkantap commented 2 months ago

@dgarijo ..thanks ..sure will post here if I crack the auth token. From use case perspective, I wanted to have a extended internal devops dashboard where codes are hosted on private (on premise) gitlab, bit bucket or azure devops and I wanted to have a repo card portal internally hosted. Does this make sense? TR Deb

dgarijo commented 2 months ago

@debkantap yes it does make sense. For the authentication token, when you do somef configure it will ask you for one (it is stored in a local file in your machine). That token should allow you to do requests of more repos and it may allow you accessing private ones.

debkantap commented 2 months ago

Sure ..thanks @dgarijo!!

TR Deb

dgarijo commented 2 months ago

I will leave this issue open until it's addressed and the solution proposed above tested

debkantap commented 2 months ago

@dgarijo. I am able to generate card for private repo by editing the output files. This what I did:

  1. Ran the "soca fetch -i debkantap --user -o debkantap.csv -na"
  2. then edited the debkantap.csv file to add one line at last for my private repo
  3. Configured the somef for github token
  4. then ran "soca extract -i debkantap.csv -o debkantap-metadata"
  5. then ran "soca portal -i debkantap-metadata -o debkantap-portal --title 'debkantap git repos'"
  6. then inside "debkantap-portal" folder edited the "cards_data.json" file "recently_updated": 0, to "recently_updated": 10, If "recently_updated" is zero then that card is not shown in portal. For private repo this "recently_updated" is always zero.

This is my observation. Now can you help me to modify the code so that private repo this comes as non zero.

TR Deb

dgarijo commented 2 months ago

All right, this looks like a bug then. We'll have to look it up. Thanks for trying it out! Now we know it works with private repos too :)

dgarijo commented 2 months ago

Although the fetch should probably support configuring if you want private repos from an organization, which we don't do now

debkantap commented 2 months ago

Hi @dgarijo yes...I think there can be some parameters for private repo = yes/no.

In a different note can you pls explain the below parameters while configuring somef:

  1. Documentation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/description.p]:
  2. Invocation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/invocation.p]:
  3. Installation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/installation.p]:
  4. Citation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/citation.p]:
  5. Base URI for RDF generation [https://w3id.org/okn/i/]:

TR Deb

dgarijo commented 2 months ago
debkantap commented 2 months ago

thanks @dgarijo

Do you have any sample value for the 'Base URI' that I can try for. sorry I never did that!!

TR deb

dgarijo commented 2 months ago

If you don't know very well what it means, I recommend not using it. In theory, you should add a namespace you own that you can use to redirect to your own resources. I own https://w3id.org/okn/i/ and that is why it's the default. But you can add any URI you wish.

debkantap commented 2 months ago

thanks @dgarijo ..I think for generating the poral this can be used as default