Skip to content

Commit ce4fc91

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 290ed61 + 1970ac8 commit ce4fc91

File tree

10 files changed

+407
-395
lines changed

10 files changed

+407
-395
lines changed

.github/workflows/workflow.yml

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,68 @@ jobs:
1515
release:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Checkout master branch
19-
uses: actions/checkout@v4
20-
with:
21-
ref: master
22-
fetch-depth: 0
18+
- name: Checkout master branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: master
22+
fetch-depth: 0
2323

24-
- name: Create and push to main
25-
run: |
26-
git checkout -b main
27-
git push origin main
24+
# - name: Create and push to main
25+
# run: |
26+
# git checkout -b main
27+
# git push origin main
2828

29-
- name: Checkout release branch
30-
run: git checkout main
29+
- name: Create and push to feature branch
30+
run: |
31+
git checkout -b release-main
32+
git push origin release-main
3133
32-
- name: Set up Python
33-
uses: actions/setup-python@v3
34-
with:
35-
python-version: '3.x'
34+
- name: Raise PR from release-main to main
35+
uses: peter-evans/create-pull-request@v5
36+
with:
37+
base: main
38+
head: release-main
39+
title: "Automated Release PR: release-main -> main"
40+
body: "This PR contains the automated changes for the release process."
41+
branch: pr-release-main-to-main
3642

37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip
40-
pip install build twine python-semantic-release setuptools-scm
43+
- name: Checkout release branch
44+
# run: git checkout main
45+
run: git checkout release-main
4146

42-
- name: Run semantic-release
43-
env:
44-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
run: |
46-
git config user.name github-actions
47-
git config user.email github-actions@github.com
48-
semantic-release version
49-
semantic-release publish
47+
- name: Set up Python
48+
uses: actions/setup-python@v3
49+
with:
50+
python-version: "3.x"
5051

