Skip to content

Commit 9485bcb

Browse files
committed
Merge remote-tracking branch 'origin/master' into SimonCW-patch-1
2 parents fbef8bb + 6c0540c commit 9485bcb

33 files changed

+1358
-171
lines changed

.github/workflows/tests-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [3.7, 3.11]
16+
python-version: [3.9, 3.11]
1717
os: [ubuntu-latest, windows-latest]
1818
name: "Test: Python ${{ matrix.python-version }}, conda, ${{ matrix.os }}"
1919
steps:

.github/workflows/tests-pip.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [3.7, 3.11]
16+
python-version: [3.9, 3.11]
1717
os: [ubuntu-latest, windows-latest]
1818
name: "Test: Python ${{ matrix.python-version }}, pip, ${{ matrix.os }}"
1919
steps:
@@ -25,29 +25,28 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -r requirements.txt
28+
pip install .
2929
- name: Test with pytest
3030
run: |
3131
pytest tests
3232
3333
version-check:
34-
runs-on: ${{ matrix.os }}
34+
runs-on: ubuntu-latest
3535
strategy:
3636
fail-fast: false
3737
matrix:
38-
python-version: [3.6]
39-
os: [ubuntu-20.04]
38+
python-version: [ 3.9, 3.11 ]
4039
name: "Version Check: Python ${{ matrix.python-version }}"
4140
steps:
42-
- uses: actions/checkout@v3
43-
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v4
45-
with:
46-
python-version: ${{ matrix.python-version }}
47-
- name: Install Cookiecutter
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install cookiecutter~=1.7.2
51-
- name: Run Version Check
52-
run: |
53-
python tests/version_check.py --fail
41+
- uses: actions/checkout@v3
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v4
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Install Cookiecutter and dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
python -m pip install cookiecutter packaging
50+
- name: Run Version Check
51+
run: |
52+
python tests/version_check.py --fail

.github/workflows/traffic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
# Commits files to repository
2828
- name: Commit changes
29-
uses: EndBug/[email protected].1
29+
uses: EndBug/[email protected].4
3030
with:
3131
token: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
3232
author_name: GH-Action-Traffic

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ target/
5555
# Jupyter Notebook
5656
.ipynb_checkpoints
5757

58+
# pyenv
59+
.python-version
60+
5861
# virtualenv
5962
.env
6063
.venv
6164
venv*/
6265

66+
# OS specific
67+
.DS_Store
68+
6369
# IDE settings
6470
.vscode/
6571
.idea/
6672
*.iws
6773

68-
# Pyenv
69-
.python-version
70-
7174
# project-specific stuff
7275
serve/
73-
cookiecutter-server.yml
76+
cookiecutter-server.yml

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ repos:
33
rev: v4.4.0
44
hooks:
55
- id: check-added-large-files
6-
- id: check-ast
76
- id: check-merge-conflict
87
- id: end-of-file-fixer
98
- id: mixed-line-ending

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Placeholder for future updates and new features.
12+
13+
## [1.0.0] - 2025-02-26
14+
15+
### Added
16+
- **Initial stable release** of the AT Python Template.
17+
- **Modular project structure** using `src/` directory for better code organization.
18+
- **Flexible package management** with options for `pip`, `poetry`, and `conda`.
19+
- **Automated project setup** using `cookiecutter` to streamline project generation.
20+
- **Pre-configured CLI support** via `typer`, enabling command-line applications.
21+
- **Pre-commit hooks** with `ruff` for formatting and linting.
22+
- **Docker integration** with `Dockerfile` and `docker-compose.yml` for containerized deployment.
23+
- **Automated testing setup** using `pytest` for unit testing.
24+
- **Jupyter Notebook compatibility** with a dedicated `notebooks/` folder.
25+
- **Configuration management** using `config/` directory and YAML/HOCON formats.
26+
- **Editor support** with settings for **VS Code** and **PyCharm**.
27+
- **Multiple CI/CD integrations** including **GitHub Actions** and **GitLab CI**.
28+
- **Automated dependency updates** using `renovate`.
29+
- **Updated documentation** covering installation, project structure, and setup steps.
30+
- **Human-readable prompts** improving user experience during project generation.
31+
- **Versioning enforcement** requiring **Python 3.8+** while dropping Python 3.7 support.
32+
33+
### Changed
34+
- **Refactored codebase** to ensure maintainability and modularity.
35+
- **Updated default dependencies** for better performance and security.
36+
- **Enhanced user prompts** for a more intuitive project setup.
37+
- **Switched to f-strings** replacing old `.format()` calls for improved readability.
38+
- **Simplified installation steps** by improving `README.md` structure.
39+
- **Improved GitHub Actions workflows** for automated testing and validation.
40+
41+
### Fixed
42+
- **Resolved setup issues** related to module placement under `src/`.
43+
- **Fixed broken paths and URLs** in documentation.
44+
- **Ensured pre-commit hooks work as expected** with proper configurations.
45+
- **Addressed whitespace inconsistencies** in generated files.
46+
47+
---
48+
49+
[Unreleased]: https://github.com/at-gmbh/at-python-template/compare/v1.0.0...HEAD
50+
[1.0.0]: https://github.com/at-gmbh/at-python-template/releases/tag/v1.0.0

