Search This Blog

Wednesday, April 22, 2015

Python Package Development

Context

I'm developing a few Python packages, which are obviously under version control (personally hosted GIT repo in this case, but that's not relevant). Now, the package is in active development, but I usually work in different machines: my personal laptop and workstations at the lab. In the lab machines I don't have root access, so I work on a virtualenv, where I can install python packages using pip install.

How?

To facilitate the development in every machine I work on, this is the basic setup:
  1. Create a setup.py file in the repo, to use setuptools to install the package (this will also help you if you want to use PyPI later on to distribute your package)
  2. Clone the repo in every machine you will develop/use your package
  3. For every machine:
    1. activate the virtualenv
    2. cd into the cloned repo
    3. Type python setup.py develop

45 comments:

  1. thanks for sharing ! great game , have fun with my singing monsters cheats and hack to achive coins , gems , breed new singing monsters and lot more info here.

    ReplyDelete
    Replies
    1. Hi Jorge,

      You make learning and reading addictive. All eyes fixed on you. Thank you being such a good and trust worthy guide.

      so, I'm currently struggling on a piece of code. I'm not very proficient at Python so bear with me. What I have is a NumPy array of baseball statistics with 20 columns and a lot of rows and two of the columns are the year the stats were taken from and a unique player id that only applies to this one person. As some players returned for more than a year, some of the player ids repeat in later rows. There is also a column with the number of runs that player got in a year.

      What I'm trying to accomplish with this is make a histogram where the x axis is total number of runs a player got and the y axis is number of players who got these many runs, with 100 bins.

      I used np.unique to make an array with the player ids only listed once and I know I need some weird kind of for loop to add all the runs to the player id, then I probably need an array with 2 columns, being the id and the runs gotten by that id, and a where statement to get the number of players with a certain amount of runs within a range to then be graphed.


      I read multiple articles and watched many videos about how to use this tool - and was still confused! Your instructions were easy to understand and made the process simple.


      Muchas Gracias,
      Kevin

      Delete
    2. I feel this is among the such a lot vital info for me. And i am satisfied studying your article. However wanna commentary on few general things, The website style is ideal, the articles is truly nice
      Tangki Panel
      Tangki Fiberglass
      Jual Septic Tank

      Delete
  2. Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful
    Laptop Repair Service Faridabad

    ReplyDelete
  3. You have got the golden chance to grab the roblox robux generator of 2015 which will be unlimited and will be provided without paying any amount and at no any effort.

    ReplyDelete
  4. ou’re alone in a zombie infested desert. Your only means of defense is your truck. Kill zombies to earn money, and then use the money to buy upgrades for your truck to help you to go through all the obstacles and defend yourself. Earn bonus cash by coming up with creative and impressive ways to kill the zombies, as well as breaking down other obstacles and barriers in your path.
    Use the arrow keys for navigation
    earn to die game123

    earn to die5

    earn to die game vui

    earn to die23

    earn to die game play

    earn to die
    tank trouble
    age of war

    freetowerdefensegames

    ReplyDelete
  5. I often get emotionally involved. Like when I read your post, I can cry, laugh, sad, funny, depending on your written words. I think you are a sensitive person.
    http://fivenightsatfreddysplay.com

    ReplyDelete
  6. Thanks for the information you shared. Please share useful information with your friends regularly
    papasgamesonline.com

    ReplyDelete
  7. This article is really fantastic and thanks for sharing the valuable post.

    http://www.happywheelsy8.com

    ReplyDelete
  8. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. Nice! thank you so much! Thank you for sharing.
    b612az.com

    ReplyDelete
  9. Thank you very much for the information you shared, it’s all I’ve been looking for
    www.happywheels-2.com

    ReplyDelete
  10. Thank you, so Much admin have a nice day :) you information about weight loss is very easy and simple.
    pocafashion

    ReplyDelete
  11. اذا كنت تبحث عن شركة تلبي كل احتياجاتك المنزليه في الطائف من تنظيف,ونقل عفش,ومكافحة حشرات , وتسليك مجاري,زتنظيف خزانات وغيرها من الخدمات كل هذا واكثر في شركة ركن الشروق على درجه كبيره من الكفاءه والخبره اتصل نصلك نحن في انتظارك
    شركة تنظيف بالطائف

    شركة نقل عفش بالطائف


    ReplyDelete
  12. I appreciate you and hopping for some more informative posts. thanks for share
    run3.run

    ReplyDelete
  13. It seems I'm on the right track, I hope I can do well. The result was something I did and was doing to implement it.
    www.clickjogosclick.com

    ReplyDelete
  14. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi
    cara menggugurkan kandungan

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Nice post about MSBI, looking for best msbi online training institute ?

    ReplyDelete
  17. شركة ركن الشروق في الاحساء تقدم لكم افضل الخدمات واكثرها طلبا لعملائنا الكرام فشركتنا الرائده في مجال خدمات المنازل بأنواعها المختلفه عليك التواصل معنا نصلك في اسرع وقت ونحن في انتظارك شركة مكافحة حشرات بالاحساء
    شركة تنظيف خزانات بالاحساء
    افضل شركة تنظيف مجالس بالاحساء
    شركة كشف تسربات مياه بالاحساء
    شركة تسليك مجاري بابها
    شركة مكافحة حشرات بابها
    شركة نقل عفش بابها

    شركة تنظيف خزانات بابها




    ReplyDelete
  18. Are you looking for a company specialized in home services Tabuk, then you have to join the best company to clean and control insects and tangle the cables of the company owns the company trained technical workers and the company uses the latest equipment in cleaning and pest control and sewerage is worth mentioning that our company is the best transfer and storage company in Tabuk and Saudi Arabia This is due to the experience of our company in the field of transporting the dough together jaw and installation and warranty contact us and do not hesitate. شركة تنظيف بتبوك
    شركة تنظيف خزانات بتبوك
    شركة مكافحة حشرات بتبوك
    شركة نقل عفش بتبوك
    شركة تسليك مجارى بتبوك
    شركة نقل عفش بالخرج
    شركة مكافحة حشرات بالخرج
    شركة تنظيف بالخرج
    شركة تنظيف منازل بالرياض

    ReplyDelete
  19. An excellent information provided thanks for all the information i must say great efforts made by you. thanks a lot for all the information you provided.

    http://word-cookies-answers.com

    ReplyDelete
  20. Hi There,

    Interesting piece!Great to see someone write Python Package Development who is not a fanatic or a complete skeptic.

    I am trying to complete the Trailhead for Paths and Workspaces and am encountering an issue where I have to add an event via the quick action "New Event".

    This button does not exist on the page layout. I have added it to all Lead page layouts, the Lead object does not currently utilise record types and I have enabled the Lightning buttons override. Despite this, there is still no button appearing under Activity for "New Event" as the Trailhead indicates there should be.

    There are two threads on this issue that have been marked as SOLVED however the solutions posted there have no helped in resolving this issue for me.

    If anyone can help provide a solution that would be great. I would really like to complete this Trailhead!

    Appreciate your effort for making such useful blogs and helping the community.

    Many Thanks,
    Preethi.

    ReplyDelete