
Notes for me to remember steps involved in publishing this package

- create branch on local machine

- make modifications

- if test_data is not in the root directory, get it with 
  ./download_test_data.sh

   On the science network, can link to dataset with:
   /home/dja001/shared_stuff/files/test_data_for_domutils_on_zenodo/v?.?.?

- run unitttests
  python -m unittest discover

    This should find and run 128 tests

- run doctests and make documentation
  cd docs/
  make clean
  make doctest
  make html


- If the test makes a figure or that new test data is required
  the a new test dataset will have to be published in a new version of the repository on zenodo
  At the moment, only me (dominik) can do that. Contact me and I will do it for you. 

  Instructions for updating the zenodo archive:

     - Make sure that you start with the current version of test_data on zenodo
       cd /root/of/domutils/package/
       ./download_test_data.sh

     - Make new dirs, change file as required by new tests or examples

     - don't forget to include "_static" if new images are generated
       cp -rf docs/_static test_data/_static

     - don't forget to include "test_results" if the have changed
       cp -rf test_results test_data/test_results

     When you are happy with the changes, you have to update the Zenodo repository

     - Go in the directory containing test datasets:
       cd /home/dja001/shared_stuff/files/test_data_for_domutils_on_zenodo/

     - Copy the modified test_data directory into its own versionned directory
       cp -r  ~/python/packages/domutils_package/test_data v1.0.9

     - List differences with previous version and build .tgz for archive
      ./prepare_tgz_for_zenodo.sh v1.0.8 

     - Login on zenodo with @gmail.com account
       - delete files that are modified
       - upload new and modified files
       - change publication date
       - change version
       - publish

     - get record number by clicking on new version
       eg  5497958

     - adjust version and record number in download_test_data.sh
       - don't forget to add new files and .tgz if needed


  If the zenodo archive was changes, it must be tested
  rm -rf test_data test_results
  Updating the dataset version and file list will be necessary
  download_test_data.sh

  Run the tests with the new test_data directory if it got changed

- adjust version number in VERSION

- adjust version number in 
     conda_build/domutils/meta.yaml  I need to find a way to automate this

- describe changes in CHANGELOG

- make bundle by running:
    - You probably want to cleanup
    python setup.py clean --all
    rm -rf dist
    python setup.py sdist bdist_wheel

        Optionnal
        - upload to TEST pypi
        twine upload --repository-url https://test.pypi.org/legacy/ dist/*

- upload to official pypi repo
twine upload dist/*

- from the root of the repo from somewhere with internet connexion
    To load in environment if not already done:
        conda install anaconda-client conda-build
conda build --py 3.7 --py 3.8 --py 3.9  conda_build/domutils

and upload it to anaconda cloud

- can test local build with :
        conda install -c file:///home/ords/mrd/rpndat/dja001/python_miniconda3/envs/test1/conda-bld/ domutils

- commit everything, push branch to github, open merge/pull request

- check that documentation builds on RTD
  In admin settings, change default to latest and select new branch
  "latest" will be built from that branch
  check if docs renders well
    https://readthedocs.org/projects/domutils


- when all the above worked, 
  add version tag and push to github
   git checkout master
   git pull github master
   git tag -a v2.0.0 -m 'version 2.0.0 with CamelCase removed'
   git push github --tags
  "stable" will be build on RTD





        
        - test the conda package in a fresh conda environment with:
        conda install -c dja001 domutils

        - upgrade domutils in an existing environment with:
        conda upgrade -c dja001 domutils