CONTRIBUTION.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Contributing to AT Python Template
2+
3+
We welcome your contributions! Whether it's reporting a bug, discussing ideas, submitting fixes, or proposing new features, we appreciate your input.
4+
5+
## We Develop with GitHub
6+
We use GitHub to host code, track issues, and review pull requests.
7+
8+
## Follow the GitHub Flow
9+
All changes should be proposed through pull requests:
10+
11+
1. Fork the repository and create your branch from `master`.
12+
2. If you've added new functionality, include tests.
13+
3. Update the documentation if there are any changes to APIs or usage.
14+
4. Ensure all tests pass.
15+
5. Verify that your code adheres to linting and formatting standards.
16+
6. Submit your pull request!
17+
18+
## Code License
19+
When you submit code changes, you agree that your contributions will be licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
20+
21+
## Reporting Issues
22+
Please use [GitHub Issues](https://github.com/at-gmbh/at-python-template/issues) to report bugs and suggest improvements. Make sure to include:
23+
24+
- A brief summary of the issue
25+
- Steps to reproduce the problem
26+
- Expected behavior
27+
- Actual behavior
28+
- Additional notes or related references
29+
30+
## Coding Standards
31+
32+
- Use 4 spaces per indentation level
33+
- Maximum line length is 120 characters
34+
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guidelines
35+
- Use [Ruff](https://github.com/charliermarsh/ruff) for formatting and linting (applied automatically with pre-commit hooks, or manually if needed)
36+
- Include type hints as per [PEP 484](https://peps.python.org/pep-0484/)
37+
- Use Google-style docstrings
38+
- Ensure code is clean, readable, and maintainable
39+
40+
## Imports
41+
42+
- Order imports as follows:
43+
1. Future imports
44+
2. Standard library imports
45+
3. Third-party imports
46+
4. Local imports
47+
- Avoid wildcard imports
48+
- Use absolute imports unless relative imports simplify the code
49+
50+
## Comments
51+
52+
- Write comments in English
53+
- Explain the intention behind code, not what the code does
54+
- Use full sentences with proper capitalization and punctuation
55+
56+
## Naming Conventions
57+
58+
- Variables and functions: `lower_case_with_underscores`
59+
- Classes: `CapWords`
60+
- Constants: `ALL_CAPS_WITH_UNDERSCORES`
61+
- Modules: `alllowercase`
62+
63+
## Setting Up for Development
64+
65+
1. Install dependencies using `poetry install`.
66+
2. Run tests with `pytest tests`.
67+
3. Use `pre-commit install` to set up pre-commit hooks. This ensures that Ruff and other checks run before each commit.
68+
69+
## Testing
70+
We use [pytest](https://docs.pytest.org/) for running tests. Ensure that all tests pass before submitting a pull request.
71+
72+
## Additional Resources
73+
74+
- [Cookiecutter Documentation](https://cookiecutter.readthedocs.io/)
75+
- [GitHub Flow Guide](https://guides.github.com/introduction/flow/)
76+
- [Python Packaging Guide](https://packaging.python.org/)
77+
- [Poetry Documentation](https://python-poetry.org/)
78+
- [Ruff Documentation](https://docs.astral.sh/ruff/)
79+
- [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
80+
81+
Thank you for your contributions!

0 commit comments

Comments
 (0)