Showing posts with label PyCharm Blog. Show all posts
Showing posts with label PyCharm Blog. Show all posts

Friday, June 19, 2020

PyCharm 2020.2 EAP2: In-place rename and signature change

PyCharm 2020.2 EAP2 was released today with a feature that will blow your mind! You can download this EAP build from our website or from the Toolbox App.

If you see yourself going through a cumbersome modal dialog when renaming or changing signatures of methods and classes you will like this new feature. With in-place refactoring, you can simply edit names or parameters of a class or a method and then either click the new gutter icon or use the intention action (alt+enter) to preview the changes and apply it to all its usages.

Static remove parameter

Whenever you add or change a parameter in your method signature you are prompted to add either a required or an optional value to populate usages and prevent broken code:

ide add value prompt

Here you can see how to change the signature using an intention action (alt+enter) that will apply project-wide refactorings without requiring you to take your hands off the keyboard:

demo gif inplace refactoring

Renaming is also that easy. You can use in-place refactoring to rename classes, methods, and variables. See below how it would look like to use the refactor|rename feature by clicking the gutter icon:

rename refactor

Of course, this is just one of the multiple new features present in PyCharm 2020.1 EAP! Below you can find other new features and you can always check out the full release notes for the list of all closed tickets in this build.

What else is new in 2020.2 EAP2

PyCharm Early Access Program

As usual, the EAP builds for PyCharm are free to use and expire within 30 days of the build date. If you are unfamiliar with how JetBrains Early Access Programs work you can find more information in older PyCharm posts.

 



from PyCharm Blog
read more

Monday, June 15, 2020

Tutorial: Visual testing with pytest

If you are like many Python developers out there you LOVE writing code! Tests? Not so much. Whether it’s the concept of testing or the interface of testing tools, testing is a chasm not all developers cross. The Visual Testing with pytest tutorial aims to bring Python testing to the masses, taking a new approach to first contact with Python testing.

Join this journey with us and improve your testing skills in this 9-step tutorial!

The tutorial

As mentioned before, this tutorial was split into 9 steps. The idea is to make each step unique so you can watch and apply your learning as you go. Each tutorial step has a narrated video along with a detailed writeup, connected to working code.

Here’s an overview and below you can find a description for each step.

  • Step 1 – Background on Testing: Introduce testing, pytest, and how it all fits into PyCharm, along with a scenario to work on.
  • Step 2 – Project Setup: Make a PyCharm project and virtual environment with dependencies, then configure PyCharm to use pytest.
  • Step 3 – Hello Test: Write a simple test and run it in PyCharm’s visual test runner.
  • Step 4 – Getting Into the TDD Flow: Setup your PyCharm project to help get into the flow of Test-Driven Development (TDD).
  • Step 5 – Jump to Error: Writing code means writing broken code. Click a link in a traceback to open a file on the line of the error.
  • Step 6 – Skipping Tests: During refactoring, use pytest’s markers to ignore certain breaking tests.
  • Step 7 – Test Fixtures: Make your tests more focused by moving sample data to pytest fixtures.
  • Step 8 – Debugging During Testing: When writing tests, use the PyCharm “visual debugger” to interactively poke around in the context of a problem.
  • Step 9 – Testing Exceptions: Write tests that ensure exceptions are raised when expected.

About pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. For more information about the pytest framework read their official documentation.

About the PyCharm Guide

Looking to level up your Python and PyCharm skills? The PyCharm Guide takes a visual approach, with tips, tutorials, and more.



from PyCharm Blog
read more

Monday, June 8, 2020

PyCharm at the 2020 Python Web Conference

Our countdown for the 2020 Python Web Conference has started, come meet our team!

Python Web Conference Logo

PyCharm by JetBrains is sponsoring the event and, besides that, we also have our very own Paul Everitt giving a tutorial PyCharm Power Tips: How to become a PyCharm Power User on June, 17th.

If you are joining the conference and want to learn some skills that will make you more productive while using PyCharm then make sure to join Paul’s tutorial! It will have a hands-on format showing bite-sized tips to speed up your work while staying in your coding flow. You can count on learning general IDE tips & tricks, Django-specific productivity tips, and you will also join a sample TDD session in Pytest that will put all the tips into work in a real coding session.

Rather than a long sequence of tutorial steps, the idea is to have a series of individual tips that you can learn fast and start applying right away. The code used will be provided beforehand so everyone can follow along and clear any questions before jumping into the next tip. This is a nice approach to go through a lot of material fast, without leaving anybody behind.

It takes a lot of preparation from the presenter so if you haven’t yet, make sure to buy your ticket to the conference and join Track 2 on Wednesday, June 17th, at 9 am (ET)!

