Skip to content

Commit

Permalink
add contribution guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ttricco committed Oct 11, 2024
1 parent 626d671 commit a17b6a7
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,20 @@ Please note that we adhere to a [code of conduct](CODE_OF_CONDUCT.md).
Citation
--------

Please cite the paper if you use Sarracen within your work (DOI: [10.21105/joss.05263](https://doi.org/10.21105/joss.05263)).

*Sarracen: a Python package for analysis and visualization of smoothed particle hydrodynamics data.* Journal of Open Source Software, 8(86), 5263, 2023.

Please cite the paper if you use Sarracen within your work. Sarracen is published with the Journal of Open Source Software (DOI: [10.21105/joss.05263](https://doi.org/10.21105/joss.05263)).

```
@ARTICLE{Sarracen,
author = {{Harris}, Andrew and {Tricco}, Terrence},
title = "{Sarracen: a Python package for analysis and visualization of smoothed particle hydrodynamics data}",
journal = {The Journal of Open Source Software},
keywords = {smoothed particle hydrodynamics, data visualization, Python, data science, Jupyter Notebook, astrophysics, astronomy},
year = 2023,
month = jun,
volume = {8},
number = {86},
eid = {5263},
pages = {5263},
doi = {10.21105/joss.05263},
}
```
39 changes: 39 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,42 @@ This helps us keep common issues in public view. Feel free to also `email <mailt

Please note that we adhere to a `code of conduct <https://github.com/ttricco/sarracen/blob/main/CODE_OF_CONDUCT.md>`_.


Developer Guidelines
--------------------

There are several guiding principles to the development of Sarracen that we follow.

1. **Simple, intuitive API.**

A low barrier of entry for new users is important to us. This is why we model off of common scientific libraries, as we expect our users to be familiar with these tools. The naming of functions and their arguments should be clear, follow standard patterns, and avoid unnecessary complexity.

2. **Efficiency.**

Performance is important. A simple guiding principle is to leverage built-in pandas or NumPy functions when possible.

3. **Pure Python.**

Sarracen is developed entirely in Python, without mixing in other code extensions such as Cython. Code efficiency is important, but we prioritize the maintainability and portability afforded by a pure Python codebase.

4. **Unit tested.**

We use pytest to comprehensively test Sarracen. Any new code added should come with an associated set of unit tests. System testing is important, but unit tests ensure the long-term correctness and reliability of Sarracen.

5. **Avoid code lint.**

We use flake8 to conform to Python style guides. Avoiding lint might not help write good code, but it can help avoid writing bad code. Our aim is to reduce technical debt to help ensure consistency and readability across the codebase.

If you have a new code addition or a change to existing code that you would like to submit, start by making a pull request (PR) on GitHub.

Pull Requests
-------------

All changes to Sarracen's code base are made through Pull Requests. Start by forking Sarracen on GitHub. Add your changes to your repository on your GitHub account (optionally on a development branch on your account). Then use GitHub to open a new Pull Request. Add details about your change, and resolve any issues found by the automated GitHub actions.

GitHub Actions
--------------

Code commits use GitHub actions to automatically check for code lint.

If the automated linter finds lint errors in your code, check the details by going into the action's job details. Expand the section "Super-linter" marked by the red X, and then expand the PYTHON_FLAKE8 section. This will give you the output from flake8, such as the specific lines of code and their associated lint errors.

0 comments on commit a17b6a7

Please sign in to comment.