Skip to content

Commit f724d6e

Browse files
authored
docs: add more context (#93)
1 parent 4f59662 commit f724d6e

3 files changed

Lines changed: 72 additions & 47 deletions

File tree

.github/etc/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
allstar
12
cookiecutter
23
dependabot
34
ensurepath

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
To contribute to this project, please fork the repository and open a pull request with your changes.
4+
5+
Also, see our Contributors Code of Conduct [here](./.github/CONTRIBUTING.md).
6+
7+
## Updating the dependencies
8+
9+
```bash
10+
task update
11+
```
12+
13+
## Running the tests
14+
15+
```bash
16+
task test
17+
```
18+
19+
## Troubleshooting
20+
21+
If you're troubleshooting the results of any of the tasks, you can add `-v` to enable debug `task` logging, for instance:
22+
23+
```bash
24+
task -v build
25+
```
26+
27+
If you're troubleshooting a `goat` failure (you aren't the first one), you can pass one of the log levels as defined
28+
[here](https://github.com/SeisoLLC/goat#debugging):
29+
30+
```bash
31+
task lint -- debug
32+
```

README.md

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Seiso's python project template
1+
# Seiso's Python Paved Road
22

3-
This is Seiso's cookiecutter template for creating new python repositories.
3+
This is Seiso's paved road for creating new python repositories.
44

55
## Getting Started
66

@@ -18,13 +18,28 @@ pipx run --system-site-packages cookiecutter git+ssh://git@github.com/seisollc/c
1818

1919
# Enter the project directory
2020
cd $(ls -td * | head -1)
21+
```
22+
23+
At this point you need to ensure that there is an empty remote git repository that aligns with the naming of the generated project. If it doesn't yet exist, you
24+
need to create it. Once it exists, you can continue.
2125

26+
```bash
2227
# Push the initial commit (IMPORTANT!)
2328
git remote add origin git@github.com:SeisoLLC/$(basename $(pwd)).git
2429
git push origin $(git branch --show-current)
30+
```
31+
32+
After you've pushed the initial commit, you should setup your repository settings - such as setting a branch policy, enabling dependabot, adding docker hub
33+
secrets, etc.
2534

26-
# Setup your repo settings (setup a branch policy, enable dependabot, add docker hub secrets, etc...).
27-
# Ask if you have questions; update this with a pointer to more clear documentation/automation when it exists
35+
This can be done via Infrastructure as Code (IaC) or manually, but ostensibly at this point your repository is aligned with your organizational practices. If
36+
you perform this step manually, consider a tool like OpenSSF [allstar](https://github.com/ossf/allstar) to monitor and alert or mitigate on your behalf.
37+
38+
Continue on if you're ready to add business logic to your new repository.
39+
40+
```bash
41+
# Initialize the repository
42+
task init
2843

2944
# Checkout a new branch for your initial content
3045
git checkout -b initial-content
@@ -33,53 +48,38 @@ git checkout -b initial-content
3348
grep -r NotImplementedError *
3449

3550
# Add your code and tests
36-
pipenv install --deploy --ignore-pipfile --dev
37-
# ...
3851

39-
# Commit and test your work
52+
# Commit and build/test your work
4053
git add -A
4154
git commit -m "Initial content"
42-
task test
55+
task build test
4356

44-
# Push your branch and open a PR
57+
# Push your branch
4558
git push origin $(git branch --show-current)
46-
# Open a PR, setup a Wrike approval, follow the Seiso Software Development guidelines
47-
48-
# If you chose SemVer-ish, after the PR is merged, run a release
49-
if grep -q SemVer setup.cfg; then task release -- minor; git push --atomic origin $(git branch --show-current) $(git describe --tags); fi
50-
```
51-
52-
## Updating the dependencies
53-
54-
```bash
55-
task update
56-
```
5759

58-
## Running the tests
60+
# Open a Pull Request
5961

60-
```bash
61-
task test
62+
# (Optional) If you chose SemVer-ish as your versioning, run a release after your PR is merged
63+
if grep -q SemVer setup.cfg; then task release -- minor; git push --atomic origin $(git branch --show-current) $(git describe --tags); fi
6264
```
6365

64-
## Troubleshooting
65-
66-
If you're troubleshooting the results of any of the tasks, you can add `-v` to enable debug `task` logging, for instance:
66+
## Version Control System support
6767

68-
```bash
69-
task -v build
70-
```
68+
Currently this project only supports projects hosted on GitHub.
7169

72-
If you're troubleshooting a `goat` failure (you aren't the first one), you can pass one of the log levels as defined
73-
[here](https://github.com/SeisoLLC/goat#debugging):
70+
## FAQs
7471

75-
```bash
76-
task lint -- debug
77-
```
72+
Q: Why am I getting `invalid reference format: repository name must be lowercase` when I try to build my docker container?<br />
73+
A: You customized the `project_slug` when answering the `cookiecutter` questions and included a capital letter. Don't do that!
7874

79-
### Using pyenv
75+
Q: What does `SemVer-ish` mean?<br />
76+
A: Docker isn't compatible with SemVer, as it doesn't allow `+` symbols in their tags (which are used by SemVer to indicate builds). As a
77+
workaround,
78+
we use `-`s instead (only for local builds, not official releases), which is not compliant with the official SemVer spec, but is easily human
79+
understandable. In order to keep the image tags in line with git tags, both use this SemVer-like notation.
8080

81-
If you use `pyenv` to manage your python environments, `pipx` won't be using the same `python` that your `python -m pip install`s are installing
82-
dependencies for. Set the `PIPX_DEFAULT_PYTHON` env var like the following:
81+
Q: I use `pyenv`; how do I keep `pipx` aligned with my activated python version and package installations?<br />
82+
A: Set the `PIPX_DEFAULT_PYTHON` env var like the following:
8383

8484
```bash
8585
PIPX_DEFAULT_PYTHON="${HOME}/.pyenv/versions/$(pyenv version | cut -f1 -d\ )/bin/python3"
@@ -88,13 +88,5 @@ export PIPX_DEFAULT_PYTHON
8888

8989
You may also want to consider storing this in your .zshrc or similar if it fixes your issue.
9090

91-
## FAQs
92-
93-
Q: Why am I getting `invalid reference format: repository name must be lowercase` when I try to build my docker container?<br />
94-
A: You customized the `project_slug` when answering the `cookiecutter` questions and included a capital letter. Don't do that!
95-
96-
Q: What does `SemVer-ish` mean?<br />
97-
A: Docker isn't compatible with SemVer, as it doesn't allow `+` symbols in their tags (which are used by SemVer to indicate builds). As a
98-
workaround,
99-
we use `-`s instead (only for local builds, not official releases), which is not compliant with the official SemVer spec, but is easily human
100-
understandable. In order to keep the image tags in line with git tags, both use this SemVer-like notation.
91+
Q: How do I contribute?<br />
92+
A: See our [contributing docs](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)