nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.73k stars 626 forks source link

Support for Azure DevOps repositories #1755

Closed t-neumann closed 3 years ago

t-neumann commented 4 years ago

New feature

Hi! Thanks for using Nextflow and submitting the proposal for a new feature or the enhancement of an existing functionality.

Please replace this text providing a short description of your proposal.

Usage scenario

Office365 is used by many research institutions and companies and comes naturally with free code hosting on Azure DevOps. Since GitHub, GitLabs and BitBucket is already supported, I was thinking it would be cool to also add support for Azure DevoOps repos.

Suggest implementation

My Groovy skills are mediocre - and this is even an overstatement. But I could look into it myself if you point me where to look.

pditommaso commented 4 years ago

It should not be too hard, you can look at the GitHub impl

https://github.com/nextflow-io/nextflow/blob/e94e6877c2dc9bed983e873b62e302a08843c891/modules/nextflow/src/main/groovy/nextflow/scm/GithubRepositoryProvider.groovy#L30-L99

t-neumann commented 4 years ago

Cool so I just derive the AzureDevOps class from `RepositoryProvider I guess.

I quickly looked through the methods, looks mostly straighforward except those two - what do they refer to?

/** {@inheritDoc} */
    @Override
    String getEndpointUrl() {
        "${config.endpoint}/repos/${project}"
    }

    /** {@inheritDoc} */
    @Override
    String getContentUrl( String path ) {
        "${config.endpoint}/repos/$project/contents/$path"
    }
pditommaso commented 4 years ago

These are the API endpoint to access the repository content. For example:

https://developer.github.com/v3/repos/contents/#get-a-repository-readme

There should be an equivalent for Azure I guess

t-neumann commented 4 years ago

I implemented it as far as I could and hardcoded URLs for testing purposes, crosschecking with the API results when entering it into the browser.

When testrunning it now, I run into an error pretty quickly:

./launch.sh pull quantrocode/slamseq -hub azure
Checking quantrocode/slamseq ...
WARN: Cannot read project manifest -- Cause: bad character in base64 value
bad character in base64 value

Any clue what is going on here?

I can create a PR if that helps to look at code - don't know what's the procedure here.

pditommaso commented 4 years ago

Too little to say. It looks some problem with base64 decoding.

To make a PR:

  1. create a new branch in your fork with the changes you did
  2. push the branch to your fork
  3. create a new (draft) pull request
t-neumann commented 4 years ago

Hi - created the PR and made the test repo that is hard-coded in the URLs public so no credentials are required.

t-neumann commented 4 years ago

Development for this continues in PR #1756

t-neumann commented 3 years ago

PR #1756 merged that resolves this feature request.