The conference

The 2nd annual Python Web Conf is a virtual event organized by Six Feet Up and designed to promote best practices for hard web production problems. It features international experts presenting on 40 topics such as Django, Flask, Pyramid, Tornado, Plone, CI/CD, Containers, Serverless, REST APIs, web security, microservices, websockets, etc.

It’s a highly engaging format and many industry experts will share their skills for three days in a row. We, at JetBrains and especially PyCharm, are very happy to sponsor this event and will have a dedicated team interacting with attendees in our Slack room.

Come meet with us! Bring your questions or just come say hi! We’d love to see you.

 



from PyCharm Blog
read more

Friday, June 5, 2020

Smart execution of R code

R plugin is announcing some helpful features to track execution of your R code:

1. Execute your R file as a runnable process, job. Jobs are shown in a separate tab in the R console. You can preview the job status (succeeded or failed), the duration of the execution, and the time you launched the job.

r_jobs_console

When starting a new job, you can specify the way you want to process the results of the job execution. You can restrict copying it, copy to the global environment, or copy it into a separate variable. To preview the results, switch to the Variables pane:

r_job_variable

2. Try new ways to quickly import data files. You can now download data from CSV, TSV, or XLS files into your global environment:

r_import_file

Once added, the data can be accessed from your R code.

In this release, we also introduced some stability improvements and enhancements for resolving and autocompleting named arguments.

Interested?

Download PyCharm from our website and install the R plugin. See more details and installation instructions in PyCharm documentation.



from PyCharm Blog
read more

Thursday, June 4, 2020

PyCharm 2020.2 Early Access Program starts now!

The Early Access Program for our next major release, PyCharm 2020.2, is now open! If you are the kind of person who is always looking forward to the next ‘big thing’, we encourage you to join and share your thoughts on the latest PyCharm improvements! Our upcoming release is loaded with cool features!

pycharm EAP program

If you are not familiar to our EAP programs, here are some ground rules:

  • We roll out a new build every week until the end of July
  • EAP builds are free to use and expire 30 days after the build date
  • You can install an EAP build side-by-side with your stable PyCharm version
  • It’s important to note that these builds are not fully tested and might be unstable
  • Your feedback is always welcome, use our issue tracker and make sure to mention your build version

Highlighted features

These are just a few highlights from what’s coming! For more details check our release notes.

Interested?

Download this EAP from our website. Alternatively, you can use the JetBrains Toolbox App to stay up to date throughout the entire EAP.
If you’re on Ubuntu 16.04 or later, you can use snap to get PyCharm EAP and stay up to date. You can find the installation instructions on our website.



from PyCharm Blog
read more

Wednesday, June 3, 2020

PyCharm 2020.1.2

PyCharm 2020.1.2 is out now with fixes that will improve your software development experience. Update from within PyCharm (Help | Check for Updates), using the JetBrains Toolbox, or by downloading the new version from our website.

In this version of PyCharm:

And many more small fixes, see our release notes for details.

Getting the New Version

You can update PyCharm by choosing Help | Check for Updates (or PyCharm | Check for Updates on macOS) in the IDE. PyCharm will be able to patch itself to the new version, there should no longer be a need to run the full installer.
If you’re on Ubuntu 16.04 or later, or any other Linux distribution that supports snap, you should not need to upgrade manually, you’ll automatically receive the new version.



from PyCharm Blog
read more

Introducing the PyCharm Guide

Want to be a badass at Python coding with PyCharm? Keep reading!

Over the last few years we have been collecting productivity tips, tutorials, and a lot more into a central, video-oriented resource, and now we are ready to introduce you to our brand new PyCharm Guide!

Introducing PyCharm Guide.001

The PyCharm Guide currently houses tips, tutorials, and playlists organized by technology and topic. Many of the tips have an in-depth section with a narrated video. We currently have one tutorial and many more on the way with tutorial steps showing full videos and writeups with working code.

The Guide is made for the community, so we intend it to be an open-source project. It’s in GitHub, with one external contribution already, and a relatively-easy Markdown-based contribution format. We also have Guides from other products, both deployed and on the way.

The PyCharm Guide is a shift from publishing bunches of individual pieces to telling stories, over time, across platforms. It is closely linked to our new PyCharm YouTube channel and our Twitter account, as well as this blog, to weave together our stories and storytelling.

More to follow in the coming weeks, especially on the way to the Python Web Conference and our PyCharm tutorial there. If you have any suggestions on how we can rethink advocacy, education, and storytelling, drop a comment!



from PyCharm Blog
read more

Friday, May 15, 2020

