Skip to content

Commit b361d44

Browse files
committed
readme done
1 parent 016813b commit b361d44

File tree

6 files changed

+46
-7
lines changed

6 files changed

+46
-7
lines changed

.github/workflows/format.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
paths:
77
- src/**
88
- test/**
9+
- examples/**
910
- pyproject.toml
1011

1112
jobs:

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,38 @@
1515

1616
## Table of contents
1717

18-
* Installation
18+
* [Installation](#installation)
1919
* [Tutorial](#tutorial)
2020
* [Basic usage](#basic-usage)
2121
* [Common parameters](#common-parameters)
2222
* [Decorator-specific parameters](#decorator-specific-parameters)
2323
* [Examples](#examples)
2424
* [Dev notes](#dev-notes)
25-
* TODO
25+
* [Environment setup](#environment-setup)
26+
* [Building](#building)
27+
* [Uploading](#uploading)
28+
* [Testing](#testing)
29+
* [Coverage](#coverage)
30+
* [Formatting](#formatting)
2631
* [Licence](#licence)
2732

2833
<br />
2934
<br />
3035

36+
## Installation
37+
38+
To install the PyConstClasses package in your python environment run:
39+
```shell
40+
pip install pyconstclasses
41+
```
42+
or
43+
```shell
44+
python -m pip install pyconstclasses
45+
```
46+
47+
<br />
48+
<br />
49+
3150
## Tutorial
3251

3352
After installing the package, you have to import it to your python program:
@@ -398,7 +417,25 @@ pip install dist/pyconstclasses-<version>-py3-none-any.whl --force-reinstall
398417
To upload the package to [pypi](https://pypi.org/) do the following:
399418

400419
* Make sure that the `twine` package is installed in your python environment: `pip show twine`
401-
*
420+
* Upload the package to the testpypi repository:
421+
```shell
422+
python -m twine upload --repository testpypi dist/*
423+
```
424+
* Verify wether the package has been succesfully uploaded by installing it to your python (virtual) environment:
425+
```shell
426+
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps pyconstclasses
427+
```
428+
* Verify the installation by running the example programs
429+
* If no problem occured, upload the package to [pypi](https://pypi.org/):
430+
```shell
431+
twine upload dist/*
432+
```
433+
* Verify wether the package has been succesfully uploaded by installing it to your python (virtual) environment:
434+
```shell
435+
python -m pip install pyconstclasses
436+
```
437+
* Verify the installation by running the example programs
438+
402439

403440
### Testing:
404441

examples/common_with_strict_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Person:
1010
def __repr__(self) -> str:
1111
return f"{self.first_name} {self.last_name} [age: {self.age}]"
1212

13+
1314
@cc.const_class(with_strict_types=True)
1415
class PersonStrictTypes:
1516
first_name: str

examples/const_class_inherit_constructor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Person:
77
last_name: str
88

99
def __init__(self, full_name: str):
10-
self.first_name, self.last_name = full_name.split(' ')
10+
self.first_name, self.last_name = full_name.split(" ")
1111

1212
def __repr__(self) -> str:
1313
return f"{self.first_name} {self.last_name}"

scripts/cleanup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
echo Cleaning the build files...
44

55
find . -type d -name "__pycache__" -exec rm -r {} +
6-
rm -r .pytest_cache/ .tox/ .coverage coverage.* src/pyconstclasses.egg-info/
6+
rm -r .pytest_cache/ .tox/ .coverage htmlcov/ coverage.* src/pyconstclasses.egg-info/ dist/

src/constclasses/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from .ccerror import ConstError, InitializationError, ConfigurationError
1+
from .ccerror import ConfigurationError, ConstError, InitializationError
22
from .const_class import const_class
3-
from .static_const_class import static_const_class, mutable_instance
3+
from .static_const_class import mutable_instance, static_const_class

0 commit comments

Comments
 (0)