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

And if your mongo db is not on your localhost you can export:

  • MongoDB = Mongo host address

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

jira_sro_etl-26.0.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jira_sro_etl-26.0.0-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for jira_sro_etl-26.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6b780c5a1e0394b7dffc595b044024929ca916bf060b8ce494ebdb29c5687d
MD5 34b0121834abc99beba510158f3d5ef3
BLAKE2b-256 013258bdd3eac669fea2c2a9a852c446239c37e479275db2c9e24bd15f24b449

See more details on using hashes here.

Supported by

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