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
in the directory of your choice. This will place the repository's code in a directory titled `bindsnet`.
10
10
11
-
All development should take place on a branch separate from master. To create a branch, issue
11
+
Install the project with [Poetry](https://python-poetry.org/) (current supported version - 1.1.8)
12
+
13
+
```shell
14
+
poetry install
15
+
poetry run pre-commit install
16
+
```
17
+
12
18
19
+
Now you can access the project environment with `poetry shell` or run commands with `poetry run <command>`. For example, `poetry run python examples/mnist/conv_mnist.py`.
20
+
21
+
Please make sure the `Poetry` environment is activated when you commit your files! The `git commit` command will invoke `pre-commit`, which is installed with Poetry too. IDEs like PyCharm have plugins for `Poetry` and will activate the environment automatically.
22
+
23
+
Run the tests, they all should pass
24
+
25
+
```shell
26
+
poetry run pytest
13
27
```
28
+
29
+
All development should take place on a branch separate from master. To create a branch, issue
30
+
31
+
```shell
14
32
git branch [branch-name] # create new branch
15
33
```
16
34
17
35
replacing `[branch-name]` with a simple and memorable name of choice; e.g., `git branch dan`. Switch to the newly created branch using
18
36
19
-
```
37
+
```shell
20
38
git checkout [branch-name] # switch to a different branch of the repository
21
39
```
22
40
23
41
__Note__: Issue `git branch` with no arguments to list all branches currently being tracked, with an asterisk next to the currently used branch; e.g.,
24
42
25
-
```
43
+
```shell
26
44
$ git branch # list all branches and indicate current branch
27
45
* dan
28
46
devel
@@ -34,40 +52,46 @@ If new branches have been created on the remote repository, you may start tracki
34
52
35
53
After making changes to the repository, issue a `git status` command to see which files have been modified. Then, use
36
54
37
-
```
55
+
```shell
38
56
git add [file-name(s) | -A] # add modified or newly created files
39
57
```
40
58
41
59
to add one or more modified files (`file-name(s)`), or all modified files (`-A` or `--all`). These include newly created files. Issue
42
60
61
+
```shell
62
+
pre-commit run -a
43
63
```
64
+
65
+
to run the `pre-commit` tool that will automatically format your code with `black`. Issue
66
+
67
+
```shell
44
68
git commit -m "[commit-message]"# Useful messages help when reverting / searching through history
45
69
```
46
70
47
71
to "commit" your changes to your local repository, where `[commit-message]` is a _short yet descriptive_ note about what changes have been made.
48
72
49
73
Before pushing your changes to the remote repository, you must make sure that you have an up-to-date version of the `master` code. That is, if master has been updated while you have been making your changes, your code will be out of date with respect to the master branch. Issue
50
74
51
-
```
75
+
```shell
52
76
git pull # gets all changes from remote repository
53
77
git merge master # merges changes made in master branch with those made in your branch
54
78
```
55
79
56
80
and fix any merge conflicts that may have resulted, and re-commit after the fix with
57
81
58
-
```
82
+
```shell
59
83
git commit # no -m message needed; merge messages are auto-generated
60
84
```
61
85
62
86
Push your changes back to the repository onto the same branch you are developing on. Issue
0 commit comments