Metadata-Version: 2.4
Name: pbslib
Version: 0.0.1
Summary: Convert .pbs files to Python dicts
Requires-Python: >=3.7
Description-Content-Type: text/markdown

### SSRA Book: Standard Style Rules & Advisories



## Chapter 1: Readability


# R/1
Add an empty line between sections, as shown in the following example:

```pbs
[container;main]

[main;setup]
// ...

[main;build]
// ...

// This comment is not related to the rest of the file

[end_container;main]
```
# R/2
Name the first container main:

[container;main]

// ...

[end_container;main]
R/3

Add a space between // and the comment text:

```pbs
//wrong
```
```pbs
// correct
```

# R/4
Place build first and setup last (when creating a file for pybuild-xtra):

```pbs
[container;main]

[main;build]
- name = "project"
- version = "1.0"
- ai_description = false
- description = "project"
- autoupload = true

[main;setup]
- use = "pyproject.toml"
- custom_readme_name = false

[setup;dependencies]
&#x20;   "something",

[end_container;main]
```

# R/5
If there is no specific reason, do not add comments.

Reason: this file is usually only for you. You already know what and why something exists, and the lexer ignores comments anyway.

Wrong:

```pbs
// ...

// making build because it is required
[main;build]
// project name
- name = "my_cool_project" // it is named this because...
// version
- version = "1.0" // yay, new release: ...

// ...
```

Correct:

```pbs
// ...

[main;build]
- name = "my_cool_project"
- version = "1.0" // Finally

// ...
```

__Note: This rule is the least important because it depends on personal preference. It is only a recommendation. One or two small comments are completely fine.__

## Chapter 2: Syntax (pybuild-xtra file creation)

# S/1
Do not use spaces in project names:

```pbs
// ...

[main;build]
- name = "my cool project" // Oops! Invalid for PyPI

// ...
```

# S/2
(Repeats R/4) Place build first and setup last:

[container;main]

[main;build]
- name = "project"
- version = "1.0"
- ai_description = false
- description = "project"
- autoupload = true

[main;setup]
- use = "pyproject.toml"
- custom_readme_name = false

[setup;dependencies]
   "something",

[end_container;main]
S/3
```

Use the pyproject.toml format:

```pbs
// ...

[main;setup]
- use = "pyproject.toml"

// ...
```


## Chapter 3: Naming


# N/1
Use lowercase names.

```pbs

// ...

[main;setup]
- Use = "pyproject.toml" // Correct, but you pressed CAPS LOCK twice

// ...

[main;setup]
- use = "pyproject.toml" // Correct

// ...
```

# N/2
Use short names only.

(custom_readme_name is currently an exception and may be changed.)

Wrong:

```pbs
my_cool_little_thingy = "something"
```



## End of current version.