5 takeaways from the Python Developer Survey 2019

Last week the Python Software Foundation (PSF) published the results of the Python Developer Survey 2019. The research was conducted in the fall of 2019 and collected answers from over 24 thousand Python developers from 150+ countries. The Python Developers Survey is an official instrument endorsed by the PSF and serves as a reference to understand what is going on in the Python world.

With no further ado, let’s take a look at some interesting facts from the research!

1. JavaScript is still the most popular ‘second language’…

JavaScript is still the most popular ‘second language’ among Python developers, no news here, but we see that this number decreased by 8% compared to 2018. Below you can see the results for ‘Python usage with other languages’.

Python usage with other languages

2. Python is, indeed, a flexible language…

For the second year in a row, ‘Data Analysis’ was selected by 59% of the respondents when asked ‘What do you use Python for?’. Following the trend of fewer people choosing for JavaScript (previous fact), the number of respondents that selected ‘web development’ as an option dropped by 4% in comparison to 2018.

An interesting fact from this set of questions is that, on average, users chose 3.9 different purposes for using Python, evidencing one of the main characteristics of the language, flexibility. Below you see the distribution for the question ‘What do you use Python for?’

what do you use python for

3. Python 2 is almost gone but is still alive…

Python 2 is no longer officially maintained and, as expected, the majority of the respondents are using Python 3. The interesting fact, though, is that Python 2 is still used by 10% of the respondents, 6% less than in 2018, but still far from an end.

Python versions

AWS maintained its 55% relative market share within Python developers, but Google and Microsoft came closer by increasing their market share by 3% and 4% respectively (vs. 2018).

Top cloud platforms

Running the code in the cloud had a change when compared to 2018. Containers became the most popular choice, surpassing the option for virtual machines. Se below the distribution for the question ‘How do you run your code in the cloud in the production environment?’:

How do you run your code on the cloud

For the fourth year in a row, PyCharm is the main IDE used by Python developers independently of their development context: web development or data science. See below the distribution among users who chose Python as their main language:

editors and ides

 

 

The Python ecosystem evolves and changes every year. It is always a pleasure for us at JetBrains to join efforts along with the PSF to enrich our understanding of this amazing programming language that we love so much.

Find the full results at the official Python Developer Survey 2019 page and, this year, you can also download the anonymized data and use your Python and data science skills to explore the data yourself!

If you decide to do so, please let us know what else did you find!



from PyCharm Blog
read more

Monday, May 11, 2020

Interview: PyCharm helping developers to navigate complexity and be more productive

stxnext logoDeveloping in Python is the dream job of many developers out there. According to the latest survey from StackOverflow, Python is the second most ‘loved’ language, and the ‘most wanted’ one. Now, imagine working for a Python software house where you have the opportunity to be part of many different projects, sometimes even simultaneously? It sounds amazing, right? But, of course, it also brings some challenges. You need to communicate more, be aware of different project scopes, take decisions under different technology requirements, and much more. Complexity is also closely related to productivity. While some people excel in this scenario others spend more time finding their way around.

A type of tool that helps developers to find their way around and navigate complexity easily are IDEs (Integrated Development Environment). Today we will chat with two professional Python developers that, despite very different backgrounds, chose PyCharm as their main Python IDE. Łukasz Wyszomirski and Łukasz Ćwikliński work at STX Next, a European software house specialized in Python, and will share their experiences with us.

– Hi, nice to meet you both! Could you start by telling us a little bit about yourself and your journey to becoming a Python developer?

Łukasz Wyszomirski photo

Łukasz Wyszomirski: I started my journey to become a programmer at university. Originally I wanted to be an accountant, but I ended up getting interested in programming. Back in secondary school, our teacher took us to an education fair and after learning more about it, I chose programming studies in Gdańsk. In my third year at university, I got my first job as a Ruby on Rails intern.

Łukasz Ćwikliński photoŁukasz Ćwikliński: After a couple of years as Head of Sales in a company of a dozen or so, I came to a realization that I’m no longer learning new things in that industry. I decided to look for something new and exciting. I quickly learned that IT is something I’m interested in—that’s how my journey with programming started. In my first year, I programmed in PHP, but quickly after that I moved on to Python.

– Can you describe your team at STX Next?

Łukasz W.: Currently I’m working in a team consisting of 5 members: a product owner, a QA specialist, 2 frontend developers, and one backend developer (me). I have two main roles. I’m responsible for building the entire backend in the project and, as I currently have the most experience in commercial projects I also help the other members of the team, even if I’m not an expert in a particular technology.

