Commit 2940091d authored by Enrique Garcia's avatar Enrique Garcia
Browse files

typo in gitlabci, add debug in upload scripts and modify details in READMEs

parent 5eccc856
Pipeline #71559 canceled with stages
in 1 minute and 26 seconds
......@@ -108,9 +108,9 @@ deploy_zenodo:
# You will need to provide also th e version of the last release (or parsed yourself via the api ;-) )
- export VER=2.0
- >
wget -O template_project_escape-v"$VER".zip
https://gitlab.in2p3.fr/escape2020/escape/template_project_escape/-/archive/v"$VER"/template_project_escape-v"$VER".zip
- mv template_project_escape-v"$VER".zip ./build
wget -O template_project_escape-V"$VER".zip
https://gitlab.in2p3.fr/escape2020/escape/template_project_escape/-/archive/V"$VER"/template_project_escape-V"$VER".zip
- mv template_project_escape-V"$VER".zip ./build
- ls ./build
- >
python3 .zenodoci/upload_new_version_deposit.py
......
......@@ -32,7 +32,7 @@ This token will be passed later in the continuous deployment stage of the CI/CD
your personal token, you should create an environment variable in your GitLab repository. This way, the token could be used as a variable without
revealing its value. To create an an environment variable:
- Go to your GitLab repository.
- Settings --> CI/CD --> Variables --> Add variable --> Fill the fields --> Mask and protect the variable !
- Settings --> CI/CD --> Variables --> Add variable --> Fill the fields --> Mask your variable(s) !!
The environment variable will look like this:
......
......@@ -9,7 +9,7 @@
"affiliation": "LAPP, CNRS",
"orcid": "0000-0002-5686-2078"}],
"access_right": "open",
"license": "'GPL-3.0+",
"license": "GPL-3.0+",
"communities": [{"identifier": "escape2020"}],
"keywords": [],
"language": "eng",
......
......@@ -58,19 +58,19 @@ if __name__ == '__main__':
new_upload = z.deposition_file_upload_large_file(deposition_id,
target_name=file,
file_path=full_path_file)
print(new_upload)
print("File {} correctly uploaded !\n".format(file), new_upload)
# Upload repository information - that you must have filled before ! - and add the doi
with open('.zenodoci/repository_information.json') as json_file:
entry_info = json.load(json_file)
entry_info['metadata']['doi'] = doi
#entry_info['metadata']['doi'] = doi
update_entry = z.deposition_update(deposition_id,
data=entry_info)
if update_entry.status_code < 399:
print("Status {}. Repository information correctly uploaded !".format(update_entry.status_code))
else:
print(update_entry.json())
print("Repository information NOT correctly uploaded !", update_entry.json())
# publish entry - to publish the entry, uncomment the two lone below
# publish = z.deposition_actions_publish(deposition_id)
......
......@@ -72,7 +72,7 @@ if __name__ == '__main__':
new_upload = z.deposition_file_upload_large_file(new_deposition_id,
target_name=file,
file_path=full_path_file)
print(new_upload)
print("File {} correctly uploaded !\n".format(file), new_upload)
# Update metadata info
updated_metadata = z.deposition_retrieve(new_deposition_id).json()['metadata']
......@@ -85,8 +85,12 @@ if __name__ == '__main__':
updated_metadata['license'] = 'GPL-3.0+'
updated_metadata['keywords'] = []
z.deposition_update(new_deposition_id,
data=updated_metadata)
update_entry = z.deposition_update(new_deposition_id,
data=updated_metadata)
if update_entry.status_code < 399:
print("Status {}. Repository information correctly uploaded !".format(update_entry.status_code))
else:
print("Repository information NOT correctly uploaded !", update_entry.json())
# publish entry - to publish the entry, uncomment the two lone below
# publish = z.deposition_actions_publish(new_deposition_id)
......
......@@ -12,8 +12,8 @@ https://travis-ci.com/garciagenrique/template_project_escape)
A simple template project to provide software to ESCAPE.
It shows the **basic documentation** a project should include, following the
[opensource guide](https://opensource.guide/starting-a-project/):
The repository shows the **basic documentation** that should be included within the project (following the
[opensource guide](https://opensource.guide/starting-a-project/)):
* An [open source](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository#where-does-the-license-live-on-my-repository)
**license**.
......@@ -23,12 +23,12 @@ It shows the **basic documentation** a project should include, following the
- See below the general guidelines for the ESCAPE repository.
* A [code of conduct](https://opensource.guide/code-of-conduct/).
- Check why is a good idea to add one.
* The structure of the repository.
* The repository itself.
It would be highly suitable to include too:
- A setup file as well as the basic commands to install the library (see below).
- A .gitignore file.
- Unitary and integration tests.
- Unitary and integration tests, and ideally a CI pipeline.
**Please feel free to copy / base on / template this project!** (Look to left of the `Clone or download` button in the
[GitHub](https://github.com/garciagenrique/template_project_escape) site).
......@@ -60,9 +60,13 @@ your GitLab profile if you want to 'push' your changes to the server.
# Singularity image container and CI/CD to Zenodo
The documentation of how to create a Singularity image / container of your code, upload it to your repository, and also add
it to the ESCAPE community in the [Zenodo repository](https://zenodo.org/communities/escape2020) can be found in the
`.gitlabci`, `.zenodoci` directories and in the `.gitlab-ci.yml` file. Please read carefully all the README files.
An example of how to;
1. create a Singularity image / container of your code,
2. make it available as a downloadable artifact within your project and
3. add it to the ESCAPE community in the [Zenodo repository](https://zenodo.org/communities/escape2020),
can be found in the `.gitlabci`, `.zenodoci` directories and in the `.gitlab-ci.yml` file. Please read carefully
all the README files.
For an easy example of how to create a Singularity receipt from scratch (and its corresponding container when executed),
please have a look to the `singularity_utils` directory.
......@@ -75,7 +79,7 @@ please have a look to the `singularity_utils` directory.
$ python setup.py install
```
This is an easy method to install the library.
This is an easy method to install the current project.
You can also check other more elaborated ways - generally for bigger repositories - here (e.g.,
[cta-observatory/cta-lstchain](https://github.com/cta-observatory/cta-lstchain),
[cta-observatory/ctapipe](https://github.com/cta-observatory/ctapipe)).
......
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