Extract project data from GitLab
Project description
Magshimim GitLab Project Management
This package extracts project data from GitLab, and writes it to .csv files, which can be used for monitoring and analysis (e.g., using Excel)
The data extracted by this package includes:
-
events
- (almost) every activity made, including opening and closing issues, pushing to the repository, and more... -
backlog
- a pool of issues, not associated with assignee or milestone. -
sprints
- an advanced feature for close monitoring of sprint progress (see special requirements below)
Installation
pip install magpy-raz
Requirements
To use this package, you need to provide a GitLab personal access token file, with api
scope.
Assumptions
-
Gitlab projects belong to GitLab groups (not individual users)
-
Each project has a defined
start_date
andend_date
-
Output csv files will be created in the same folder as the main program, and will have the same prefix, as the token file (e.g.,
raz-events.csv
)
Special Requirements for Sprint Tracking
To use the sprints
feature, you need to implement the following in your
GitLab projects:
-
Create a set of milestones, each with a start and due date, creating a continuous timeline (i.e., the due date of sprint-1 is the day before the start date of sprint-2)
-
Define a work-hours budget for the sprint, by including the following line at the top of the milestone descrition:
Budget: .... = __h
-
Define work estimate for each issue, associated with the milestone, by using the Gitlab
/estimate
command (see GitLab Time Tracking for more details) -
Use the standard
To Do
,In Progress
andDone
labels, to indicate issue status.
Example
import magpy.general as mg
import magpy.hub as my
import magpy.hubs as mh
TOKEN_FILE = 'token-raz.txt'
HUBS = [
my.Hub(name='בית-שמש',
group_id=5961818,
start_date='2019-10-31',
end_date='2020-04-01'),
my.Hub(name='ירושלים',
group_id=6231718,
start_date='2019-10-29',
end_date='2020-03-30')
]
def main():
# Connect to GitLab
gl = mg.MagGitlab(TOKEN_FILE)
# Get data for my hubs
hubs = mh.Hubs(gl=gl, hubs=HUBS)
hubs.write_csv_files()
if __name__ == '__main__':
main()
Author
License
Distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for magpy_raz-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a76d28f7d24aa10a5965d60dac8ed986a21c98c4db7c367574cc27d23b43193c |
|
MD5 | 7eea8f06f6b575659b731a7993a1b601 |
|
BLAKE2b-256 | b23fe824cf27574ef9b4c4ba26e28233ec845f2a061241abff1c28dbcd94fd0b |