Łukasz Ć.: I have worked in several teams so far, and the size of each team was always different. It varied from being a one-man army to a team of 7. In the latter, there were such roles as a QA specialist, backend and frontend developers, a product owner, and DevOps. As for my role, I am a full-stack Python developer.

– What kind of projects do you usually work on?

Łukasz W.: I have experience in big projects from the health and banking sectors but I have also worked on MVP projects. Currently, my team is working on a project in the area of logistics. I can’t really talk about many of the projects we work on, but to give you an idea, you can check out our portfolio.

Łukasz Ć.: So far I have worked on some fintech projects, some internal projects (for instance the company intranet, website, and RMS), and on projects related to A/B tests.

– Among those projects, is there one (or more) that you are really proud of?

Łukasz W.: Working on projects in the health sector is especially gratifying. In my previous job, I had an opportunity to develop a platform for mobile surveys used in developing countries. It was an app used by workers who traveled to villages in those countries, gathering data from pregnant women and newborns. The data was then used to combat the problem of low childbirth survival of women and newborns.

Łukasz Ć.: Yes, I’m very proud of one of the fintech projects I worked on. It started about 2 years ago and it’s still ongoing. Many fintech projects have to be stopped because of problems with funds or competition, but this one is still going strong. On top of that, the code itself is interesting in this project, and the technology stack is very broad, which is a plus, too.

– What are the main challenges that you face while working on multiple projects?

Łukasz W.: The main challenge of working on multiple projects is having to switch the context between them, while still keeping up with the new requirements. However, that’s an issue only if the domain sectors of the projects are different. If the projects are in the same sector, it’s not that big of a deal. There’s also the issue of time and how to divide it to make sure everything is done efficiently.

Łukasz Ć.: I think that the greatest challenge is having to switch contexts between the projects. Another challenge is related to all the changes that happen in a given project when I’m not working on it. Sometimes when I spend a week focusing on one of the projects new features are introduced in the second one and, later on, when I go back to the first project, I need to find out what’s been happening there. It takes a while to catch up and get on the same page with everyone else.

– What technologies do you use for your Python development?

Łukasz W.: It depends on what we need in the given project. Currently, in each project I’m using Celery, a database, and the Django-rest-framework. When we need a good analytics system I tend to use the ELK stack. I also prefer Django over Flask. In terms of tools in general, I also use Docker containers. In all honesty, though, most of the tools I use are in PyCharm — the terminal, the connection to the database, the Python console — this way I have all that and more just one click away.

– PyCharm is your primary Python IDE, can you recall when you first decided to use it?

Łukasz W.: I mentioned before that my first programming job was as a Ruby on Rails intern. Back then I didn’t know which IDE was good, so my teammates suggested me to use RubyMine. Later on, I had to start programming in Java, so, as far as IDEs go, I had only one choice: IntelliJ. After around a year of that, I had an opportunity to start a new project which would be written in Python and another system, which I worked on in Java. Back at the university, I had a chance to check out other Python IDEs and I had bad memories of those, so after RubyMine and IntelliJ I wanted to try PyCharm.

Łukasz Ć: About 3.5 years ago I started working with STX Next, and I had the possibility to use part of my training budget on tools for my work. I’ve used JetBrains tools before, so this was a perfect opportunity to purchase the license.

– Which PyCharm features increase your productivity the most?

Łukasz W.: There’s a bunch of those. The main one I use a lot is definitely the debugger. It allows me to connect to the project and stop the application from running at a given point and verify the variables or contexts. I also appreciate the fact that I can configure the project in a way that lets me launch it from PyCharm, either with the debugger or not. I also use the file watchers a lot. That allows me to define which files PyCharm is supposed to watch, change, and launch linters. All of us try to keep good practices in mind when writing code, but this way I don’t have to worry about them too much — PyCharm will worry about them for me. For example, it can add commas if I end up forgetting about them. Finally, I appreciate that PyCharm provides the actual connection to the database.

Łukasz Ć: I’d say this is my list: project interpreter, open recent, jump to the declaration, setting server configuration, autosuggestion, and visual guides.

– Have you ever encouraged other members of your team to use PyCharm?

Łukasz W.: I’m the only Python developer in my current team, but before that using PyCharm was a standard in my team. A colleague from another team helped us in one of the projects recently and I recommended PyCharm to him. Now he uses it whenever he’s working with Python. In fact, as far as I know, when he works on the frontend he uses WebStorm — another JetBrains IDE, but for JavaScript.

– Thank you for all your answers! Is there anything else you would like to share with us today?

Łukasz W.: You guys are doing a really good job developing software, not only for Python. I had a chance to use your other products like RubyMine, IntelliJ, dotPeek, etc., and it was a good experience.

