Increasing Open Source Collaboration for Better Scientific Code Open Source Collaboration in Python for CDF files - The Shared Attribute and Metadata Management Interface (SAMMI) Project Standards for open source Maxine Hartnett¹, Andrew Robbertz², Damian Barrous-Dume³, Matthew Bourque¹, Tenzin Choedon¹, Steven Christe⁴, Luisa Croakley¹, Sean Hoyt¹, Nat Kerman¹, Greg Lucas¹, Ana Manica¹, Tori Marbois¹, Veronica Martinez¹, Tim Plummer¹, Daralynn Rhode¹, Laura Sandoval¹ Contributions are made Contributions are made back into the open source project, as users ﬁnd bugs or develop new features Code is made open source Code is made publicly available, with documentation and other tools for easy use Code is used Projects ﬁnd open source code that addresses unsolved problems The Cycle of Open Source What is SAMMI? Why did this work? Design and Usage The Shared Attribute and Metadata Management Interface (SAMMI) is an open source Python library for managing ISTP (International Solar-Terrestrial Physics) CDF attributes. The tool uses YAML files to assign metadata to CDF variables, making it easy to track data attributes in version control software next to Python processing code. It also validates variables against the ISTP metadata standards. SAMMI is lightweight and extensible, making it usable for a variety of project needs. The YAML files are human and machine readable, so they’re easy to update and read for non-technical users. YAML also provides a tools for creating default values for attributes, reducing duplicated information. An example file for the global attributes of IMAP SAMMI solves a common problem for projects which are required to produce ISTP CDF files. These files all follow the same requirements and standards, but there wasn’t a publicly available way to manage attributes in version control software. Both the NASA Space Weather Science Operations Center (SWxSOC) and the IMAP Science Data Center (SDC) were independently developing similar systems for solving the problem when members from both teams attended the Workshop for Collaborative and Open Source Science Data Systems at LASP. Since SWxSOC had their code open source, it was easy to identify the shared piece of work. Both teams collaborated to take the initial iteration of the attribute management system and make it a separate library that was flexible enough for both projects to use. Today, both projects depend on the shared SAMMI repo and contribute new features. Code reviews, contribution guidelines, and automatic testing make contributing back easy. License, documentation, and consistent releases make code useable. Code style, good code design, and documentation make projects easier to modify. Standards for open source repositories help create tooling that can be widely used and modified. The most important and, luckily, the simplest, is the license on the code. Without a license attached to open source code, no one else is legally able to use it. Also key is documentation. Without documentation, people would need to read your code to learn how to use it and why. At minimum, projects should include a short description and some basic usage and installation instructions. However, the more documentation, the better. The best open source projects have extensive documentation and large communities that can teach new users about the tool. Finally, tools that ensure code quality are great to have in an open source repository. High quality code is more reliable, easier to modify, and therefore less risky to adopt. Some tools that we use in the SAMMI repo are: ●Required code reviews ●Automatic releases ●Automatic unit tests ●Pre-commit tools to enforce a consistent code style How do you create tools that other people can actually use? 1. Use a license 2. Make the tool easy to use through documentation and good design 3. Create a reliable tool through regular releases and code reviews Using an open source project introduces some unavoidable risk. As a developer, reducin