You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODING_GUIDELINES.md
+84-15Lines changed: 84 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,99 @@ This document contains the coding guidelines for the ASPIRE Python project.
6
6
## Coding Style
7
7
8
8
In order to keep the code consistent, please read and follow [PEP 8 Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008)
9
-
and [PEP 257 Docstring Conventions](https://www.python.org/dev/peps/pep-0257/) guidelines. [This webpage](https://realpython.com/documenting-python-code/) is a good guide for documenting Python code.
10
-
For automatic checking of style problems, [Pycharm from Jet Brains](https://www.jetbrains.com/pycharm/)
11
-
is a good candidate which has the professional version for academic users with free license fee.
9
+
and [PEP 257 Docstring Conventions](https://www.python.org/dev/peps/pep-0257/) guidelines. [This webpage](https://realpython.com/documenting-python-code/) is a good guide for documenting Python code.
10
+
For an editor with some automatic checking of style problems, [Pycharm from Jet Brains](https://www.jetbrains.com/pycharm/)
11
+
is a good candidate which has the professional version for academic users with free license fee.
12
12
13
+
In the future components of PEP8 and PEP257 will be checked programmatically. Documentation of a standard tool to perform
14
+
these operations locally will be provided in Google Doc to developers at that time.
13
15
14
-
## Best Practices
16
+
## Good Practices Reading
15
17
16
-
For beginners in scientific computing, some general guides are suggested in Greg Wilson's papers as below:
17
-
18
-
1.[Good Enough Practices in Scientific Computing](https://doi.org/10.1371/journal.pcbi.1005510)
19
-
2.[Best Practices for Scientific Computing](https://doi.org/10.1371/journal.pbio.1001745)
18
+
Some thoughts on Scientific Computing are discussed in Greg Wilson and collaborators' paper as below:
20
19
20
+
1.[Good Enough Practices in Scientific Computing](https://doi.org/10.1371/journal.pcbi.1005510)
21
+
2.[Best Practices for Scientific Computing](https://doi.org/10.1371/journal.pbio.1001745)
21
22
22
23
## Source Code Control
23
24
24
-
As an open source software, we use Git and GitHub for our source code control.
25
-
The following links are useful tutorials.
26
-
1. Git tutorials from [Atalassian](https://www.atlassian.com/git/tutorials) and [Git-SCM](https://git-scm.com/docs/gittutorial)
27
-
2. GitHub guides from [GitHub](https://guides.github.com/)
25
+
As an open source software, we use Git with GitHub for our source code control.
26
+
The following links are useful tutorials.
27
+
1. Git tutorials from [Atlassian](https://www.atlassian.com/git/tutorials) and [Git-SCM](https://git-scm.com/docs/gittutorial)
28
+
2. GitHub guides from [GitHub](https://guides.github.com/)
Once in `master` a formal Git (version) tag can be applied to the commit,
49
+
and at this point the release would be a candidate to upload to PyPI.
50
+
51
+
The process for these steps will be documented in a Google Doc.
52
+
53
+
### Git Workflow Controls
54
+
55
+
To facilitate effective integration, merges into `develop` must occur as a pull request that is approved by two reviewers.
56
+
One reviewer can be anyone, but should probably be a developer related to the effort if that is applicable.
57
+
The second reviewer is a designated codeowner described in the `CODEOWNERS` file.
58
+
More information on codeowners can be [found on GitHub.](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners)
59
+
60
+
Additionally, all outstanding requested changes and comments should be resolved
61
+
by the requesting reviewer before merging.
62
+
Pushing new changes should trigger a re-review process
63
+
of changed files to prevent oversights.
64
+
65
+
Code should be passing integration and unit tests as defined in code on all
66
+
supported platforms by the evolving Continuous Integration (CI) systems,
67
+
or be explicitly exempted by a codeowner.
68
+
This is both for code quality and so CI maintenance is not overlooked.
69
+
70
+
All of these controls will be managed automatically by the GitHub server.
71
+
72
+
Releases and merges to `master` should be coordinated between developers and the project PI.
73
+
This will be documented with an additional required review from the PI when merging into `master`.
74
+
75
+
### Git Workflow Courtesy
76
+
77
+
Contributors are responsible for keeping their working repositories up to date with the main GitHub repo.
78
+
This is particularly important during active development,
79
+
as it will reduce the likelihood and extent of code conflicts
80
+
when new features are implemented.
81
+
82
+
If a piece of work is known to change files that will effect other developers' active work, they should be invited to the review or tagged,
83
+
so that the most effective order of integration can be established. In the case of your own work having integration
84
+
concerns, again, inviting other developers to discuss might be helpful.
85
+
86
+
In the case a codeowner will not be available, such as (sickeness, vacation, travel, and so on)
87
+
and an emergency patch can not be delayed, a simple explicit consensus among
88
+
the remaining developers should suffice.
89
+
90
+
Do not push or merge over another working branch unless explicitly permitted to do so by the authors.
91
+
Instead, when working on a shared branch submit a Pull Request to the other party.
# ASPIRE - Algorithms for Single Particle Reconstruction
7
+
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.6.0
8
8
9
-
This is the Python version to supersede the [Matlab ASPIRE](https://github.com/PrincetonUniversity/aspire).
9
+
This is the Python version to supersede the [Matlab ASPIRE](https://github.com/PrincetonUniversity/aspire).
10
10
11
11
ASPIRE is an open-source software package for processing single-particle cryo-EM data to determine three-dimensional structures of biological macromolecules. The package includes advanced algorithms based on rigorous mathematics and recent developments in
12
12
statistics and machine learning. It provides unique and improved solutions to important computational challenges of the cryo-EM
@@ -21,49 +21,53 @@ For more information about the project, algorithms, and related publications ple
21
21
For end-users
22
22
-------------
23
23
24
-
ASPIRE is a pip-installable package that works on Linux/Mac/Windows, and requires Python 3.6. The simplest option is to use Anaconda 64-bit for your platform with a minimum of Python 3.6 and pip, and then use `pip` to install `aspire` in that environment.
24
+
ASPIRE is a pip-installable package that works on Linux/Mac/Windows, and requires Python 3.6. The simplest option is to use Anaconda 64-bit for your platform with a minimum of Python 3.6 and `pip`, and then use `pip` to install `aspire` in that environment.
25
25
26
26
```
27
27
conda create -n aspire_env python=3.6 pip
28
28
conda activate aspire_env
29
29
pip install aspire
30
30
```
31
31
32
-
The final step above should install any dependent packages from `pip` automatically.
32
+
The final step above should install any dependent packages from `pip` automatically. To see what packages are required, browse `setup.py`.
33
33
34
34
Note that this step installs the base `aspire` package for you to work with, but not the unit tests/documentation. If you need to install ASPIRE for development purposes, read on.
35
35
36
36
For developers
37
37
--------------
38
38
39
-
After cloning this repo, the simplest option is to use Anaconda 64-bit for your platform, and use the provided `environment.yml` file to build a Conda environment to run ASPIRE.
39
+
After cloning this repo, the simplest option is to use Anaconda 64-bit for your platform, and use the provided `environment.yml` file to build a Conda environment to run ASPIRE. This is very similar to above except you will be based off of your local checkout, and you are free to rename `aspire_dev` used in the commands below. The `pip` line will install aspire in a locally editable mode, and is equivalent to `python setup.py develop`:
40
40
41
41
```
42
42
cd /path/to/git/clone/folder
43
-
conda env create -f environment.yml
44
-
conda activate aspire
45
-
```
46
43
47
-
### Make sure everything works
44
+
# Create's the conda environment and installs base dependencies.
0 commit comments