Łukasz Ć.: Keep doing a good job! I work with 2-3 tools that were developed by you guys. Sometimes I do frontend, and then I use WebStorm. I also use Java at university and then I stick to IntelliJ.

Read this blog post to learn more about what our interviewees and their colleagues think of the different IDEs in the market and why they chose PyCharm as number one.

About the company

stxnext logoSTX Next is a European software house specialized in Python. Over 200 developers stand ready to empower different projects with extraordinary code and a results-driven Agile process. Apart from Python, STX is also an expert in JavaScript development. Their toolbox of frameworks includes Django, Flask, Angular, and React, each one chosen to create reliable solutions in short order. Their team consists of over 350 professionals, from software developers to UX designers, to automatic QA testers, to communication experts, all of them ready to ensure smooth cooperation with STX Next’s partners.



from PyCharm Blog
read more

Friday, May 8, 2020

PyCharm 2019.3.5

If you currently run PyCharm version 2019.3, this release comes with multiple bug fixes to improve your experience. Get it from within PyCharm (Help | Check for Updates), using JetBrains Toolbox, or by downloading the new version from our website.

In this version of PyCharm

The full list of fixes can be found on the release notes.

Getting the New Version

You can update PyCharm by choosing Help | Check for Updates (or PyCharm | Check for Updates on macOS) in the IDE. PyCharm will be able to patch itself to the new version, there should no longer be a need to run the full installer.
If you’re on Ubuntu 16.04 or later, or any other Linux distribution that supports snap, you should not need to upgrade manually, you’ll automatically receive the new version.



from PyCharm Blog
read more

Thursday, May 7, 2020

PyCharm 2020.1.1

We’ve fixed some issues in PyCharm 2020.1.1 that will either make your life easier and solve minor issues introduced by version 2020.1. You can update from within PyCharm (Help | Check for Updates), using JetBrains Toolbox, or by downloading the new version from our website.

In this version of PyCharm:

And many more small fixes, see our release notes for details.

Getting the New Version

You can update PyCharm by choosing Help | Check for Updates (or PyCharm | Check for Updates on macOS) in the IDE. PyCharm will be able to patch itself to the new version, there should no longer be a need to run the full installer.
If you’re on Ubuntu 16.04 or later, or any other Linux distribution that supports snap, you should not need to upgrade manually, you’ll automatically receive the new version.



from PyCharm Blog
read more

Wednesday, May 6, 2020

New Database Features in PyCharm 2020.1

PyCharm 2020.1 comes with new Database export features that make exporting data easier. You can now see previews of the data that you want to export, letting you have a quick glance of what the data will look like.

Furthermore, as many of our users prefer to export to Excel files, we’ve also added the ability to export Excel files as well. As a note, there is no preview for Excel, as it is a binary file.

[Blog] Export Excel

To add to this, PyCharm now lets you save your scripts into configurations, so that you can run them whenever you want to. Not only can you type in the script directly, you can also run a particular SQL file.

[Blog] Database Scripts



from PyCharm Blog
read more

Thursday, April 30, 2020

R 4.0.0 and better UX in the R Plugin

Although it has not been a while since our last update release, we’re ready to announce some important enhancements and new features:

  1. Long-awaited support of R 4.0.0 . Download it and try with the R plugin for PyCharm.
  2. In response to your feedback, we improved user interface and workflows for exporting generated plots into the portable network graphics (.png).  Just pull the lower-right corner of the plot to adjust its size. There are more helpful options to keep up the image quality. You can also enable opening the exported image right after clicking the Save button.pic1
  3. Want to have your code properly documented? It is quite easy to do with the newly added support for Roxygen. Describe your function, its parameters, return statement, related examples, and each time you hover over the function call, you’ll be able to preview the corresponding documentation in a dedicated popup.pic2

Interested?

Download PyCharm from our website and install the R plugin. See more details and installation instructions in PyCharm documentation.

 

 



from PyCharm Blog
read more

Wednesday, April 29, 2020

Interview: Koudai Aono, Author of pydantic Plugin for PyCharm

I’ve long been a big fan of pydantic by the prolific Samuel Colvin. In 2018, the package added support for dataclasses by providing its own decorator which “creates (almost) vanilla python dataclasses with input data parsing and validation.”

Alas, the “almost” was a sticking point. In particular, PyCharm’s code insight only treated the built-in decorator as something providing dataclass support. A PyCharm plugin was needed, first to make PyCharm treat pydantic dataclasses like regular ones, then to fill in coding assistance for the other aspects.

