Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 34a815f

Browse files
authored
docs: tutorials: rolling alice: coach alice: our open source guide: Restructure and link to README with command usage
1 parent 3024e05 commit 34a815f

File tree

1 file changed

+61
-25
lines changed

1 file changed

+61
-25
lines changed

docs/tutorials/rolling_alice/0001_coach_alice/0002_our_open_source_guide.md

Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
# Volume 1: Chapter 2: Our Open Source Guide
22

3-
> Alice will be acting as our proactive open source guide to
4-
> 2nd and 3rd party plugin maintainers and contributors.
5-
> She will attempt to contribute helpful community files
6-
> so as to provide value as soon as possible to the community.
7-
8-
References:
9-
10-
- https://github.com/intel/dffml/community/code-of-conduct/new?template=contributor-covenant
11-
- https://github.com/intel/dffml/community
12-
- List of files / must haves
13-
- https://opensource.guide/
14-
- https://github.com/intel/dffml/issues/1393
15-
- https://github.com/intel/dffml/discussions/1369#discussioncomment-2959986
16-
17-
Install Alice https://github.com/intel/dffml/blob/alice/entities/alice/CONTRIBUTING.rst
3+
Alice will be acting as our proactive open source guide to
4+
2nd and 3rd party plugin maintainers and contributors.
5+
She will attempt to contribute helpful community files
6+
so as to provide value as soon as possible to the community.
187

198
This tutorial is how we extend the `alice please contribute recommended community standards`
209
command from https://github.com/intel/dffml/tree/alice/entities/alice#recommend-community-standards
2110

22-
We want to be able to ask Alice to contribute [recommended community standards](https://opensource.guide/) to our projects.
11+
We want to be able to ask Alice to contribute a new kind of
12+
[recommended community standard](https://opensource.guide/) to our projects.
13+
14+
We're going to extend the existing
15+
[`alice please contribute recommended community standards`](https://github.com/intel/dffml/tree/alice/entities/alice#recommend-community-standards)
16+
functionality to provide a `CODE_OF_CONDUCT.md` file to a repo if it doesn't
17+
have one already.
2318

2419
## Setup
2520

26-
First let's create a repo to work with
21+
We need to get setup for contribing to Alice first
22+
see https://github.com/intel/dffml/blob/alice/entities/alice/CONTRIBUTING.rst
23+
for more details.
24+
25+
```console
26+
$ git clone -b alice https://github.com/intel/dffml dffml
27+
$ cd dffml/entities/alice
28+
$ python -m pip install \
29+
-e .[dev] \
30+
-e ../../ \
31+
-e ../../examples/shouldi/ \
32+
-e ../../feature/git/ \
33+
-e ../../operations/innersource/ \
34+
-e ../../configloader/yaml/
35+
```
36+
37+
Then we create a repo which Alice will be contributing to and give it
38+
some contents.
2739

2840
```console
2941
$ gh repo create -y --private https://github.com/$USER/my-new-python-project
@@ -33,6 +45,7 @@ $ echo 'print("Hello World")' > test.py
3345
$ git add test.py
3446
$ git commit -sam 'Initial Commit'
3547
$ git push --set-upstream origin main
48+
$ rm -rf my-new-python-project
3649
```
3750

3851
## How to help Alice contribute more files
@@ -46,7 +59,6 @@ Copy readme overlay to new file
4659

4760
```console
4861
$ cp alice/please/contribute/recommended_community_standards/readme.py alice/please/contribute/recommended_community_standards/code_of_conduct.py
49-
$ git diff -R
5062
```
5163

5264
Rename types, classes, variables, etc.
@@ -59,7 +71,7 @@ Add `OverlayCONTRIBUTING` to the list of overlays to be applied to the
5971
`dffml.overlays.alice.please.contribute.recommended_community_standard`
6072
base flow.
6173

62-
**dffml.git/entites/alice/entry_points.txt**
74+
**entry_points.txt**
6375

6476
```diff
6577
diff --git a/entities/alice/entry_points.txt b/entities/alice/entry_points.txt
@@ -76,9 +88,11 @@ index 129b2866a1..9e130cb3b2 100644
7688
[dffml.overlays.alice.please.contribute.recommended_community_standards.overlay.readme]
7789
```
7890

79-
Add the `OverlayGit` and `OverlayGitHub` overlays to the new overlay as well.
91+
Add the following section to the end of ``entry_points.txt`` to enable the
92+
`OverlayGit` and `OverlayGitHub` overlays on our new code of conduct overlay
93+
flow as well.
8094

81-
**dffml.git/entites/alice/entry_points.txt**
95+
**entry_points.txt**
8296

8397
```ini
8498
[dffml.overlays.alice.please.contribute.recommended_community_standards.code_of_conduct]
@@ -92,22 +106,34 @@ Reinstall for new entrypoints to take effect
92106
$ python -m pip install -e .
93107
```
94108

95-
- Re-run the command and observe results
109+
Re-run the command to contribute a `CODE_OF_CONDUCT.md` file as well.
96110

97111
```console
98112
$ alice please contribute -log debug -repos https://github.com/$USER/my-new-python-project -- recommended community standards
99113
```
100114

115+
Check the PRs to confirm they were created
116+
101117
```console
102118
$ gh -R https://github.com/$USER/my-new-python-project pr list
103-
297 Recommended Community Standard: README alice-contribute-recommended-community-standards-readme OPEN
104-
295 Recommended Community Standard: CONTRIBUTING alice-contribute-recommended-community-standards-contributing OPEN
119+
343 Recommended Community Standard: README alice-contribute-recommended-community-standards-readme OPEN
120+
341 Recommended Community Standard: CONTRIBUTING alice-contribute-recommended-community-standards-contributing OPEN
121+
339 Recommended Community Standard: CODE_OF_CONDUCT alice-contribute-recommended-community-standards-code_of_conduct OPEN
105122
```
106123

107-
![Screenshot showing pull request for adding README.md and CONTRIBUTING.md files](https://user-images.githubusercontent.com/5950433/181796646-0b49335c-7739-4dff-bce4-bab98a8fc560.png)
124+
![Screenshot showing pull request for adding README.md and CONTRIBUTING.md files](https://user-images.githubusercontent.com/5950433/181826046-53ae3ef5-6750-48ad-afd2-8cf9174e0b63.png)
125+
126+
You can now edit the code in
127+
``alice/please/contribute/recommended_community_standards/code_of_conduct.py``.
128+
129+
For tutorials which will help you extend further see the "Data Flow Programming"
130+
section of the Alice CONTRIBUTING docs.
131+
https://github.com/intel/dffml/blob/alice/entities/alice/CONTRIBUTING.rst#data-flow-programming
108132

109133
## Debugging
110134

135+
To close all PRs on a repo run the following
136+
111137
```console
112138
$ for pr in $(gh -R https://github.com/$USER/my-new-python-project pr list --json number --jq '.[].number'); do gh -R https://github.com/$USER/my-new-python-project pr close "${pr}"; done;
113139
```
@@ -146,3 +172,13 @@ We will omit for now
146172
- [] Pull request template
147173
- [] Repository admins accept content reports
148174
```
175+
176+
## Misc. Notes
177+
178+
- References:
179+
- https://github.com/intel/dffml/community/code-of-conduct/new?template=contributor-covenant
180+
- https://github.com/intel/dffml/community
181+
- List of files / must haves
182+
- https://opensource.guide/
183+
- https://github.com/intel/dffml/issues/1393
184+
- https://github.com/intel/dffml/discussions/1369#discussioncomment-2959986

0 commit comments

Comments
 (0)