51-
- name: Build package
52-
run: python -m build
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install build twine python-semantic-release setuptools-scm
5356
54-
- name: Publish package to PyPI
55-
env:
56-
TWINE_USERNAME: __token__
57-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
58-
run: twine upload dist/*
57+
- name: Run semantic-release
58+
env:
59+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
run: |
61+
git config user.name github-actions
62+
git config user.email github-actions@github.com
63+
semantic-release version
64+
semantic-release publish
5965
60-
- name: Raise PR from main to master
61-
uses: peter-evans/create-pull-request@v5
62-
with:
63-
base: master
64-
head: main
65-
title: 'Release PR: main -> master'
66-
body: 'This PR merges the changes from the main branch back into master after the release.'
67-
branch: pr-main-to-master
66+
- name: Build package
67+
run: python -m build
68+
69+
- name: Publish package to PyPI
70+
env:
71+
TWINE_USERNAME: __token__
72+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
73+
run: twine upload dist/*
74+
75+
- name: Raise PR from main to master
76+
uses: peter-evans/create-pull-request@v5
77+
with:
78+
base: master
79+
head: main
80+
title: "Release PR: main -> master"
81+
body: "This PR merges the changes from the main branch back into master after the release."
82+
branch: pr-main-to-master

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 22.10.0
10+
hooks:
11+
- id: black
12+
13+
- repo: local
14+
hooks:
15+
- id: pylint
16+
name: pylint
17+
entry: pylint
18+
language: system
19+
types: [python]
20+
require_serial: true
21+
args: [
22+
"-rn", # Only display messages
23+
"-sn", # Don't display the score
24+
]
25+
files: ^app/.*\.py$

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": [
3+
"release-main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
"@semantic-release/changelog",
9+
"@semantic-release/github",
10+
"@semantic-release/git",
11+
"@semantic-release/pypi"
12+
]
13+
}

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# Changelog
3+
4+
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5+
6+
## [Unreleased]
7+
8+
### Added
9+
10+
- [List new features or enhancements added but not yet released]
11+
12+
### Changed
13+
14+
- [List changes, improvements, or modifications made but not yet released]
15+
16+
### Fixed
17+
18+
- [List bug fixes or corrections made but not yet released]
19+
20+
## [Version] - YYYY-MM-DD
21+
22+
### Added
23+
24+
- [List new features or enhancements added in this version]
25+
26+
### Changed
27+
28+
- [List changes, improvements, or modifications made in this version]
29+
30+
### Fixed
31+
32+
- [List bug fixes or corrections made in this version]
33+
34+
## [Older Versions]
35+
36+
[Repeat the above sections for older versions of your project]
37+
38+
## Contributing
39+
40+
Please read [CONTRIBUTING.md](./contributing-template.md) for details on our code of conduct, and the process for submitting pull requests to us.
41+
42+
## Authors
43+
44+
- Author 1
45+
- Author 2
46+
47+
## License
48+
49+
This project is licensed under the [License Name] - see the [LICENSE.md](./license-template.md) file for details.
50+
51+
## Customization
52+
53+
You can customize this changelog to meet the specific needs and preferences of your project. Feel free to modify the structure, add more details, or change the formatting to better suit your project's versioning and documentation requirements.

CONTRIBUTING.md

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
# Contributing to Python FM DAPI Weaver
22

3-
43
Thank you for your interest in contributing to **Python FM DAPI Weaver**! This guide outlines the steps to get started and the standards we follow.
54

6-
7-
8-
## Ways to Contribute?
5+
## Ways to Contribute?
96

107
You can help improve the project in the following ways:
118

129
- **Bug Reports**: Identify and report any bugs you find.
1310
- **Feature Proposals**: Suggest new features or improvements to existing ones.
1411
- **Documentation**: Improve or expand documentation to make it easier for users and developers.
1512
- **Fixing Issues**: Address open issues and contribute fixes.
16-
17-
18-
1913

2014
## Contribution Guidelines
2115

@@ -24,28 +18,16 @@ You can help improve the project in the following ways:
2418
- Ensure your changes don’t break existing functionality (run tests if available).
2519
- Make small, focused commits with clear messages.
2620

27-
28-
29-
3021
## A Quick Start Guide:
3122

32-
3323
### 1. Fork the Repository
3424

35-
36-
3725
Click the **Fork** button at the top-right corner of this repository to create your own copy.
3826

39-
40-
4127
### 2. Clone Your Fork
4228

43-
44-
4529
Clone the repository to your local machine:
4630

47-
48-
4931
```
5032
git clone https://github.com/your-username/python-fm-dapi-weaver.git
5133
cd python-fm-dapi-weaver
@@ -54,83 +36,59 @@ cd python-fm-dapi-weaver
5436

5537
### 3. Install Dependencies
5638

57-
58-
5939
It's recommended to use a virtual environment:
6040

61-
62-
6341
```
6442
python -m venv venv
6543
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
6644
pip install -r requirements.txt
67-
45+
6846
6947
```
7048

7149
### 4. Run the Server
7250

73-
7451
you can run the server using below command:
7552

76-
77-
7853
```
7954
python -m python_fm_dapi_weaver.main
80-
55+
8156
```
8257

8358
### 5. Test the API
8459

85-
86-
8760
Once the server is running, you can test the API using tools like [Postman](https://www.postman.com/). The server should be accessible at `http://127.0.0.1:8000`.
8861

89-
9062
### 6. Make Changes
9163

9264
Feel free to make changes or add new features! You can modify the code in the `python_fm_dapi_weaver` directory and test locally to ensure your changes work as expected.
9365

94-
9566
For example, to add a new feature, you might:
67+
9668
- Create a new module or file in the `python_fm_dapi_weaver` folder.
9769
- Modify existing files if you're improving or fixing existing functionality.
9870
- Ensure your changes align with the overall structure and coding style of the project.
9971

100-
72+
### 7. **Commit the Changes:**
10173

102-
### 7. **Commit the Changes:**
10374
Commit your work with a concise, clear message about what was modified.
10475

76+
### 8. **Push to Your Fork on GitHub:**
10577

106-
107-
### 8. **Push to Your Fork on GitHub:**
10878
Push the branch/changes to your GitHub Repository.
10979

110-
111-
112-
### 9. **Submitting changes:**
80+
### 9. **Submitting changes:**
11381

11482
Please open a Pull Request with a list of what you've done.Make sure, if possible, keep all of your commits are atomic (one feature per commit).
11583

116-
11784
## Code of Conduct and Licensing
11885

119-
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md) and are licensed under the project's [License](./LICENSE).
120-
121-
86+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md) and are licensed under the project's [License](./LICENSE).
12287

12388
# Thank You for Contributing!
12489

125-
126-
12790
Your contributions are what make this project great! We appreciate the time, effort, and ideas you put into helping us improve.
12891

129-
130-
13192
If you have any questions, feel free to reach out. We encourage everyone to contribute, no matter how big or small. Together, we can make this project even better!
13293

133-
134-
13594
Happy coding!!
136-

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name = "pypi"
77
fastapi = "*"
88
uvicorn = "*"
99
requests = "*"
10+
python-multipart = "*"
1011

1112
[dev-packages]
1213

0 commit comments

Comments
 (0)