Extract project data from GitLab
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.csv- (almost) every activity made, including opening and closing issues, pushing to the repository, and more...
backlog.csv- a pool of issues, not associated with assignee or milestone.
sprints.csv- an advanced feature for close monitoring of sprint progress (see special requirements below)
pip install magpy-raz
To use this package, you need to provide a GitLab personal access token file, with
Gitlab projects belong to GitLab groups (not individual users)
Each project has a defined
Output csv files will be created in the same folder as the main program
Special Requirements for Sprint Tracking
To use the
sprints feature, you need to implement the following in your
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
/estimatecommand (see GitLab Time Tracking for more details)
Use the standard
Donelabels, to indicate issue status.
import magpy.general as mg import magpy.hub as my import magpy.hubs as mh import sys HUBS = [my.Hub('בית-שמש', '5961818', '2019-10-31', '2020-04-01')] TOKEN = 'token-raz.txt' def parse_hubs(hubs_string): ''' Convert Hubs string to a list of Hub objects ''' hubs =  hub_string_list = hubs_string.split(sep=']') for hub_string in hub_string_list: hub_params = hub_string.strip('[,').split(sep=',') if len(hub_string) >= 4: hub = my.Hub(name=hub_params, group_id=hub_params, start_date=hub_params, end_date=hub_params) hubs.append(hub) return hubs def main(): try: # Get Hubs from a calling script (e.g., from Excel) token = sys.argv hubs = parse_hubs(sys.argv) except BaseException: # Get locally defined Hubs (for debug) token = TOKEN hubs = HUBS # Connect to GitLab gl = mg.MagGitlab(token) # Get data for my hubs hubs = mh.Hubs(gl, hubs) hubs.write_csv_files() if __name__ == '__main__': main()
Distributed under the MIT License.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size magpy_raz-1.0.8-py3-none-any.whl (16.0 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size magpy-raz-1.0.8.tar.gz (11.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for magpy_raz-1.0.8-py3-none-any.whl