Skip to content

Commit

Permalink
Merge pull request #71 from ivdatahub/docs/ChangeTheProjectName
Browse files Browse the repository at this point in the history
docs: Update name of project
  • Loading branch information
IvanildoBarauna authored Sep 20, 2024
2 parents d56b3e9 + ee89c48 commit 58a4814
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 56 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/deploy-cloud-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@
name: Build and Deploy to Cloud Run

on:
# push:
# branches: [ "main" ]
# push:
# branches: [ "main" ]

workflow_dispatch:

env:
PROJECT_ID: ivanildobarauna
GAR_LOCATION: us-central1
SERVICE: gcp-streaming-pipeline-api
SERVICE: data-producer-api
REGION: us-east1

jobs:
deploy:
permissions:
contents: 'read'
id-token: 'write'
contents: "read"
id-token: "write"

runs-on: ubuntu-latest

Expand All @@ -70,21 +70,21 @@ jobs:

- name: Google Auth
id: auth
uses: 'google-github-actions/auth@v2'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- name: Configure Docker for Google Artifact Registry
run: |
gcloud auth configure-docker '${{ env.GAR_LOCATION }}-docker.pkg.dev'
# - name: Docker Auth
# id: docker-auth
# uses: docker/login-action@v1
# with:
# username: 'oauth2accesstoken'
# password: '${{ steps.auth.outputs.access_token }}'
# registry: '${{ env.GAR_LOCATION }}-docker.pkg.dev'
# - name: Docker Auth
# id: docker-auth
# uses: docker/login-action@v1
# with:
# username: 'oauth2accesstoken'
# password: '${{ steps.auth.outputs.access_token }}'
# registry: '${{ env.GAR_LOCATION }}-docker.pkg.dev'

- name: Build Container
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Contributing to GCP-streaming-pipeline
# Contributing to data-producer-api

Firstly, thank you very much for your interest in contributing to GCP-streaming-pipeline! This document provides guidelines to help ensure the contribution process is smooth and efficient for everyone involved.
Firstly, thank you very much for your interest in contributing to data-producer-api! This document provides guidelines to help ensure the contribution process is smooth and efficient for everyone involved.

## How to Contribute

### 1. Fork the Repository

1. Go to [repository page](https://github.com/IvanildoBarauna/GCP-streaming-pipeline).
1. Go to [repository page](https://github.com/ivdatahub/data-producer-api).
2. Click the "Fork" button in the top right corner to create a copy of the repository on your GitHub.

### 2. Clone the Repository

Clone the forked repository to your local machine using the command:

```sh
git clone https://github.com/seu-usuario/GCP-streaming-pipeline.git
git clone https://github.com/<your-username>/data-producer-api.git
```

### 3. Create a Branch

Create a branch for your feature or bug fix:

```sh
git checkout -b feat-branchname
```
Expand All @@ -31,9 +32,11 @@ Make the desired changes to the code. Be sure to follow code style and documenta
### 5. Commit your Changes

Commit your changes with a clear and descriptive message:

```sh
git add .
```

```sh
git commit -m "Detailed description of changes"
```
Expand Down Expand Up @@ -67,7 +70,7 @@ git push origin branchname

## Reporting Bugs

If you find a bug, please open an [issue](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/issues) and provide as much information as possible, including:
If you find a bug, please open an [issue](https://github.com/IvanildoBarauna/data-producer-api/issues) and provide as much information as possible, including:

- Detailed description of the problem.
- Steps to reproduce the issue.
Expand All @@ -76,8 +79,8 @@ If you find a bug, please open an [issue](https://github.com/IvanildoBarauna/GCP

## Improvement suggestions

If you have suggestions for improvements, please open an [issue](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/issues) and describe your idea in detail.
If you have suggestions for improvements, please open an [issue](https://github.com/IvanildoBarauna/data-producer-api/issues) and describe your idea in detail.

## Thanks

Thanks for considering contributing to GCP-streaming-pipeline! Every contribution is valuable and helps to improve the project.
Thanks for considering contributing to data-producer-api! Every contribution is valuable and helps to improve the project.
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
## Data Producer API: FastAPI application for sending data to Pub/Sub, used for load testing and triggering pipelines


![Project Status](https://img.shields.io/badge/status-development-yellow?style=for-the-badge&logo=github)
![Python Version](https://img.shields.io/badge/python-3.9-blue?style=for-the-badge&logo=python)
![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge&logo=mit)


![Black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge&logo=python)
![pylint](https://img.shields.io/badge/pylint-10.00-green?style=for-the-badge&logo=python)

[![CI-CD](https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/GCP-streaming-pipeline/CI-CD.yaml?&style=for-the-badge&logo=githubactions&cacheSeconds=60&label=Tests)](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/actions/workflows/CI-CD.yml)
[![IMAGE-DEPLOY](https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/GCP-streaming-pipeline/deploy-image.yml?&style=for-the-badge&logo=github&cacheSeconds=60&label=Registry)](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/actions/workflows/deploy-cloud-run.yaml)
[![GCP-DEPLOY](https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/GCP-streaming-pipeline/deploy-cloud-run.yaml?&style=for-the-badge&logo=google&cacheSeconds=60&label=Deploy)](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/actions/workflows/deploy-cloud-run.yaml)
[![CI-CD](https://img.shields.io/github/actions/workflow/status/ivdatahub/data-producer-api/CI-CD.yaml?&style=for-the-badge&logo=githubactions&cacheSeconds=60&label=Tests)](https://github.com/ivdatahub/data-producer-api/actions/workflows/CI-CD.yml)
[![IMAGE-DEPLOY](https://img.shields.io/github/actions/workflow/status/ivdatahub/data-producer-api/deploy-image.yml?&style=for-the-badge&logo=github&cacheSeconds=60&label=Registry)](https://github.com/ivdatahub/data-producer-api/actions/workflows/deploy-cloud-run.yaml)
[![GCP-DEPLOY](https://img.shields.io/github/actions/workflow/status/ivdatahub/data-producer-api/deploy-cloud-run.yaml?&style=for-the-badge&logo=google&cacheSeconds=60&label=Deploy)](https://github.com/ivdatahub/data-producer-api/actions/workflows/deploy-cloud-run.yaml)


[![Codecov](https://img.shields.io/codecov/c/github/IvanildoBarauna/GCP-streaming-pipeline?style=for-the-badge&logo=codecov)](https://app.codecov.io/gh/IvanildoBarauna/GCP-streaming-pipeline)
[![Codecov](https://img.shields.io/codecov/c/github/ivdatahub/data-producer-api?style=for-the-badge&logo=codecov)](https://app.codecov.io/gh/ivdatahub/data-producer-api)

## Development Stack

[![My Skills](https://skillicons.dev/icons?i=pycharm,python,github,gcp,docker,fastapi,postman&perline=7)](https://skillicons.dev)

## Cloud Stack (GCP)

<img src="docs/icons/cloud-build.png" Alt="Cloud Build" width="50" height="50"><img src="docs/icons/artifact-registry.png" Alt="Artifact Registry" width="50" height="50"><img src="docs/icons/cloud-run.png" Alt="Cloud Run" width="50" height="50"><img src="docs/icons/pubsub.png" Alt="Pub/Sub" width="50" height="50">

- Cloud Build: Continuous Integration and Continuous Deployment (CI/CD) service provided by GCP integrated with GitHub Actions
Expand All @@ -29,16 +27,15 @@
- Pub/Sub: Messaging service provided by GCP for sending and receiving messages between FastAPI and Dataflow pipeline.

## Continuous Integration and Continuous Deployment (CI/CD, DevOps)
![My Skills](https://skillicons.dev/icons?i=githubactions)


![My Skills](https://skillicons.dev/icons?i=githubactions)

## Contributing

See the following docs:

- [Contributing Guide](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/blob/main/CONTRIBUTING.md)
- [Code Of Conduct](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/blob/main/CODE_OF_CONDUCT.md)
- [Contributing Guide](https://github.com/ivdatahub/data-producer-api/blob/main/CONTRIBUTING.md)
- [Code Of Conduct](https://github.com/ivdatahub/data-producer-api/blob/main/CODE_OF_CONDUCT.md)

## Project Highlights:

Expand All @@ -56,7 +53,6 @@ See the following docs:

- Documentation: Creation of detailed documentation to facilitate the understanding and use of the application, including installation instructions, usage examples and troubleshooting guides.


## API Documentation

[Swagger UI](https://ivanildobarauna.github.io/data-producer-api/)
[Swagger UI](https://ivdatahub.github.io/data-producer-api/)
10 changes: 5 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ coverage:
status:
project:
default:
target: 80%
target: 63%
# adjust accordingly based on how flaky your tests are
# this allows a 10% drop from the previous base commit coverage
threshold: 2%

comment: #this is a top-level key
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: false # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]]
require_changes: false # if true: only post the comment if coverage changes
require_base: false # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]]
24 changes: 12 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ packages = [{ include = "src"}]

[tool.poetry.dependencies]
python = "^3.9"
google-cloud-pubsub = "^2.23.0"
fastapi = "^0.112.1"
google-cloud-pubsub = "^2.23.1"
fastapi = "^0.115.0"
uvicorn = "^0.30.6"
datadog = "^0.50.0"
google-cloud-secret-manager = "^2.20.2"
coverage = "^7.6.1"
pytest = "^8.3.3"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
Expand Down
2 changes: 1 addition & 1 deletion src/api/application/utils/contants.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PROJECT_ID = "ivanildobarauna"
PROJECT_ID = "data-producer-api"
2 changes: 1 addition & 1 deletion src/api/tests/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def test_send_data(mocker):

assert result["message_id"] == "mock_message_id"
mock_publish.assert_called_once_with(
"projects/ivanildobarauna/topics/gcp-streaming-pipeline",
"projects/data-producer-api/topics/gcp-streaming-pipeline",
data=json.dumps(data).encode("utf-8"),
)

0 comments on commit 58a4814

Please sign in to comment.