Commit 8e30d76f authored by María José Ramos's avatar María José Ramos
Browse files

Changing windows size

parent 895bad08
......@@ -9,17 +9,17 @@ def git_review():
message0 = """
Git is more than a website, Git is a control version software, which is
a software made for tracking changes in any set of files in a directory.
Managing changes of your documents, data, notebooks and coding scripts is
essential when you do research.\n
As you probably have learned by now, just copying your files and renaming
them as "myProjectUpdateFinalTrueFinalPrint.ipynb" is not the most
efficient way to do so. Git makes it easier by providing an online
Managing changes of your documents, data, notebooks and coding
scripts is essential when you do research.\n
As you probably have learned by now, just copying your files and
renaming them as "myProjectUpdateFinalTrueFinalPrint.ipynb" is not the
most efficient way to do so. Git makes it easier by providing an online
plataform for Version Control of personal and collaborative projects.
"""
message1 = """
The Git software stores and save files to a directory called repository,
also shorten as repo. A Git repository allows various operations to create
also shorten as repo. A Git repository allows various operations to create
different versions of the files in it.\n
A Git repository can be local (placed in your computer) or remote
(hosted on the Internet, or in a different server).\n
......@@ -34,7 +34,7 @@ def git_review():
Maybe you knew all of this already. In fact, you probably have this program
running because you did a git clone to your computer (or Virtual Machine,
for that matter).\n
One more thing before you continue: remember than you can only push to git
One more thing before you continue: remember than you can only push to git
repositories where you have permissions to do so. If you need to clone a
repo that you do not own and need to make changes, fork the repo first and
then you can clone it.
......@@ -42,10 +42,10 @@ def git_review():
message3 = """
You can obtain a Git repository by either cloning a Git repository
or by converting a local directory to a Git repository, using git init.\n
or by converting a local directory to a Git repository, using git init. \n
It does not matter if the directory is a new local directory, or an
already existent local directory, the command git init works in both
cases.\n
already existent local directory, the command git init works in
both cases.\n
And you can also git init a git repository, is it safe to do so,
it will not overwrite files that are already there.
"""
......@@ -66,7 +66,7 @@ def git_review():
# Creating window
root = tk.Tk()
root.title("Review of Git")
root.geometry("250x200")
root.geometry("250x250")
root.config(background = "#F5F5F5")
root.eval('tk::PlaceWindow . center')
label = tk.Label(root, text ="Select an option and\n review some concepts")
......@@ -78,7 +78,7 @@ def git_review():
window_0 = tk.Toplevel(root)
window_0.title("Git and Version Control")
window_0.geometry("530x200")
window_0.geometry("510x250")
window_0.config(background = "#F5F5F5")
# Texts
title = tk.Label(window_0, text ="\n\nWhat is Git?", bg= "#F5F5F5").pack()
......@@ -90,7 +90,7 @@ def git_review():
window_1 = tk.Toplevel(root)
window_1.title("Git Repository")
window_1.geometry("540x200")
window_1.geometry("500x280")
window_1.config(background = "#F5F5F5")
title = tk.Label(window_1, text ="\n\nWhat is a Git repository?", bg= "#F5F5F5").pack()
text = tk.Label(window_1, text = message1, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
......@@ -101,7 +101,7 @@ def git_review():
window_2 = tk.Toplevel(root)
window_2.title("git fork/git clone")
window_2.geometry("550x250")
window_2.geometry("525x350")
window_2.config(background = "#F5F5F5")
title = tk.Label(window_2, text ="\n\nWhat does a git fork/git clone do?", bg= "#F5F5F5").pack()
text = tk.Label(window_2, text =message2, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
......@@ -110,7 +110,7 @@ def git_review():
window_3 = tk.Toplevel(root)
window_3.title("git init")
window_3.geometry("510x200")
window_3.geometry("460x260")
window_3.config(background = "#F5F5F5")
title = tk.Label(window_3, text ="\n\nWhat does a git init do?", bg= "#F5F5F5").pack()
text = tk.Label(window_3, text =message3, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
......@@ -120,7 +120,7 @@ def git_review():
window_4 = tk.Toplevel(root)
window_4.title("git add/git commit/git push")
window_4.geometry("560x230")
window_4.geometry("510x320")
window_4.config(background = "#F5F5F5")
title = tk.Label(window_4, text ="\n\nGit push and the previous steps", bg= "#F5F5F5").pack()
text = tk.Label(window_4, text =message4, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
......
......@@ -56,6 +56,7 @@ familiarized with {git}. If you are not, do not worry. We have created
a review of some important concepts, in case you need it.
"""
# Git review
print(more_message)
input(f"Press {enter} to see the review. Click {done} when you finish.")
git_review()
......@@ -282,4 +283,4 @@ while push_answer =="n":
# End of tutorial
if push_answer == "y":
print("\nAlright! You have reached the end of this tutorial.\n")
input("\nPress {enter} to continue.\n")
\ No newline at end of file
input("\nPress {enter} to continue.\n")
def zenodo_review():
# Tools
import tkinter as tk
import tkinter.ttk
# Messages for windows
message0 = """
Zenodo is a website where you can upload and publish files,
funded by CERN, OpenAIRE and the EU.\n
It is built and developed by researchers who want to
promote Open Science and welcome research from all nations
and disciplines, to help scientific work to be more
shareable and citeable.\n
Currently, all meta data is openly available under CC0 licence,
and all open content is openly accessible through open APIs.\n
"""
message1 = """
You can upload many types of files to Zenodo: publications, posters,
presentations, datasets, images, videos, audios, softwares, lessons,
all research outputs from all fields of science are welcome, and
they are currently accepting up to 50GB per dataset!.\n
When your files are ready, you can publish them, so they will be
permanently available on the Internet: your work will be stored
safely and it will be easier to cite, discover, share, considering
flexible licensing (although Zenodo encourages you to share your
research as openly as possible).
"""
message2 = """
A DOI (Digital Object Identifier) is a unique string of numbers, letters,
and symbols used to identify objects (like your scientific publication).\n
DOIs are standardized and assigned by a registration agency.\n
Zenodo supports DOI versioning by providing your published work
two DOIs, allowing you to:
-Edit/update the record’s files after they have been published.
-Cite a specific version of a record.
-Cite all of versions of a record.\n
This makes your work easier to identify, search and cite.
"""
message3 = """
Metadata is a set of data that contains information about other data.\n
While uploading a file to Zenodo, and before you publish it in the
website, you have to provide important data about your file, like its
title, creators, and type, which represents its metadata.\n
Not only this is a requirement of Zenodo, but it is very useful: it
helps to describe your work, making it easier to find and identify,
and it also makes it more accesible, by using a standard format and
vocabulary.
"""
# Creating window
root = tk.Tk()
root.title("Review of Zenodo")
root.geometry("260x220")
root.config(background = "#F5F5F5")
root.eval('tk::PlaceWindow . center')
label = tk.Label(root, text ="Select an option and\n review some concepts")
label.pack(pady = 10)
# Open window functions
def open_window_0():
window_0 = tk.Toplevel(root)
window_0.title("About Zenodo")
window_0.geometry("420x300")
window_0.config(background = "#F5F5F5")
# Texts
title = tk.Label(window_0, text ="\n\nWhat is Zenodo?", bg= "#F5F5F5").pack()
text = tk.Label(window_0, text =message0, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
return
def open_window_1():
window_1 = tk.Toplevel(root)
window_1.title("Zenodo's repository")
window_1.geometry("460x300")
window_1.config(background = "#F5F5F5")
title = tk.Label(window_1, text ="\n\nUploading and publishing", bg= "#F5F5F5").pack()
text = tk.Label(window_1, text = message1, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
return
def open_window_2():
window_2 = tk.Toplevel(root)
window_2.title("DOI Versioning in Zenodo")
window_2.geometry("465x300")
window_2.config(background = "#F5F5F5")
title = tk.Label(window_2, text ="\n\nWhat is DOI Versioning?", bg= "#F5F5F5").pack()
text = tk.Label(window_2, text =message2, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
return
def open_window_3():
window_3 = tk.Toplevel(root)
window_3.title("Zenodo's metadata")
window_3.geometry("460x250")
window_3.config(background = "#F5F5F5")
title = tk.Label(window_3, text ="\n\nWhat is metadata?", bg= "#F5F5F5").pack()
text = tk.Label(window_3, text =message3, bg= "#F5F5F5", anchor="e", justify="left", width=100).pack()
return
# Buttons that open windows and destroy the root window.
button_0 = tk.Button(root, text ="What is Zenodo?", bg="#B0E0E6", command=open_window_0)
button_0.pack(side="top")
button_1 = tk.Button(root, text= "Uploading and publishing", bg="#B0E0E6", command=open_window_1)
button_1.pack(side="top")
button_2 = tk.Button(root, text= "What is DOI Versioning?", bg="#B0E0E6", command=open_window_2)
button_2.pack(side="top")
button_3 = tk.Button(root, text ="What is metadata?", bg="#B0E0E6", command=open_window_3)
button_3.pack(side="top")
button_done = tk.Button(root, text = "Done", bg="#FF6347", command=root.destroy)
button_done.pack(side="bottom")
# mainloop, runs infinitely, unless root.destroy
root.mainloop()
return
......@@ -12,6 +12,7 @@ import pandas as pd
# Libraries to obtain data
import tkinter as tk
from zenodo_assistant.zenodo_tools.zenodo_more import zenodo_review
from zenodo_assistant.zenodo_tools.zenodo_search import filename_input
from zenodo_assistant.zenodo_tools.zenodo_functions import type_title, type_description, creators_dict, author_check
from zenodo_assistant.zenodo_tools.zenodo_date import date_input
......@@ -36,9 +37,21 @@ paste = colored("PASTE", "green", attrs=['reverse'])
welcome_message = f"""
Welcome to your {zenodo} assistant.\n
From here, you can upload a file to your {zenodo} account.
Before starting the tutorial, you should already be a little bit
familiarized with {zenodo}. If you are not, do not worry.
We have created a review of some of its important features,
in case you need it.
"""
print(welcome_message)
# Zenodo review
input(f"Press {enter} to see the review. Click {done} when you finish.")
zenodo_review()
input(f"Excellent! Let's start the assistant to upload your file. Press {enter}.")
os.system("clear")
# Submit file
input(f"Press {enter} to open the File Browser to {select} and {submit} the file that you want to upload.\n")
......@@ -213,4 +226,4 @@ before publishing.
"""
print(success_message)
input(f"\nPress {enter} to continue.")
\ No newline at end of file
input(f"\nPress {enter} to continue.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment