Skip to main content

Library responsible for extracting data from Jira to SRO database

Project description

Jira_sro_etl

Quality Gate Status Coverage Code Smells

General Information

Goal

Library responsible for extracting data from Jira to SRO database

Documentation

The Documentation can be found in this link

Requirements

The code need the following programs to run, versions were listed just for guidance, you can try with different ones by your own risk, we tested with these.

Program Version
Postgres 13.3
MongoDB Community 4.4.5
Python 3.8.5
Pip 21.1.1

Installation

If you have already made the initial fill, just install jira_sro_etl running:

pip install jira_sro_etl

If you wanna do the initial fill, clone this repo and follow the steps listed on USAGE section

Usage

Since it uses SRO_DB lib you must export the following environment variables:

  • USERDB = Postgres's username
  • PASSWORDDB = Postgres's password
  • HOST = Postgres's host (usually localhost)
  • DBNAME = Your database's name (must be already created) on Postgres

Create a virtual environment and activate it

python3 -m venv env && source env/bin/activate

Install the requirements

pip install -r requirements.txt

Fill the fields on dump_db/create_org.py and run

python dump_db/create_db.py && python dump_db/create_org.py

Grab the data that was printed on terminal after last command and paste it on initial_fill.py (before the manager = Manager(data)), then run

python initial_fill.py

After the initial fill you can run new creations, updates or deletes on any classes. If you've installed jira_sro_etl with pip you can run the following code for example:

from jira_sro_etl import factories
u = factories.userFactory()
u.create({'content': {'all': {'user': {'accountId': 'ACCOUNT_ID_FROM_JIRA'}}}})

CI/CD configuration

Configure the following variables in CI/CD:

  • VAR_SONAR_CLOUD_TOKEN = Token from SonarCloud
  • VAR_GITLAB_USER_NAME = username of Gitlab
  • VAR_GITLAB_USER_EMAIL = user's email of Gitlab
  • VAR_PYPI_USER_NAME = pypi's username
  • VAR_PYPI_PASSWORD = pypi's password

Copyright

This lib was PowerRight by SEON Application Lib Generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jira_sro_etl-17.0.0-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file jira_sro_etl-17.0.0-py3-none-any.whl.

File metadata

  • Download URL: jira_sro_etl-17.0.0-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for jira_sro_etl-17.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f23f1e89286a871905956e47b0831771ac82b52a32bc25cc4e99537dcf22eeb5
MD5 c53843eac9b5f52a3ff8a24c33ea28ac
BLAKE2b-256 f77a10911bfde4870ce014bfcf6eabb7b7e2b5ec4d5e186822afb1d2db3ff4d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page