Enter Koudai Aono. Despite never having done an IntelliJ plugin, nor even much Java, he took on the task of making the Pydantic PyCharm Plugin. While we helped a bit, Koudai has generated over 20 releases and updates and is now working on really impressive features.

koudai_aono

We asked Koudai to do an interview with us about pydantic, his plugin, and the experience of writing a plugin.

Thanks for joining us. Can you give some background on yourself?

I’ve been living in Japan ever since I was born 32 years ago. I work as a software engineer for FULL MARKS, Inc, which is in Tokyo.

I started my programming career in computer science at a university. I chose Python to create software. Of course, I write other languages like TypeScript, JavaScript, Bash, Java, Go, by a situation.

How did you get involved with Python?

For personal projects and for work, I have developed many apps in Python.

I chose Python because I can use it in many use cases, which are small scripts, web apps, CLI/GUI apps, and cross-platform apps. Also, Python has an excellent community and a lot of third-party libraries.

Furthermore, I develop OSS software in Python. And I contribute to some projects to support the community.

Can you explain what is interesting about pydantic and how you got involved with it?

Python is a popular programming language that is dynamically typed. This feature provides us a few benefits, which include improving development speed.

However, we often must check the type of data and validate data. Pydantic has dataclasses with the same interface as Python’s dataclasses. But Pydantic’s dataclasses validate data and cast values to a defined type based on type annotations.

Pydantic has changed my coding style in Python, which increases the quality and my development speed.

Additionally, pydantic is used in FastAPI, which is a web framework made by Sebastián Ramírez. It’s recently popular in the Python world.

What prompted you to write a PyCharm plugin for pydantic?

I used pydantic in a few projects. Moreover, I contributed pydantic via GitHub.

One time, we found a situation that PyCharm could not analyze the signatures of __init__ method. The issue complicated my development. PyCharm could not inspect callable expression correctly when we instantiated pydantic’s dataclass. For example, when you instantiate a class in Python, you expect PyCharm to suggest signatures by autocomplete. Also, you would expect PyCharm to check the signature names and types.

We had known we could not resolve by changing pydantic’s code. But we could change the PyCharm implementation or create a PyCharm plugin.

You mentioned you haven’t done much Java and certainly haven’t written an IntelliJ plugin. Was it hard to get started?

We have to write Java or Kotlin to create a plugin.

I selected Kotlin to write a plugin because I am not a Java expert. Kotlin is a modern language which, if you have experience of other modern languages like Swift or TypeScript, then you can write Kotlin easily.

And, Intellij supported me when I wrote a plugin in Kotlin. I could write a plugin without stress.

How many releases before the plugin was useful for others?

It took a while. I needed to learn how to implement a feature in a plugin. PyCharm provides excellent APIs for developers.

I started with a small codebase to implement the minimum required functionality.

You have passed “basic support” and have now implemented refactorings, configurable warning levels, and more. What feature do you find is most useful when using the plugin?

I recommend __init__ signature inspection and auto-completion for pydantic models.

Notably, auto-completion is very powerful. The popup shows the signature type and remaining signatures. It means we don’t need to watch the model definition to confirm field names and field types. It can improve your coding speed and reduce stress.

What are some things JetBrains and PyCharm could do to produce more plugin success stories such as yours?

We need more examples and documentation of learning about writing plugins.

I read the official documentation for a plugin. It is a good start to develop a new plugin. However, the document doesn’t include features of PyCharm like Python’s AST. I had to check the PyCharm source code to understand it.

I hope in the future to read more examples and API references for PyCharm. Plus, the webinar with Joachim Ansorg is an excellent resource.

What has the experience been like to run an open-source project?

It’s an excellent experience.

Pydantic’s community members have supported me. They include pydantic’s author Samuel Colvin and pydantic’s collaborator David Montague. Also, I created an issue in JetBrains’ issue tracker.

I discussed it with PyCharm core developer Semyon Proshev on this issue page. He implemented a feature in PyCharm to resolve our need for a plug point. And the feature has been released as PyCharm 2020.1.

I appreciate all the support I received from everyone.

Have any big ideas for future releases?

Yes, I have some ideas. For example, I am developing a code generator which is called datamodel-code-generator for pydantic models from OpenAPI, JsonSchema, JSON data, and other data. I plan to run this code generator on PyCharm by clicking the context menu of a file like OpenAPI.

Moreover, I hope to create another plugin which improves auto-completion and type-checking inspection by type annotation. I have gained some knowledge of PyCharm in the current project which will be useful in the next one.



from PyCharm Blog
read more

Monday, April 27, 2020

Webinar Recording: “How To Build Real-Time Interactions In Your Django 3 App” with Calvin Hendryx-Parker

