Merken

Publish your code so others can use it in 5 easy steps

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
you want to be in
thank
and so on yeah I might have unintended independence of of goods consultants and also have a few packages
from my PIN and this talk is an introduction to the current workload and I'll use out which both me and I think you can of for
most people and it's easy to change is needed before I go on I just want to this if you have additional resources that really important 1 important is the last of which is the name of the
song so every year other things I included immune to that 1 that's all you need so that the content of this talk is how to use
about something and we will look at your on because of the time and some this is mostly about things and I think that if you if you're going to publish quite a lot of which I think everyone
should know and there's something to contribute its things and did well which means that property tested and documented and things which so many and used by the home working baggage we can't really listen to think about in
their home and its power the 1st thing we need to which every time I it is the coefficients
can set up the which goes into the root directory next thing that we need is to put how cold some code we want to distribute come so my imaginary packages of that and the directly users by which is the same name that would be using what statements important that's you
big name well in that regard how you could probably differently but by computing come thing that I like to do is to separate testing the limitations of the directories
because that's where column there easy to find in there was easy included exclude from package as suited so was have
this is now we need to look at the outset of buying and house to the completion of
which is composed of 2 parts on the 1st part is metadata about how this itself and the other part is that information which was by and how to handle this is what you do it coupon bonds and things like that so the metadata section and highlighted here is mostly about what this package is what it does is it from the under what license and general those elements of different factors as explanatory so they're not going to do just but I like to point out the thing so that the 1st 1 is the long description how which in this case is included but my advice would be to put using external file it is that you can reuse the same description of how and by
media on behalf of have and how home you should go to school and so on you have also doesn't care about much which 1 to use what's being like 9 different formats but by behind so all right the description of the research text on the next thing
to think about our classifiers interview and how the half of the site home and those of you who made amends he's a impossible but also used by developers to use to quickly decided packages of interest and supported to keep updated and to think about what kind of things to do with the and the 3rd thing is license so well it's very wouldn't be 1 because this is broken mentioned having a total mathematical operations analyze and this means that in fact the copy so it's not no use to anybody else on except you and you need to give it a license to do and if you need help with this so you can talk to me later if you want otherwise have somebody without any legal training whatsoever and this is a metadata section and the next thing is to include the code itself so we do this with the packages of actually it's parameter which has used the relative fast to decode of packaged our case that's buy stock and in principle that could be everything you need but a lot of packages a lot of interesting packages also have some kind of an external dependencies and those are
handled with installed required
section you which is a list of all the external dependencies via the names of the same names as their use and by the ion and you can also specify version which really should so you can be limited to the matching ones that were not really good compatibility and also ideally is liberal enough that you can also the couple automatically and not fixed resource security fixes for dependencies so at this point we have a package and that's the that can be installed locally in but for which we don't actually know that if it works well and for that we need to and tests on the domain task here at the Conference in previous conferences about testing and from avoid going into like this is a good idea I think the probability that it is and by comes with many testing frameworks you're free to choose which everyone unit test is part of the distribution itself but neighbors have preferred to have by just because it's a really powerful and flexible framework for analyzing started on it's also
easy to set up it will find tests just about anywhere as long as the files that contain them start with test underscore and that's themselves are functions that have test on the score as well so I since started to and the right you
get this may be something similar to this
in this case there just to test for this column package parents yeah hopefully eventually you have you would have the full test suite covering because all the code but protests like this we only covered the In the problem with this ground by default and ideally we would also test with other Python versions of you want to support more of them and hopefully and for something and these might want you you start
so toxic is it to but
let's the development test due to different multiple testing environments with a different set of problems dependencies that defensive versions and tests run tests in all of them and collect results and display the speed does actually much more than this column but for what we need this is enough because we can think of Python interpreter version as this is just another package so it can be easily covered talks so they must be installed talks by the idea that we've installed talks and we need to also configured and do this with the things that are know I need configuration file is a simple 1 parents it contains
2 sections so the first one on is so talks well with some parameter and this we specify which environments we want to use the budgets of constant predefined home environment for all bicycle interesting
Python of variance saying this case we use Python 2 . 7 3 . 5 and by because define our own but most of the time we probably need to do that so With this research set up that he was tested in with with 2 . 7 and 3 . 5 and 5 points and then we also need to speak define colonies tests should be set up and run so we do this 1st by the columns listing dependencies
which in our case just please stop by just column and then we also need to specify how to understand which in the event of his his his providers and users do everything which magic so as we've done
this and running with the toxic meant that is very very similar to this 1 so we can see that in all
these the the country on these 3 environments rank test them and d and reported success In all of them so we have something that works pretty well locally
on tests inaudible from multiple Python versions and but it wouldn't be nice if the same time you could run tests automatically every time you make a change if you would like to keep and
for me this is kind of similar or more or less the same thing as I'm making polymer commits push to get become this that I intend to keep and we can achieve
this week by using an external service called 7 on which is a continuous integration services that is known also as a
hosted service EI or that site that allows open source public from projects to use it for free and to to use it we 1st need to create an account which we do by loving it with our and you have credentials are certainly if you have encountered we don't need to authorize application so
so he has access to our a repository so can read them and once you've done that you will get the best all of our repositories all we need to switch on those that's defined that we want to use with the Travis and after that we only need to know what we need to
consider it with the service configuration file which is the younger competition find which refers specified for each language we want to use nowadays Python and then we need to specify what the interpreter uh versions that we will be using charges In this section is slightly more complicated because on we can test and ideally we should just which Travis with different Python versions but we also using stocks for the same thing locally on so the way to handle this is to instruct Travis of reach python interpreter introduced with the Python work itself for example 2 . 7 and the instructor talks reach testing environment introduced the same time between the 2 talks environment environment variable column where we use the name of
environment so after we've done this we need to start whatever is needed to test our package in
our simple case this is just assigned thoughts which means of by and the the rest and then we need to also run the command that we need to run tests which is just executing talks so after we've done this we will get a pretty similar
to this 1 this is 1 of my projects where we see the status of the tests that around every time we push another change to get and we also get this up on the top of the screen if you taken this
we can get all embedded things and there is a snippet that can use to include it into our readme file on pages we can also 2 other developers call in what state of package right now is so at this point we have
something that works pretty well
on its whole protested that to meditate etc. time which changes but doesn't have a documentation and other conditions it's probably not
really inviting to others to use because how would we mean without some kind of noise how to use software it's probably less appealing than other potential packages that might have more modification so so writing the condition is important also for other reasons because of the conditions we can also also think about how the coach should be used and how should you work and it wasn't tell what it actually does for between writing the condition user told things which is the same
1 that a Python project uses and publish it on with adults network which is not a free service for open source work on that you can use again we need to create an account problem and we need to
authorize the axis which we do once we log by clicking on the screen and you have and again the same screened
for authorization and
afterwards column once you authorized we come back to the screen we need to import project that from a list of projects usually it's used for some reason is that when the the company's patent for the very 1st time empty so if you need to receive in announcing but there and afterwards you just click on the process of sign of the project to that you would like to add to 2 condition for so question than this you know you information about the project itself usually the difference of the fine as they are and their picked up from the top name and repository you can change the setting succumb if you don't like them if you do please use use the format of the the condition to things which because this is the 1 we actually use and question on all of this you
get to a page this that's the sort of status page you all for your
project which doesn't what's the status of the the condition of generation is on you and then you get a badge that you can use and you also have to show your answer
to can use to point to your documentation questions about so this is the only part and now we have to also set up you can decide on the nobody
so 1st we need to discuss things with things autumn and so on and then we moved to the the the condition for the week created before and runs things are start which will ask us a few is the ultimate questions or if you don't know the defaults then find and this would generate a configuration of fire in which we
might want to check the those 2 expenses are turned on the 1st extension of what a doctor who is used to to generate recommendation from docstrings which can be really useful for generating API conditions and the other 1 DTAs thinks his for if you want to link to documentation provided packages so once you have all this and once you also wrote some documentation structured text you can create and local very copy it makes its tomorrow and
browsing afterward so you don't need to check in because adults we automatically form changes from the top and built its own version anyway so now we have a package probably pretty good
tests as documentation just hasn't been published and so on
what in the rate has been because it's possible to started from the of directly but it's not very few flexible so as not very manageable for users and it's possibly more difficult to find so we should publish it to quantify the i which is a pythons
one-stop-shop for Python packages and to do this we already have everything maybe we need so we need to register assessment to create an account which we can do either on that what we can do it once
the resistor package itself so to register package how we would
run this command so by the set of the 5 set of log
file for package and the register command and it lost for credentials to buy the iron or if you don't have them said this point we can also create an account and everything else about the package would be red from the onset of the body itself so we don't have to do anything that so once you've done this we just need to push the package itself and we did this with 1 another set of the find command in which case it's pretty source distribution and distribution and uploaded to Commons the by the i read you might also want to do some of the changes
so you create by the idea official file you can specify populations that it's probably not a good idea to put that's they're you only you can but if you use all the version of Python that's before Python 2 . 7 . 9 it's a good idea to put that repository of this type of a repository of line inside because it's forces set up the fight use secure connection to pipeline and not explicit credentials neural versions of Python kind this automatically by the law the versions you to it's good idea to have that in so at this point we've done everything on the of package
getting tested as documentation you know how to punishment its 0 by and since when all of this it would be kind of silly if we had to do this every time want to create a new package
and publishing package it's better to automated and we can do this readers to Collins cookie
cutter that was is created created by all we're doing itself common line tool on for creating scaffolding call for a project from the project templates and audio-only provided a
great template for Python packages of so 1st
meeting start cookie cutter then we need to be pointed to the occasional from the template file In this case it it means it's on behalf of all the 3 repository could counterpart package comes into weeks from there and then the last as a bunch of questions that we are and so on so that's it confusing missing or unknown parts and afterwards you have and the scaffolding right from the whole package ready to go so we can just as the total and that the content at is needed so death and that's it we didn't have time to cover some reading we cannot go into depth about tools it are mentioned iron strongly urge you to
look at the documentation days every powerful and you can do much more sentences for each 1 of them so you for some reason you don't like like some of them you can easily replace them with a different to on the whole this works pretty well from you who knows you to thank you
few the the people of the K. thank you mark any questions the back this is the way that we the force but hello I wanted to ask you if it's possible to do the books configuration without using by just like using another does run like fold general test cases or share so
of so right here so I used by test but in principle we don't think you would need to change for everything to work is so In the top theory so use whatever the that's funny and has this framework on you want but then if if you wanted to keep everything as the same you just need to take the torques configuration scores by test and then run by just you need to change it to install your foot framework shouldn't installed it's not a unit and then you would need to change that the institutional part so that's instead of buying by test is wrong this 1 are you using and everything else was pretty much the same way all I think a lot of problems all good thank you thank you for question they
more questions the hello thank you for the so do you think the perp approach it should have some kernel for all medical quot control such as flight 8 from my avoid such so book yes they do so this talk
region you would also have a section on coverage which is not I think so on but to pointing to that direction so do you would try to automate everything you can so on the problem with running things manually is that you it's easy to forget and anything that can be automated is ideally should be automated so on there are a bunch of to solve their use free-to-use for open source on that you can use to integrate these things and this into your and join me
once again giving Marco big thanks
Metropolitan area network
Beanspruchung
Code
Stochastische Abhängigkeit
Güte der Anpassung
EDV-Beratung
Vorlesung/Konferenz
Strömungsrichtung
Baum <Mathematik>
Computeranimation
Code
Skript <Programm>
Inhalt <Mathematik>
Information
Baum <Mathematik>
Computeranimation
Kategorie <Mathematik>
Information
Baum <Mathematik>
Computeranimation
Befehl <Informatik>
Koeffizient
Vorlesung/Konferenz
Wurzel <Mathematik>
Verzeichnisdienst
Code
Computeranimation
Leistung <Physik>
Softwaretest
Zustandsdichte
Inverser Limes
Verzeichnisdienst
Baum <Mathematik>
Computeranimation
Metadaten
Deskriptive Statistik
Subtraktion
Diskrete-Elemente-Methode
Zustandsdichte
Mereologie
Garbentheorie
Information
Element <Mathematik>
Elektronische Publikation
Stochastische Abhängigkeit
Baum <Mathematik>
Teilbarkeit
Computeranimation
Nichtlinearer Operator
Parametersystem
Web Site
Wellenpaket
Code
Computeranimation
Deskriptive Statistik
Metadaten
Hypermedia
Garbentheorie
Softwareentwickler
Stochastische Abhängigkeit
Hilfesystem
Baum <Mathematik>
Softwaretest
Distributionstheorie
Komponententest
Punkt
Computersicherheit
Versionsverwaltung
Mailing-Liste
Framework <Informatik>
Computeranimation
Eins
Task
Domain-Name
Mereologie
Garbentheorie
Stochastische Abhängigkeit
Baum <Mathematik>
Softwaretest
Lineares Funktional
Rechter Winkel
Elektronische Publikation
Baum <Mathematik>
Computeranimation
Softwaretest
Metropolitan area network
Suite <Programmpaket>
Vererbungshierarchie
Versionsverwaltung
Default
Code
Computeranimation
Softwaretest
Resultante
Data Encryption Standard
Parametersystem
Interpretierer
Subtraktion
Versionsverwaltung
Elektronische Publikation
Computeranimation
Multiplikation
Softwaretest
Menge
Vererbungshierarchie
Garbentheorie
Softwareentwickler
Programmierumgebung
Konfigurationsraum
Softwaretest
Softwaretest
Punkt
Sprachsynthese
Baum <Mathematik>
Ereignishorizont
Service provider
Varianz
Computeranimation
Softwaretest
Metropolitan area network
Rangstatistik
Vorlesung/Konferenz
Extrempunkt
Programmierumgebung
Computeranimation
Softwaretest
Metropolitan area network
Multiplikation
Mathematisierung
Versionsverwaltung
Ähnlichkeitsgeometrie
Extrempunkt
Baum <Mathematik>
Computeranimation
Web Site
Dienst <Informatik>
Desintegration <Mathematik>
Open Source
Kontinuierliche Integration
Kartesische Koordinaten
Projektive Ebene
Baum <Mathematik>
Computeranimation
Softwaretest
Interpretierer
Subtraktion
Dokumentenserver
Formale Sprache
Gewichtete Summe
Versionsverwaltung
Extrempunkt
Elektronische Publikation
Computeranimation
Metropolitan area network
Dienst <Informatik>
Variable
Softwaretest
Garbentheorie
Programmierumgebung
Konfigurationsraum
Softwaretest
Softwaretest
Programmierumgebung
Baum <Mathematik>
Computeranimation
Softwaretest
Punkt
Mathematisierung
Elektronische Publikation
Extrempunkt
Homepage
Computeranimation
Metropolitan area network
Vorlesung/Konferenz
Projektive Ebene
Softwareentwickler
Touchscreen
Aggregatzustand
Software
Konditionszahl
Mathematisierung
Geräusch
Baum <Mathematik>
Computeranimation
Metropolitan area network
Dienst <Informatik>
Diskrete-Elemente-Methode
Datennetz
Freeware
Open Source
Kartesische Koordinaten
Projektive Ebene
Computeranimation
Touchscreen
Subtraktion
Prozess <Physik>
Dokumentenserver
Mailing-Liste
Computeranimation
Metropolitan area network
Zustandsdichte
Vorzeichen <Mathematik>
Konditionszahl
Dateiformat
Projektive Ebene
Information
Touchscreen
Metropolitan area network
Generator <Informatik>
Konditionszahl
Projektive Ebene
Baum <Mathematik>
Quick-Sort
Computeranimation
Homepage
Metropolitan area network
Zustandsdichte
Konditionszahl
Mereologie
Zoom
Konfigurationsraum
Default
Computeranimation
Generator <Informatik>
Konditionszahl
Mathematisierung
Versionsverwaltung
Maßerweiterung
Ext-Funktor
Computeranimation
Softwaretest
Bitrate
Baum <Mathematik>
Computeranimation
Vorlesung/Konferenz
Baum <Mathematik>
Computeranimation
Distributionstheorie
Punkt
Menge
Mathematisierung
Quellcode
Elektronische Publikation
Login
Baum <Mathematik>
Computeranimation
Einfach zusammenhängender Raum
Server
Punkt
Dokumentenserver
Computersicherheit
Versionsverwaltung
Indexberechnung
Elektronische Publikation
Gesetz <Physik>
Computeranimation
Forcing
Datentyp
Baum <Mathematik>
Gerade
Template
Cookie <Internet>
Systemaufruf
Projektive Ebene
Baum <Mathematik>
Gerade
Computeranimation
Dokumentenserver
Template
Elektronische Publikation
Ausgleichsrechnung
Computeranimation
Rechter Winkel
Code
Mereologie
Cookie <Internet>
Skript <Programm>
Inhalt <Mathematik>
Baum <Mathematik>
Lesen <Datenverarbeitung>
Softwaretest
Forcing
Gemeinsamer Speicher
Vorlesung/Konferenz
Faltung <Mathematik>
Konfigurationsraum
Baum <Mathematik>
Computeranimation
Softwaretest
Moment <Stochastik>
Einheit <Mathematik>
Mereologie
Gamecontroller
Vorlesung/Konferenz
Konfigurationsraum
Physikalische Theorie
Framework <Informatik>
Computeranimation
Kernel <Informatik>
Open Source
Elektronischer Datenaustausch
Vorlesung/Konferenz
Garbentheorie
Extrempunkt
Computeranimation
Richtung
Metropolitan area network
Computeranimation

Metadaten

Formale Metadaten

Titel Publish your code so others can use it in 5 easy steps
Serientitel EuroPython 2016
Teil 46
Anzahl der Teile 169
Autor Samastur, Marko
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/21183
Herausgeber EuroPython
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Marko Samastur - Publish your code so others can use it in 5 easy steps As developers we all love well-documented, well-tested packages. If we do the same for our code it is easier for others to re-use our hard work, and maybe even contribute. We will take a quick look on how to do this using popular tools and only a small investment of time. With Github and some simple tools, setting up a well-groomed package doesn't have to be difficult. ----- Every Python open-source developer wants their software to be used. As developers, we trust software that is tested and well-documented. In this talk we'll go through 5 steps for how to do this for your own packages. We will take a quick look on how to do this using popular tools and small investment of time: - Write a setup.py script for a pure Python package - Set up py.test, tox and coverage to test our package with multiple versions of Python - Configure Github to use Travis CI & coveralls.io to automatically test our package every time we commit - Register and publish our package to PyPI - Setup our documentation on ReadTheDocs

Ähnliche Filme

Loading...