Hosting Python package in Azure DevOps Guide. Setup/Build/Deploy/Install

Поділитися
Вставка
  • Опубліковано 20 сер 2024

КОМЕНТАРІ • 109

  • @crystyxn
    @crystyxn Рік тому +4

    Really nice video! As you say, in a big company, most of the obstacles are access related. In my case, I wasn't able to create a feed or even upload to an existing one due to not having permissions 🤣, but up until that point I got everything else working just fine with your help! when I get unstuck I'm sure I can continue with the rest of the pipeline

  • @naovaleosalque
    @naovaleosalque 10 місяців тому +1

    Thanks bro, 2 years old video, but still helpfull!

  • @ChichiLikesFood
    @ChichiLikesFood 3 роки тому +3

    Amazingly clear and to the point, have my thumb up you good man.

    • @RawCoding
      @RawCoding  3 роки тому

      thank you for watching )

  • @shanenleen
    @shanenleen 2 роки тому +2

    Clear & concise!
    This helped me a lot. Thanks!

  • @arkhej
    @arkhej 9 місяців тому +1

    Thank you so much for teaching this kind of topic!

  • @479shan
    @479shan 2 роки тому +2

    amazing video, so clear in each and every step.

  • @kirakoehnle
    @kirakoehnle 2 роки тому

    Very nice and superhelpful. And very funny at the end with the "pring" ;)

  • @davidsonsilva7636
    @davidsonsilva7636 6 місяців тому +1

    Nice. Had some change on Azure Portal but the example work yet!!! Tks.

    • @TheRavi24
      @TheRavi24 4 місяці тому

      Hi @davidsonsilva7636 please can you tell me I am stuck where dependencies are failing

  • @abhijitroychoudhury6061
    @abhijitroychoudhury6061 2 роки тому +1

    Thanks for the video ! Very clearly explained and a lot more helpful

    • @RawCoding
      @RawCoding  2 роки тому

      Thank you for watching

  • @akanshgoswami4899
    @akanshgoswami4899 2 роки тому +1

    Thanks a lot !!!!
    Clear and to the point

  • @grimmersnee
    @grimmersnee 2 роки тому +1

    this helped me a lot, thanks. You should do more Python tuts

    • @RawCoding
      @RawCoding  2 роки тому +1

      What would you like to see about python?

    • @mission_possible
      @mission_possible Рік тому

      @@RawCoding Please make videos on stuff related to azure devops using python..😊

  • @simonecammarano1782
    @simonecammarano1782 11 місяців тому

    Thank you very much! this video has been very useful, great job! :)

  • @DevJoeCoe
    @DevJoeCoe Місяць тому +1

    Do you know how I would you set up that pip.ini on the azure pipeline build server? I want to deploy my custom python library to my azure function app. I have a azure build and release pipeline to push my function apps to the server but it would obviously fail if i try to pip install a custom python library without the pip.ini.

  • @MrTheyosyos
    @MrTheyosyos Рік тому +1

    MORE PYTHON :) great video

  • @yevhenkiriyanov4387
    @yevhenkiriyanov4387 2 роки тому +1

    thank you! it is a great manual

    • @RawCoding
      @RawCoding  2 роки тому

      thank you for watching

  • @IamBaghel
    @IamBaghel 2 місяці тому

    Amazing !!

  • @TeaStrums
    @TeaStrums 5 місяців тому

    Super helpful video, thanks for explaining! Quick question, did you ever explain why you set the scope to organization instead of project at 15:10?

  • @harshitgupta3706
    @harshitgupta3706 Місяць тому +1

    Amazing! Thankyou.
    One question, how can we have automatic versioning for the build artifacts?

    • @RawCoding
      @RawCoding  Місяць тому

      You could use something like gitversion.net/

  • @wennie2939
    @wennie2939 2 роки тому +1

    Best video ever!

  • @digimoral
    @digimoral Рік тому +1

    When using poetry to install dependencies from an artifact feed, I get authentication failures, even when adding the feed with a PAT. Permissions are also set correctly, as far as I can tell. Any tipps?

  • @clippysnips
    @clippysnips Рік тому +1

    I got the error 403 error and tried to add project-scoped build but I couldn't find the three dots option in the feed settings. Any way I can resolve this issue? Thanks :)

  • @sulfibashy
    @sulfibashy Рік тому +1

    Hi, Nice video, But do you have any idea on 400 Request - Could not parse PyPI version ?

  • @criscros22
    @criscros22 2 роки тому

    Very clear thank you !

  • @adamgomes2706
    @adamgomes2706 2 роки тому

    Super helpful! Tanks!

  • @fc1984fc
    @fc1984fc 2 роки тому +1

    I'm assuming that all the shenanigans happening before the install is successful need to happen for any user wanting to install this package. Correct?

    • @RawCoding
      @RawCoding  2 роки тому

      Yes, you are connecting to a private feed (private server)

  • @janakibrit8109
    @janakibrit8109 Рік тому +1

    Hello! Thank you for the video, it was very useful. I have a question: If my repo contains many packages and sometimes packages that use other packages. How do I build them into artifacts using one pipeline?

    • @RawCoding
      @RawCoding  Рік тому +1

      You’ll have to specify those local packages as dependencies in the toml or setup file.

  • @jenniferklemisch585
    @jenniferklemisch585 2 роки тому +1

    This video is great - thank you for the clear explanation and actual walkthrough. Would you do a video or give instructions of how to add the credentials (min 23:05) into a conda.yaml or requirments.txt file that is then pushed to Azure ML with Environment.from_conda_specification to create an AMLS environment? Thanks in advance.

    • @RawCoding
      @RawCoding  2 роки тому

      Heya not sure what conda is but you’d place you credentials (secret) in the azure library variables. And then you can use that variable in a pipeline

  • @TheGreatAkhillis
    @TheGreatAkhillis 2 роки тому +3

    Thanks for the video mate, very useful!!
    I have one question though, how do you manage automating the version number of your package, without manually modifying it each time in the setup.py?
    I have seen that it's possible to do it with bump2version, but I didn't find a way to integrate it to my CI Pipeline.

    • @RawCoding
      @RawCoding  2 роки тому +1

      There are azure pipelines parameters that you can use, for example the build number

  • @abhishekmishra285
    @abhishekmishra285 2 роки тому +1

    Good one

  • @KailasSwami
    @KailasSwami Рік тому +1

    after restart the server got an issue like import error? and need some external command in SSH then it works so please guide me

    • @RawCoding
      @RawCoding  Рік тому

      Where would you like to go?

    • @KailasSwami
      @KailasSwami Рік тому

      @@RawCoding got failed to building wheel for dlib.

  • @dhanushnarayanan7524
    @dhanushnarayanan7524 2 роки тому +1

    what i need to do if I need to add other dependencies for ex: azure packages/requirement.txt file which i have stored inside src/example.

    • @RawCoding
      @RawCoding  2 роки тому

      Sorry I don't quite understand, you just want a requirement.txt for dependencies in you package?

  • @sau002
    @sau002 Рік тому

    Nice video.

  • @timoxa_dev
    @timoxa_dev 3 роки тому +1

    Спасибо!)

  • @fc1984fc
    @fc1984fc 2 роки тому +1

    Why did you build the package locally when the code you committed does not contain the dist-info folder? Was it just to show how it's done?

    • @RawCoding
      @RawCoding  2 роки тому +1

      It’s a demonstration, if you can do something locally you can make a remote computer do it as well.

  • @abdelrahmanshouman8341
    @abdelrahmanshouman8341 2 роки тому +1

    I am facing the issue below when running the pipline
    ##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form (I removed the link because youtube keeps deleting my comment)
    Pool: Azure Pipelines
    Image: ubuntu-latest
    Started: Today at 2:20 PM
    Duration: 12m 5s
    According to stackoverflow, this is due to a restriction imposed by Microsoft on both private and public projects.
    Nevertheless, I am seeing some recent comments here from people who seem to have not faced this issue.
    I am not sure if you came across this issue before or if you have a fix for it (other than contacting Microsoft's team directly)

    • @RawCoding
      @RawCoding  2 роки тому +1

      Check that you do NOT have a public repository.

    • @abdelrahmanshouman8341
      @abdelrahmanshouman8341 2 роки тому

      ​@@RawCoding I think you meant a private project. If so, I do in fact have a private project. This StackOverflow link (a/66791725/1831518) , mentions that private projects might face this issue as well.
      As a temporary workaround, I built the package locally (like you did at the beginning of the video) then used twine to upload to Azure artifacts. After that, I followed along your tutorial and it worked like a charm so many thanks.
      Now I am going to try to import the library into Azure Functions and see if it works

    • @RawCoding
      @RawCoding  2 роки тому +1

      I’ve only seen that issue with public repos if they happen for both that’s a bit of a bummer

    • @DanielWeikert
      @DanielWeikert 2 роки тому

      @@RawCoding ok that sucks, I have it in a private repo

  • @shahrukhnaveed2050
    @shahrukhnaveed2050 2 роки тому

    Hi, I guess python packaging documentation has changed, and there is no need to create a setup file anymore, right?

  • @samerrkhann
    @samerrkhann 2 роки тому +1

    Could you tell which agent are you using? is it a self hosted or MS agent?

    • @RawCoding
      @RawCoding  2 роки тому

      Think it was ms can’t remember

  • @youssoufcoulibaly2872
    @youssoufcoulibaly2872 2 роки тому +1

    Hi Raw Coding, thank you for the post. I am having some issues with CmdLine. I keep getting the following error:
    Forbidden - User '6aad9f02-8bee-4eac-98d3-76f400db356c' lacks permission to complete this action. You need to have 'ReadPackages' or 'AddPackages'.
    Your assistance will be greatly appreciated.

    • @RawCoding
      @RawCoding  2 роки тому +1

      Looks like the token you generated for the login doesn’t have the permissions. Create a new token

    • @youssoufcoulibaly2872
      @youssoufcoulibaly2872 2 роки тому +1

      Thank you so much. I found the issue. Limit job authorization scope to current project for non-release pipelines was disabled. I enabled it and now I am was able to deploy pipelines. I really find your tutorial very rich in content. Greatly appreciated by all here I am sure.

    • @youssoufcoulibaly2872
      @youssoufcoulibaly2872 2 роки тому +1

      @@RawCoding
      You are a life saver :)

    • @RawCoding
      @RawCoding  2 роки тому +2

      No worries, consider saying thank you by supporting me on patreon.

    • @mansishelar3553
      @mansishelar3553 Рік тому

      Can you please explain in detail what exactly you did in Limit authorization scope to current project for non-release pipeline.

  • @michaelmcmanus2186
    @michaelmcmanus2186 Рік тому +1

    PRING!!!!! 😂

  • @hemantshrivastava2703
    @hemantshrivastava2703 2 роки тому +1

    @Raw Coding - its really a nice video explaining a lot of details , but in the scenarios where we need to install the python package directly on build server in Azure DevOps , how can we achieve that ?

    • @RawCoding
      @RawCoding  2 роки тому

      We do it the same way we did with packages required to build our package.

    • @hemantshrivastava2703
      @hemantshrivastava2703 2 роки тому +1

      @@RawCoding how can we create a virtual environment on MS provided build server and then create/update an ini file over there and install it . Apologize to put this direct questions but I am searching this for a while and didn't got any corect answer.
      I want to install python package from Azure Artifact on build server . And then use it for further processing.

    • @RawCoding
      @RawCoding  2 роки тому

      You do it the same way you do it locally

    • @hemantshrivastava2703
      @hemantshrivastava2703 2 роки тому +1

      @@RawCoding sorry I am not getting it , can you help me with an example or an article which I can follow .. I am new to this stuff .
      Its an MS build agent.

    • @RawCoding
      @RawCoding  2 роки тому

      sudo apt-get -y install python3-virtualenv
      virtualenv -p python3.7 venv
      source venv/bin/activate

  • @evgenyselensky4036
    @evgenyselensky4036 2 роки тому +1

    Thank you for a very informative video. I am stuck at the uploading stage. My artifacts are very small in size: 16-18K, there's two of them in my dist folder, one is the actual tar.gz and the other one is ending in py3-none-any.whl. I am doing twine upload --verbose but it is not giving me much in terms of extra info. It is just spinning forever trying to upload these two small files. I was wondering if you could suggest anything. Thanks!

    • @RawCoding
      @RawCoding  2 роки тому +1

      If it’s spinning I’d expect it to be a connection issue. Double check url/credentials

    • @evgenyselensky4036
      @evgenyselensky4036 2 роки тому +1

      @@RawCoding Thanks, will do. But earlier I was getting a 404, now I am not, which sort of suggests it finds the URL ok now. Permissions need to be checked, yes.

    • @evgenyselensky6947
      @evgenyselensky6947 2 роки тому +1

      Hi, I confirm that this was a permission issue. In the pypirc file in the section where I point to the feed as per video, I had to specify on a separate line username: and on the next line password: . Great stuff, thanks very much, Raw Coding!

  • @fabioferreira4266
    @fabioferreira4266 2 роки тому

    In CmdLine he asks me to authenticate myself. "To log in, use a web browser to open the page..." How can I fix this so that in CmdLine does not ask for authentication?

    • @sulfibashy
      @sulfibashy Рік тому

      you should either pass the credentials in the pypirc file or use the default pypirc created by twine authenticate

  • @efexzium
    @efexzium 3 місяці тому

    permission block

  • @fc1984fc
    @fc1984fc Рік тому +1

    If you want to release a new version of the package, can you use the same feed, or do you need another one?

    • @RawCoding
      @RawCoding  Рік тому

      Same feed, just change the name of the package you publish.

    • @fc1984fc
      @fc1984fc Рік тому +1

      @@RawCoding I get this error: Conflict - The feed already contains file
      '-1.0.0-py3-none-any.whl' in package '

    • @RawCoding
      @RawCoding  Рік тому

      File name

    • @fc1984fc
      @fc1984fc Рік тому

      @@RawCoding my file name is always the same: , and that is referenced in pyproject.toml as: name = "package-name" and version = 1.0.1, which I have changed from 1.0.0. I can't see any other places where you should change the file name.

    • @xandrovich5976
      @xandrovich5976 Рік тому +1

      @@fc1984fc I had a similar issue when I released a version as an artifact and attempted another release. In my case, I had to bump the version number in the setup.cfg, so check you haven't also defined a version number elsewhere that might be accidentally getting picked up.

  • @rosapostol9155
    @rosapostol9155 Рік тому

    if you set the path for azure artefacts globally, will Python look for the package in the public pip index first? I am wondering whether it makes for me for all packages to always be downloaded from Azure and if not present, then failed.

    • @digimoral
      @digimoral Рік тому

      Exactly this happens if you follow the example. However, there is a way using the extra index config instead of index.

  • @xxyxungxxraimexx7242
    @xxyxungxxraimexx7242 3 роки тому +2

    Anton began to choke python 😱

    • @RawCoding
      @RawCoding  3 роки тому

      I choke many things ;)

  • @bhumibenp5215
    @bhumibenp5215 2 роки тому

    Hello, Good video explanation. I have one question here, I have a requirement in my project that we publish python packages like pandas, NumPy for ML projects, can I make a bundle of all these modules and publish it as a single artifact? I am new to python as well. Need some help here. Thanks

    • @tejasnandu1
      @tejasnandu1 3 місяці тому

      Hi @bhubenp5215, did you find the way to achieve this requirement. Actually I am struggling to achieve this currently in my project. please let me know if you the answer. I will connect with you. Thanks!

    • @tejasnandu1
      @tejasnandu1 3 місяці тому

      Hi @bhumibenp5215

  • @tintsldgfer565
    @tintsldgfer565 Рік тому +1

    4:20 why you speak about java and other non python? video about python. probably java user look to different videos. with "java" in name
    thank you

    • @RawCoding
      @RawCoding  Рік тому

      The concept of a “project” exists in all languages hence I mention it here in case you are aware of them.