Webinar Preview: “Debugging During Testing” tutorial steps for React+TS+TDD

As a reminder… next Wednesday (Oct 16) I’m giving a webinar on React+TypeScript+TDD in PyCharm. I’m doing some blog posts about material that will be covered.

webinar2019_watch-the-recording-171

See the first blog post for some background on this webinar and its topic.

Spotlight: Debugging During Testing

I often speak about “visual debugging” and “visual testing”, meaning, how IDEs can help put these intermediate concepts within reach using a visual UI.

For testing, sometimes our code has problems that require investigation with a debugger. For React, that usually means a trip to the browser to set a breakpoint and use the Chrome developer tools. In Debugging During Testing With NodeJS we show how the IDE’s debugger, combined with TDD, can make this investigation far more productive. In the next step we show how to do so using Chrome as the execution environment.

Here’s the first video:

Then the second step, showing debugging in Chrome:

TDD is a process of exploration, as well as productive way to write code while staying in the “flow”. The debugger helps on both of those and is an essential tool during test writing.

Posted in Tutorial | Leave a comment

2019.3 EAP 5

A new version of the Early Access Program (EAP) for PyCharm 2019.3 is available now! Download it from our website.

New for this version

Toggle between relative and absolute imports

PyCharm now has the ability to add imports using relative and absolute within a source root. Use intention actions to convert absolute imports into relative and relative imports into absolute.

change-relative-absolute

The usage of relative paths is also available through the import assistant. You can add relative imports when fixing missing imports within your current source root.

autoimport

Select testing framework for all New Projects

PyCharm now allows you to preselect a default test runner for newly created projects. To configure this go to File | Settings for New Projects for Windows and Linux, or File | Preferences for New Projects for macOS. Select Tools | Python Integrated Tools and under the Testing section choose your desired test runner.

MongoDB support is here!

We are excited to announce that we now have initial support for MongoDB. Available already in this EAP, use functionality such as observing collections and fields in the database explorer, using the data viewer to explore your data, and performing queries in the query console.

FrameCapture 2019-10-10 at 05.31.15 PM

If you wish to explore more about this feature click here.

Improved Github experience

The Get from Version Control dialog was improved. There’s now an option available for Github projects specifically to select repositories where you can scroll through a list of available repositories in your account.

Another improvement that you will be able to use is the Github Pull Request window (accessible through VCS | Git | View Pull Requests) which shows you the list of all the pull requests in the project you’re working with, their status and changed files. In addition, if you feel curious to see additional data regarding a pull request, double-click on the pull request you wish to explore and get comments, information about reviews and more.

Further improvements

  • We fixed an issue caused by packages installed as editable that lead to unresolved references.
  • The stub packages usage experience was improved:
    • The incompatible suggestions between stub packages and runtime packages are no longer an issue.
    • PyCharm will now suggest you newer versions if available.
  • For more details on what’s new in this version, see the 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.

Posted in Early Access Preview | 2 Comments

Webinar Preview: “Starting Testing” tutorial step for React+TS+TDD

As a reminder… next Wednesday (Oct 16) I’m giving a webinar on React+TypeScript+TDD in PyCharm. I’m doing some blog posts about material that will be covered.

webinar2019_watch-the-recording-171

See the first blog post for some background on this webinar and its topic.

Spotlight: Starting Testing

The first tutorial steps got us setup in the IDE, with a sample project generated and cleaned up. Now it’s time to learn React and TypeScript by…writing tests?

Indeed! This tutorial is trying to sell you on the idea that you’ll be more productive and happier writing and using your components from inside the IDE, instead of constantly heading over to the browser. For most of the steps in the tutorial, you do all of the learning, typing, and running from within a test, staying in the IDE and in the “flow”.

That’s the point of this tutorial step covering testing. Get you into a Jest run configuration, code on the left, tests on right, test runner at the bottom. We write some tests, “fail faster”, and get introduced to Jest and Enzyme.

Here’s the narrated video to go along with this tutorial step:

If you’re interested in more, here’s the entire tutorial. Hope to see you next week.

Posted in Tutorial | Leave a comment

Webinar Preview: Project Setup for React+TS+TDD

Next Wednesday (Oct 16) I’m giving a webinar on React+TypeScript+TDD in PyCharm. Let’s give a little background on the webinar and spotlight one of the first parts covered.

webinar2019_watch-the-recording-171

Background

Earlier this year we announced a twelve-part in-depth tutorial on React, TypeScript, and Test-Driven Development (TDD) in PyCharm. For the most part it highlights PyCharm Professional’s bundling of WebStorm, our professional IDE for web development.