Last week we hosted Calvin Hendryx-Parker from Six Feet Up for a webinar covering real-time Django 3: Django Rest Framework, Django Channels, ASGI, web sockets, a little Docker, and more. The recording is now available:

Contents

This really was a fantastic webinar. In roughly an hour, Calvin walked a path through quite a number of modern Django features, with a real application, and using PyCharm to stay productive. Very practical and informative.

  • 05:52 – Overview of what will be covered
  • 11:23 – Get the branch
  • 12:40 – Demo the working application
  • 15:05 – Start adding finite state machine feature
  • 16:45 – Review Docker Compose file
  • 18:00 – Show the Makefile plugin for PyCharm
  • 19:01 – Add workflow state to model
  • 20:23 – Setup project interpreter
  • 22:36 – Browse database tables
  • 26:35 – Use the PyCharm “HTTP Request” tool to test DRF
  • 45:15 – Add a Publish button
  • 52:17 – Configure and use Django Channels
  • 58:15 – Switch Django to use ASGI server
  • 1:02:00 – Put a React component in frontend for live updates
  • 1:04:00 – Demo two browser windows connected via WebSocket backend

Speaking To You

Calvin Hendryx-Parker is an AWS Community Hero and the co-founder and CTO of Six Feet Up, a Python development and Cloud consulting company established in 1999. At Six Feet Up, Calvin establishes the company’s technical vision and leads all aspects of the company’s technology development. He provide the strategic vision for enhancing the company’s infrastructure, and works with the team to set company priorities/processes that improve development. Calvin is the co-founder of the Python user group IndyPy, the largest tech meetup in Indiana with 1,900+ members.



from PyCharm Blog
read more

Thursday, April 23, 2020

PyCharm & DSF Campaign 2020 Results

PyCharm and DSF campaign results

Good news for Python Django developers!

The partnership between PyCharm and the Django Software Foundation has just raised 40,000 USD!

For the fourth time, JetBrains PyCharm boosted the Django Software Foundation (DSF) fundraising with the campaign ‘Get PyCharm, Support Django’, where for 28 days users could purchase new individual PyCharm Professional annual subscriptions 30% OFF while giving the full amount of their purchase directly to the DSF. Even given current conditions, the campaign was a success, raising a total of 40,000 USD and representing 20% of the Foundation’s funding goal for 2020.

 

Your donation has a huge impact!

The amount raised will be used by the DSF to fund development sprints, community events, projects such as the Django Girls and the Django Fellowship Program, and more! Programs like the Django Fellowship make it possible for Django to be current with changes in the Python ecosystem and ultimately benefits you, the developer, that will always have an up-to-date framework to work with.

The donations will also be used to keep the development of new features going on. One example is the upcoming ‘Asynchronous views and middleware support‘, a major feature planned for the next release that will provide full support for an asynchronous request path, including asynchronous views, asynchronous middleware, and asynchronous tests and test client.

 

“JetBrains PyCharm has been a major supporter of Django and the Django Software Foundation these past four years. The $40,000 raised during this year’s campaign represents 20% of the DSF’s annual budget, which goes directly into funding the continued development and support of Django via the Django Fellowship program and Django conferences worldwide. On behalf of the community, our deepest thanks to JetBrains PyCharm for their generous continued support.”

– Frank Wiles, DSF President

 

To finalize, we want to thank the DSF for the successful collaboration and remind you that the fundraising is still ongoing and you can donate directly at djangoproject.com/fundraising/.

See you next time!



from PyCharm Blog
read more

Wednesday, April 22, 2020

New VCS Features in PyCharm 2020.1

The Version Control System support in PyCharm has been revamped with a new and improved commit workflow as well as an interactive rebasing option. This means, that it gives you more control over the way you commit your changes.

New Commit Tool Window

[Blog] New VSC commit Window

There are a couple of changes that are noteworthy. Now, when you commit, it no longer opens up a dialog box (although if you like the old way of doing things, you can keep it that way). Instead, what you see is the commit panel. The commit panel keeps track of all the changes that you have made in your versioned files.

This change from a non-modal panel makes small meaningful commits easier; this makes commits far easier to summarize. This change does not remove any of the functionality that the previous modal-commit window had. This means, committing, adding or removing files, having files versioned or ignored as well as managing remotes are are functionalities that are still present.

Interactive Rebase

[Blog] Interactive Rebase

With the new non-modal commit window, it is quite possible that one will make quite a few commits. In order to make sure that you have a clean commit history before pushing, the new Interactive Rebase feature offers a way to clean up your commit history with ease.

