Skip to content

New Developer

Chris Meyer edited this page Oct 5, 2023 · 55 revisions

Welcome and thanks for your interest in becoming a Nion Swift core Python developer!

This page gives background requirements and suggested steps/reading for successfully contributing to Nion Swift as a core Python programmer.

If your background is in scientific application programming and not in computer science, you will find the Contributing page more helpful.

Requirements for a Core Python Developer

Entry Level

  • A degree in Computer Science, similar major, or similar experience, completed or in progress.
  • Know basics of Python programming.
  • Be excited about programming!
  • Experience with GitHub issues and standard Git workflows. Have a GitHub account.
  • Willingness to work on open source. Your contributions will be licensed under the particular project's license (GPL, Apache).

Expert Level

  • A degree in Computer Science or similar major.
  • Expertise in Python 3.11+.
  • Ability to demonstrate a good development workflow (see below).
  • An understanding of abstractions, object oriented programming, functional programming.
  • Excellent UI design skills for addressing workflow, data acquisition, processing, and other user tasks.
  • Knowledge of the differences between Python threading, asyncio, and multiprocessing.
  • Experience with Python typing (include generics) and use of mypy type checker.
  • Knowledge of closures and how they appear in Python.
  • Knowledge of Python protocols, which were introduced in Python 3.8.
  • Experience with GitHub issues and standard Git workflows. Have a GitHub account.
  • A familiarity with the various Python distributions including Anaconda, conda-forge, PyPI, and PyPy.
  • Ability to work in cross platform environments: Windows, macOS, Linux.
  • Experience with NumPy (including indexing, broadcasting, and fancy indexing).
  • Experience with SciPy, and Qt if they are used for your contributions.
  • Willingness to work on open source. Your contributions will be licensed under the particular project's license (GPL, Apache).
  • An aptitude for documenting complex architecture through both code and text.

Steps for a New Developer

General Note

Please file issues for incomplete, inconsistent, difficult to understand, or out of date information for any of these steps. Feedback is important.

Introductions

  1. Browse the Nion website to understand Nion's electron microscope product.
  2. Follow through the Nion Swift QuickStart Guide.
  3. Understand the purpose of Nion Swift and read the User's Guide (incomplete, but useful).
  4. Meet the development team via email or zoom, trade contact information (email, chat, zoom, optionally phone).
  5. Review expectations and state of the product with your mentor or manager.

Try Out the Software

  1. Install a pre-packaged Nion Swift and try to do some simple tasks.
  2. Follow through the Nion Swift QuickStart Guide if not done already.
  3. You can follow the (more complicated) installation instructions on macOS, Windows, or Linux.
  4. Note: The downloadable version of Nion Swift cannot be easily used for development since it does not include a full Python environment, but it can be used to see how the user interface works.

Development Environment

You'll need to install your favorite development environment. We use PyCharm, Visual Studio, and Spyder.

  1. Install Nion Swift as a Developer Installation.
  2. Install Nion Swift STEM simulator (Scanning Transmission Electron Microscope) from source and try it out.
  3. Run the integration tests.
  4. Advanced Run the typing verifications.

Programming Background Material

If you're doing more advanced work, you'll need to understand the architecture of Nion Swift. If you're entry level or intern, we'll help you out!

Some of the Wiki pages are out of date; they're still useful to understand the background.

  1. Read the Requirements, Functional Overview, Design Guidelines, and Contributing documents.
  2. Read the NionUI documentation, a UI framework based roughly on a Qt backend.
  3. Read the Debugging page for useful tips on debugging and development.
  4. Read the Nion Swift background material on the Wiki
  5. Read the NionSwift Instrumentation documentation.
  6. Feedback is important! File issues for:

Community Resources

  1. Browse open bugs, feature requests, and project boards.
  2. Browse discussion groups.
  3. Browse the mailing list. Consider joining.
  4. Browse the chat room. Consider participating.

Actual Development

We strongly recommend test driven development. Here is how we use it: write a test to demonstrate a bug; fix bug; ensure test passes with fix and fails without fix. For new features, write tests to test new feature after it has been added.

  1. Sign the license agreement or make another arrangement with Nion for contributions.
  2. Install private keys or credentials if working on private repositories.
  3. Pick an issue or two in collaboration with your mentor or manager.
  4. Ask questions about issue, plan for implementation, etc.
  5. Write a test demonstrating the bug or testing the new feature.
  6. Attempt to fix the issue and submit a PR. Submitting a PR will also run integration tests and type checking also.
  7. Listen to feedback and revise until PR is accepted or postponed.
  8. File additional issues or add explanation if not able to solve problem in existing code base.
  9. Weekly checkin to review work and plan next steps.

Typical Development Workflow

  1. Pick a task/issue suited for your skill level and expertise based on priorities and suggestions from the team.
  2. Spend some time discussing with the team and understanding the task in detail.
  3. Why is the task required now? What are the benefits to users? What are the roadblocks? What are the prerequisite tasks?
  4. Can the task be broken into smaller steps? Can the task be split into steps that are useful for other tasks? If so, do those first.
  5. As much as possible, record plans/answers in the issue in GitHub.
  6. Make a detailed plan for implementation (use a short tasklist in GitHub) or email to the team.
  7. Once the plan is approved by the team, begin implementing the solution.
  8. Typically, starting implementation will expose additional issues - so repeat earlier steps as required.
  9. Create a pull request for significant steps along the way. Review. Modify. Merge.

References