The tutorial is unique in a few ways:

  • It’s React, but with TypeScript, a combination with spotty coverage
  • Concepts are introduced through the lens of test-driven development, where you explore in the IDE, not the browser
  • Each tutorial step has a narrated video plus an in-depth discussion with working code
  • The tutorial highlights places where the IDE does your janitorial work for you and helps you “fail faster” and stay in the “flow”

This webinar will cover sections of that tutorial in a “ask-me-anything” kind of format. There’s no way we’ll get through all the sections, but we’ll get far enough give attendees a good grounding on the topic. As a note, I’m also later giving this tutorial later as a guest for both an IntelliJ IDEA webinar and Rider webinar.

I really enjoy telling the story about combining TypeScript with TDD to “fail faster”, as well as letting the IDE do your janitorial work to help you stay in the “flow.” Hope you’ll join us!

Spotlight: Project Setup

The tutorial starts with Project Setup, which uses the IDE’s integration with Create React App to scaffold a React+TypeScript project. Note: The tutorial is, as is common in the world of JS, six months out of date. Things have changed, such as tslint -> eslint. I’ll re-record once PyCharm 2019.3 is released, but for the webinar, I’ll use the latest Create React App.

For this tutorial I started with an already-generated directory, but in the webinar I’ll show how to use the IDE’s New Project to do so.

This tutorial step orients us in the IDE: opening package.json to run scripts in tool windows, generating a production build, and running a test then re-running it after an edit.

The second tutorial step does some project cleanup before getting into testing.

Posted in Tutorial | Leave a comment

2019.3 EAP 4

This week’s Early Access Program (EAP) for PyCharm 2019.3 is available now! Download it from our website.

New for this version

Test templates for pytest support

Support for pytest test creation using pytest templates was added. Now you can create and edit test files using pytest templates.

To create a test using these templates first you will need to set pytest as the default test runner (Settings/Preferences | Tools | Python Integrated Tools  then on the Default test runner option select pytest).  Then navigate to the context menu from the method declaration you wish to create a test from. Click on Go To | Test and select Create New Test. A dialog will open so you can configure your testing file accordingly. Once you click OK on this dialog PyCharm will generate a file using the appropriate test method.

Screenshot 2019-10-03 at 3.23.53 PM

Fixed in this version

  • The “Go to Declaration”/”Go to Implementations” behavior was corrected so they will properly lead to library implementations and not other files.
  • We fixed an error that made imports to be inserted before module-level dunder names. Now, in compliance to PEP-8, imports are placed after dunders.
  • An issue was solved that wasn’t allowing to use quick fix to install missing packages when the interpreter is switched through the Status Bar.
  • Some issues causing an interpreter not to be removed through the project settings or changed when using the interpreter widget were solved.
  • For more details on what’s new in this version, see the 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.

Posted in Early Access Preview | Leave a comment

Webinar: “React+TypeScript+TDD in PyCharm” with Paul Everitt

ReactJS is wildly popular and thus wildly supported. TypeScript is increasingly popular, and thus increasingly supported.

The two together? Not as much. Given that they both change quickly, it’s hard to find accurate learning materials.

React+TypeScript, with PyCharm? That three-part combination is the topic of this webinar. We’ll show a little about a lot. Meaning, the key steps to getting productive, in PyCharm, for React projects using TypeScript. Along the way we’ll show test-driven development and emphasize tips-and-tricks in the IDE.

  • Wednesday, October 16
  • 6:00 PM – 7:00 PM CEST (12:00 PM – 1:00 PM EDT)
  • Aimed at intermediate web developers familiar with React
  • Register here

webinar2019_watch-the-recording-171

About This Webinar

This webinar is based on a 12 part tutorial with write-ups, videos, and working code for each step. The tutorial covers: getting started with Jest testing, debugging, TSX, functional components, sharing props with types, class based components, interfaces, testing event handlers, and “dumb” components.

You could, of course, skip this webinar and go through the material. Or you could go through the material and use the webinar to ask questions. Either way, we’ll give a quick treatment of each topic.

As a note, I’ll be doing this same webinar, but in webinars with IntelliJ and Rider, later in the year.

One final point: the tutorial and this webinar teach React+TS while sitting in tests, rather than the browser. It’s a productive way to work and makes for a good learning experience.

Speaking To You

Paul is the PyCharm Developer Advocate at JetBrains. Before that, Paul was a co-founder of Zope Corporation, taking the first open source application server through $14M of funding. Paul has bootstrapped both the Python Software Foundation and the Plone Foundation. Paul was an officer in the US Navy, starting www.navy.mil in 1993.