The Interactive Rebase feature is a UI on top of git’s existing rebase functionality that makes it easier to change one’s commit history. This means, that you can squash, fixup, drop and reword your commits.

[Blog] Fixup

A squash allows one to combine multiple commits into one while retaining the messages of the commits that have been combined.

[Blog] Squash

A fixup allows one to combine multiple commits into one. It is very similar to squashing commits but different in one particular aspect, which is that when squashing commits, the final commit will include the commit messages of all the commits that have been squashed into it. However, with a fixup, the other messages of the commits are discarded.

Dropping and rewording are self-explanatory. A drop removes the commit and its corresponding changes entirely. A reword changes the message of a particular commit.

Rebasing changes the history of one’s commits, so one must be careful when pushing a rebased branch to the origin; especially a branch that changes often like the master branch of a repository.



from PyCharm Blog
read more

Wednesday, April 8, 2020

PyCharm 2020.1 Out Now

Rebase your branch with ease, debug smarter, and use a font designed for programming. Download the new version now, or upgrade from within your IDE.

New in PyCharm

  • Interactive Rebasing: Commits can get messy, which is why you need to be able to rebase your branch. Now, PyCharm allows you to do so visually and with unprecedented ease.
  • Smarter Debugging: PyCharm’s debugger now makes it easy to see what’s happening in the middle of a complex statement. When stepping in, the debugger will ask you exactly what part of the statement you want to investigate further.
  • JetBrains Mono: PyCharm helps you read your code by navigating your project effectively, and now also by presenting your code in a font designed specifically for it.
  • Django Template Imports: PyCharm Professional Edition makes life easy for web developers by offering code completion (and debugging) in Django templates. We’ve made a couple improvements on this front: auto import for custom tags and better completion.

And many more improvements, like faster indexing of interpreters, read about them all on our What’s New page.



from PyCharm Blog
read more

Tuesday, April 7, 2020

Webinar: “How To Build Real-Time Interactions In Your Django 3 App” with Calvin Hendryx-Parker

Django 3 has been making the rounds, so time for a webinar showing how to use the new features within PyCharm Professional. Calvin Hendryx-Parker from Six Feet Up, previous webinar presenter, is returning to give us the highlights.

  • Wednesday, April 22
  • 12:00 – 13:00 PM EDT
  • Register Now
  • Aimed at developers with basic Django and PyCharm experience

How To Build Real-Time Interactions In Your Django 3 App

Outline

Django 3 brings new features and possibilities. Calvin Hendryx-Parker, previous webinar guest, gives us a tour from a PyCharm perspective:

  • Introduction of new features in Django 3
  • How to use those new features in your app
  • Live coding of async features into an app using PyCharm

Speaking To You

Calvin Hendryx-Parker is the co-founder and CTO of Six Feet Up, a Python web application development company focused on deploying content management systems, intranets and portals, as well as custom web apps using Django, Pyramid and Plone. Under Calvin’s technical leadership, Six Feet Up has served organizations like Amtrak, Eli Lilly, NASA, UCLA and the United Nations.

As an advocate of open source, Calvin is also the founder and organizer of the IndyPy meetup group and Pythology training series in Indianapolis. In 2016 Calvin was nominated for a MIRA Tech Educator of the Year Award.



from PyCharm Blog
read more

Thursday, April 2, 2020

PyCharm 2020.1 Release Candidate

We’ve passed the final approach fix, and we’re now established on the glideslope for the PyCharm 2020.1 release. This week’s build brings a couple of bug fixes as we hope to take the release in for a smooth landing. Let us know how we’re doing by getting this version, if you run into any issues please leave us a ticket on YouTrack.

Improvements in this version

  • Creating a scientific project (pro only) would fail as a tool window was giving us trouble. This has been resolved.
  • Developing with pleasure means that keyboard navigation of forms should work as expected, we had an issue in the new SSH configuration screen (pro only), and this is now resolved.
  • PyCharm Professional Edition bundles all database features from JetBrains DataGrip, and they’ve made a couple of improvements that are available in this build: Microsoft SQL Server sparse columns are now supported, and AWS Redshift stored procedures should now have working introspection.

Read the release notes to learn more.

Interested?

Download the RC from our website. Alternatively, you can use the JetBrains Toolbox App to stay up to date.

If you’re on Ubuntu 16.04 or later, you can use snap to get PyCharm RC versions, and stay up to date. You can find the installation instructions on our website.

The release candidate (RC) is not an early access program (EAP) build, and does not bundle an EAP license. If you get PyCharm Professional Edition RC, you will either need a currently active PyCharm subscription, or you will receive a 30-day free trial.



from PyCharm Blog
read more

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...