Skip to content

Commit 3d10a2c

Browse files
update docs by flatedit
1 parent 2c5517f commit 3d10a2c

File tree

10 files changed

+226
-0
lines changed

10 files changed

+226
-0
lines changed

.flatedit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flatedit.txt

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@ cython_debug/
169169
# and can be added to the global gitignore or merged into this file. For a more nuclear
170170
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
171171
#.idea/
172+
.flatedit.logs.txt

docs/ABOUT.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
## Project
3+
```
4+
dialoget/
5+
6+
├── src/
7+
│ └── dialoget.py # Python file with code for the package
8+
9+
├── tests/ # Unit tests for the package
10+
│ └── dialoget.py
11+
12+
├── docs/ # Documentation for the package
13+
│ ├── conf.py
14+
│ ├── index.rst
15+
│ └── ...
16+
17+
├── README.md # README file with a description of the package, installation instructions, etc.
18+
├── LICENSE # License file specifying how the package can be used and shared
19+
├── pyproject.toml # Setuptools script for installation and distribution of the package
20+
├── setup.cfg # Configuration settings for setuptools
21+
├── requirements.txt # File listing all dependencies for the package
22+
└── .gitignore # Specifies intentionally untracked files to ignore for git
23+
```

docs/CONTRIBUTION.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
## Contribution
3+
4+
5+
### Github preparation
6+
7+
+ [Git - First-Time Git Setup](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)
8+
```shell
9+
git config --global user.name "John Doe"
10+
git config --global user.email [email protected]
11+
```
12+
13+
+ [About remote repositories - GitHub Docs](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls)
14+
```shell
15+
ssh-keygen -p -f ~/.ssh/id_ed25519
16+
```
17+
18+
+ [SSH and GPG keys on Github](https://github.com/settings/keys)
19+
```shell
20+
cat ~/.ssh/id_ed25519.pub
21+
```
22+
23+
if, after git push will ask for credentials put the API key as passwort
24+
+ [Personal Access Tokens (Classic)](https://github.com/settings/tokens)
25+
26+
27+
### Repository update
28+
29+
To update a release of a Python package, you'll typically go through the following general steps:
30+
31+
1. Update the code or documentation to incorporate the new changes or improvements.
32+
33+
2. Update the package version number to indicate a new release:
34+
- Follow semantic versioning (or "semver") principles, using version numbers like MAJOR.MINOR.PATCH:
35+
- Increment the MAJOR version when you make incompatible API changes,
36+
- Increment the MINOR version when you add functionality in a backward-compatible manner, and
37+
- Increment the PATCH version when you make backward-compatible bug fixes.
38+
- Change the version number in your package's `__init__.py` file, `setup.cfg`, `pyproject.toml` file, wherever it's defined.
39+
40+
3. Update the `CHANGELOG` or `HISTORY` file (if you have one) to document the changes introduced in the new version.
41+
42+
4. Commit the changes and push them to your version control system (e.g., git).
43+
```shell
44+
git status
45+
git add .
46+
git commit -m "updated version"
47+
git push
48+
```
49+
50+
5. Tag the commit with the version number:
51+
```shell
52+
git tag -a v0.1.7 -m "Release version 0.1.7"
53+
git push --tags
54+
```
55+
56+
## Build
57+
+ [build 1.0.3](https://pypa-build.readthedocs.io/en/latest/)
58+
59+
Build the new distribution files for the package using your chosen build tool, typically the build package:
60+
Run the build module from the root of the project where the `pyproject.toml` file is located:
61+
This command will generate distribution files in the newly created `dist/` directory within your project. You will find both a source archive (`.tar.gz`) and a wheel file (`.whl`).
62+
```shell
63+
pip install build
64+
python -m build --version 0.1.5
65+
python -m build
66+
```
67+
68+
69+
+ [Versioning - Hatch](https://hatch.pypa.io/latest/version/)
70+
```bash
71+
hatch version release
72+
```
73+
74+
### Publish
75+
After the build completes successfully, upload the new distribution files to the Python Package Index (PyPI).
76+
Upload your package to PyPI using `twine`
77+
```shell
78+
twine upload dist/*
79+
```
80+
81+
### Github Release
82+
83+
84+
85+
If your project is hosted on GitHub or a similar platform, you may also want to create a GitHub release:
86+
- Go to the "Releases" section of your repository.
87+
- Draft a new release, using the new tag you've created.
88+
- Add release notes summarizing the changes.
89+
- Optionally, attach binaries or additional files that accompany the release.
90+
- Publish the release.
91+
92+
93+
### Test
94+
```bash
95+
pytest
96+
```

docs/DECORATORS.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
## Decorators
3+
4+
5+
### Python
6+
7+
In Python projects, tests are often placed in a separate directory, commonly named `tests`. Each category of test may be placed in its own subdirectory. Here is an example structure that might be used in a Python project:
8+
9+
```
10+
my_python_project/
11+
12+
├── my_project/
13+
│ ├── module1.py
14+
│ └── module2.py
15+
16+
├── tests/
17+
│ ├── unit/
18+
│ │ ├── test_module1.py
19+
│ │ └── test_module2.py
20+
│ │
21+
│ ├── functional/
22+
│ │ └── test_something_functional.py
23+
│ │
24+
│ └── integration/
25+
│ └── test_integration.py
26+
27+
└── setup.py (or pyproject.toml, or requirements.txt, depending on the project)
28+
```
29+
30+
This structure separates the test types into different subdirectories, making it easier to manage them and execute them separately. Note that each test directory typically contains an `__init__.py` file, which is necessary for the Python test discovery mechanisms in most testing frameworks, such as `unittest` or `pytest`.
31+
32+
### Java
33+
34+
Java projects often use Maven or Gradle as build tools, and the default conventions for these tools define specific directories for different types of tests. Here's how a Maven project might structure its tests:
35+
36+
```
37+
my_java_project/
38+
39+
├── src/
40+
│ ├── main/
41+
│ │ └── java/
42+
│ │ └── com/
43+
│ │ └── mycompany/
44+
│ │ └── myproject/
45+
│ │ ├── Module1.java
46+
│ │ └── Module2.java
47+
│ │
48+
│ └── test/
49+
│ ├── java/
50+
│ │ └── com/
51+
│ │ └── mycompany/
52+
│ │ └── myproject/
53+
│ │ ├── unit/
54+
│ │ │ ├── Module1Test.java
55+
│ │ │ └── Module2Test.java
56+
│ │ │
57+
│ │ ├── functional/
58+
│ │ │ └── SomethingFunctionalTest.java
59+
│ │ │
60+
│ │ └── integration/
61+
│ │ └── IntegrationTest.java
62+
│ │
63+
│ └── resources/
64+
65+
└── pom.xml
66+
```
67+
68+
In this structure, all Java source files are located in `src/main/java`, and test files are located in `src/test/java`. Tests are further organized into subdirectories (unit, functional, and integration), corresponding to each type of test within the `test` directory.
69+
70+
It's important to note that while you can organize the tests into subdirectories in Java, the use of package naming conventions is more common. Test frameworks like JUnit do not enforce a particular directory structure, but they do differentiate tests based on annotations or naming conventions within the code.
71+
72+
The Maven directory structure (`src/main/java` for source code and `src/test/java` for test code) is a convention that tools recognize, and they are configured to compile and execute tests based on this layout.
73+
74+
As best practice, both Python and Java projects should have good separation of test types. This makes it clear what each test is designed to achieve and allows for the selective execution of test suites based on the scope of changes or the stage of the development pipeline.

docs/FOOT.md

Whitespace-only changes.

docs/HEAD.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# [dialoget](htttp://www.dialoget.com) - python library
2+
3+
[![PyPI](https://img.shields.io/pypi/v/dialoget?style=flat-square)](https://pypi.org/project/dialoget/)
4+
[![Supported Python versions](https://img.shields.io/pypi/pyversions/dialoget.svg)](https://pypi.org/project/dialoget/)
5+
[![check](https://github.com/dialoget/python/actions/workflows/check.yml/badge.svg)](https://github.com/dialoget/python/actions/workflows/check.yml)
6+
7+
[python.dialoget.com](http://python.dialoget.com) is a test framework for multilanguage source code, based on decorators
8+
9+
The test directory structure for Python and Java projects will often follow conventions that are supported by popular testing frameworks and project management tools.
10+
Below, are typical structures for both languages, which help in organizing tests based on their type (e.g., unit tests, functional tests, integration tests).
11+

docs/PROJECTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
+ [github.com](http://github.com)
2+
+ [docs # [dialoget](htttp://www.dialoget.com) - python library](http://github.com/docs)
3+
+ [docs ](http://github.com/docs)
4+
+ [docs ](http://github.com/docs)
5+
+ [docs ](http://github.com/docs)
6+
+ [docs ](http://github.com/docs)
7+
+ [docs ](http://github.com/docs)

docs/START.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
## Usage
3+
4+
```bash
5+
pip install dialoget
6+
```
7+

flatedit.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
docs/HEAD.md
2+
docs/ABOUT.md
3+
docs/START.md
4+
docs/DECORATORS.md
5+
docs/CONTRIBUTION.md
6+
docs/FOOT.md

0 commit comments

Comments
 (0)