Posted in Webinar | Tagged | Leave a comment

Webinar Recording: “10 Tools and Techniques Python Web Developers Should Explore” with Michael Kennedy

Our friend Michael Kennedy joined us yesterday for a webinar on tips every Python web developer could benefit from. As is usual with his webinars, it was a lot of fun, very well-prepared, and packed a ton of useful information. The recording is now available as well as his repository of examples.

During the webinar, Michael covered the following material:

  • 1:50: HTML5 Form Features
  • 7:40: ngrok
  • 14:57: async/await
  • 28:49: Database Migrations
  • 42:27: Vue.js for rich frontend
  • 46:52: View Models
  • 50:32: Docker
  • 53:24: letsencrypt for SSL
  • 59:33: secure.py
  • 1:00:20: Wrapup

Further material is available: previous webinar on async/await, his course on concurrency, his course on MongoDB, his “Effective PyCharm” book with Matt Harrison, and his Mastering PyCharm course, in addition to his podcasts.

Thanks again Michael for helping PyCharm users get up-to-speed on these important topics.

Posted in Webinar | Tagged | Leave a comment

2019.3 EAP 3

A new version of the Early Access Program (EAP) for PyCharm 2019.3 is available now! Download it from our website.

New for this version

Literal types support

Python 3.8 release is right around the corner and we are working on supporting its latest features. PyCharm 2019.3 EAP 3 introduces the support for Literal types. Literal types is Python 3.8’s new alternative to define type signatures for functions (PEP-0586). With this now you have the ability to indicate that some expression expects a specific and concrete value.

Screenshot 2019-09-26 at 11.54.59 AM

Further improvements

  • Our stub support was extended to support proper code autocompletion for modules like ‘sys’, ‘logging’, ‘concurrent’ and ’email’.
  • An issue causing the output of a Jupyter notebook not to render properly was fixed.
  • We renamed the tabs for the Jupyter toolwindow to avoid confusions. Now it will more obvious that the outer one refers to the process and the inner one to its output.
  • For more details on what’s new in this version, see the 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.

Posted in Early Access Preview | 2 Comments

PyCharm 2019.2.3

PyCharm 2019.2.3 is now available!

Fixed in this Version

  • We solved an issue that was causing an error when invoking string literals.
  • Regression errors were fixed in the debugger:
    • The usage of multiprocessing on programs resulted on the inability to debug them and that was solved.
    • We fixed the issue that caused uncaught exceptions not to show traceback data.
    • Breakpoint usage while executing code in debug mode was causing different execution behaviors resulting in errors and that was fixed.
  • The problem causing Python interpreter not to be properly set if downloaded from the Windows Store was fixed.

Further Improvements

  • The SVN performance was improved to avoid unnecessary processing of SVN operations’ results. Now projects with large amount of files using such version control system will experience enhanced processing times.
  • Some other platform issues were solved as well and much more, check out our release notes for more 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.

Posted in Release Announcements | 11 Comments

2019.3 EAP 2

We have a new Early Access Program (EAP) version of PyCharm that can be now downloaded from our website.

New in the EAP

  • Support was added for namespaces coming from packages. PyCharm now recognizes namespaces defined by other packages.
  • Fixed a TensorFlow issue with its new version that wasn’t allowing PyCharm to recognize it properly as a library.
  • Annotations were improved in a way that they won’t show unnecessary error messages for string literals.
  • We fixed the position of the caret when an input is called for on the console. Before it was being shown at the beginning of the input call and now it is properly positioned at the end right next to where the input is about to be introduced.
  • The autocomplete for methods inside classes now includes the ‘self’ parameter if smart enter is used.

Further Improvements

  • The code inspection warning reprioritized the list of actions, giving a higher priority to quick fixes rather than run/debug actions.
  • Option to customize scrollbar visibility from the appearance settings.
  • And much more, check out the release notes for further details.

Interested?

Get the latest EAP build from our website. Alternatively, you can use the JetBrains Toolbox App to stay up to date throughout the entire EAP.

EAP Program Key Facts

  • The EAP version of PyCharm Professional Version is free to use
  • EAP build will expire after 30 days
  • This is pre-release software, you may face stability issues and other rough edges
  • You can install the EAP version alongside a stable version of PyCharm
  • EAP versions of PyCharm report statistics by default, you can opt out by changing the settings in Preferences | Appearance & Behavior | System Settings | Data Sharing
  • There’s an EAP version of the documentation as well
Posted in Early Access Preview | 1 Comment