Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • N nes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Earth SciencesEarth Sciences
  • nes
  • Wiki
  • Development

Development · Changes

Page history
Update Development authored Sep 26, 2024 by Alba Vilanova's avatar Alba Vilanova
Show whitespace changes
Inline Side-by-side
Development.md
View page @ 6f7fa7e4
......@@ -3,6 +3,7 @@ This page can be used by developers to better understand certain parts of the co
- [Vertical Interpolation](#vertical-interpolation)
- [Write Grib2 files](#write-grib2-files)
- [Install and update NES inside Conda environment](#install-and-update-nes-inside-conda-environment)
- [Upload to PyPI](#upload-to-pypi)
## Vertical interpolation
......@@ -118,3 +119,38 @@ This will install the current version of NES that is in the machine. If NES is u
2. Repeat the steps above for the installation.
You can also check the complete [NES source code](https://earth.bsc.es/gitlab/es/NES/-/blob/master/nes/nc_projections/default_nes.py#L2977)
## Upload to PyPI
Every time a version is released, we should update [NES in PyPI](https://pypi.org/project/NES/). To do so, we will first create a source distribution:
```
python setup.py sdist
```
We can check if it can be installed doing:
```
pip install dist/NES-1.X.X.tar.gz
```
If everything is correct, we can proceed to upload our distribution to the website. For this we need to install twine:
```
pip install twine
```
And get an API key in PyPI. I recommend creating a folder in your home directory called .pypirc, with the following content:
```
[pypi]
username = __token__
password = pypi-[key]
```
That way you won't be asked for the your credentials anymore. Make sure the version name has been updated in __init__.py, and no more changes are needed since **it is not allowed to update the repository for that version once it is uploaded even if deleted**.
To upload it, you can do:
```
twine upload dist/NES-1.X.X.tar.gz
```
\ No newline at end of file
Clone repository
  • Home
  • Tutorials
  • Trainings
  • Development
  • Contribute