CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 4 forks source link

Remove dependency of checking out CABLE-AUX from SVN #230

Closed abhaasgoyal closed 9 months ago

abhaasgoyal commented 10 months ago

Currently, a new user following the user guide in the documentation would need access to cable project group in NCI, irrespective of whether the realisations keyword has a svn repo. Since the CABLE project has been moved to Github, we want to remove the dependency of using SVN to checkout to CABLE-AUX branch by default.

Reproducing the Bug

  1. Clone CABLE-LSM/bench_example
    git clone git@github.com:CABLE-LSM/bench_example.git
  2. Edit config.yml to remove the svn realisation
    -  - repo:
    -      svn:
    -        branch_path: trunk
  3. Running benchcab run provides the following error:
    
    [ag9761@gadi-login-02 bench_example]$ benchcab run
    Creating src directory
    Checking out repositories...
    Successfully checked out main - commit 1c8a2cb763f0a797f78f23a3dd8296277f26bb86
    Authentication realm: <https://trac.nci.org.au:443> NCI Projects
    Password for 'ag9761': **********

Traceback (most recent call last): File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/bin/benchcab", line 10, in sys.exit(main()) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/main.py", line 30, in main parse_and_dispatch(parser) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/main.py", line 20, in parse_and_dispatch func(args) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/benchcab.py", line 317, in run self.fluxsite(config_path, no_submit, verbose, skip) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/benchcab.py", line 302, in fluxsite self.checkout(config_path, verbose) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/benchcab.py", line 201, in checkout cable_aux_repo.checkout(verbose=verbose) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/utils/repo.py", line 186, in checkout self.subprocess_handler.run_cmd(cmd, verbose=verbose) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/benchcab/utils/subprocess.py", line 62, in run_cmd proc = subprocess.run(cmd, shell=True, check=True, kwargs) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'svn checkout https://trac.nci.org.au/svn/cable/branches/Share/CABLE-AUX src/CABLE-AUX' returned non-zero exit status 1.



**Further Steps**
The behaviour may have to do something with checking out the svn branch stored in `cable_aux_repo`:
https://github.com/CABLE-LSM/benchcab/blob/af43dad820811bc0b5e56161957ca374aeeb704e/benchcab/benchcab.py#L197
abhaasgoyal commented 10 months ago

In addition to removing cable_aux_repo on normal runs, should we also remove this behaviour on integration tests by default?

https://github.com/CABLE-LSM/benchcab/blob/af43dad820811bc0b5e56161957ca374aeeb704e/benchcab/data/test/integration.sh#L22

SeanBryan51 commented 10 months ago

Yeah I'm happy for the SVN repo to be removed from the integration test.