Skip to content

Commit dc74340

Browse files
committed
Updated documentation for version 1.5.0.
1 parent cd333fa commit dc74340

3 files changed

Lines changed: 22 additions & 50 deletions

File tree

docs/source/arcsi_ls_example.rst

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -182,25 +182,17 @@ populating the ``c_dict`` dict, which gets written to the database::
182182
# job_time_limit='2-23:59',
183183
# module_load='module load parallel singularity\n\nexport http_proxy="http://a.pfb:proxy101019@10.212.63.246:3128"\nexport https_proxy="http://a.pfb:proxy101019@10.212.63.246:3128"\n')
184184

185-
def run_check_outputs(self):
186-
process_tools_mod = 'perform_dwnld_jobs'
187-
process_tools_cls = 'PerformScnDownload'
188-
time_sample_str = self.generate_readable_timestamp_str()
189-
out_err_file = 'processing_errs_{}.txt'.format(time_sample_str)
190-
out_non_comp_file = 'non_complete_errs_{}.txt'.format(time_sample_str)
191-
self.check_job_outputs(process_tools_mod, process_tools_cls, out_err_file, out_non_comp_file)
192-
193-
def run_remove_outputs(self, all_jobs=False, error_jobs=False):
194-
process_tools_mod = 'perform_dwnld_jobs'
195-
process_tools_cls = 'PerformScnDownload'
196-
self.remove_job_outputs(process_tools_mod, process_tools_cls, all_jobs, error_jobs)
197-
198185
if __name__ == "__main__":
199186
py_script = os.path.abspath("perform_dwnld_jobs.py")
200187
#script_cmd = "singularity exec --bind /scratch/a.pfb:/scratch/a.pfb --bind /home/a.pfb:/home/a.pfb /scratch/a.pfb/sw_imgs/au-eoed-dev.sif python {}".format(py_script)
201188
script_cmd = "python {}".format(py_script)
202189

203-
create_tools = FindLandsatScnsGenDwnlds(cmd=script_cmd, sqlite_db_file="dwnld_ls_scns.db")
190+
process_tools_mod = 'perform_dwnld_jobs'
191+
process_tools_cls = 'PerformScnDownload'
192+
193+
create_tools = FindLandsatScnsGenDwnlds(cmd=script_cmd, sqlite_db_file="dwnld_ls_scns.db",
194+
process_tools_mod=process_tools_mod,
195+
process_tools_cls=process_tools_cls)
204196
create_tools.parse_cmds()
205197

206198

@@ -304,26 +296,17 @@ which have been downloaded but not processed to an ARD product::
304296
# job_time_limit='2-23:59',
305297
# module_load='module load parallel singularity\n\n')
306298

307-
def run_check_outputs(self):
308-
process_tools_mod = 'perform_ard_process'
309-
process_tools_cls = 'PerformScnARD'
310-
time_sample_str = self.generate_readable_timestamp_str()
311-
out_err_file = 'processing_errs_{}.txt'.format(time_sample_str)
312-
out_non_comp_file = 'non_complete_errs_{}.txt'.format(time_sample_str)
313-
self.check_job_outputs(process_tools_mod, process_tools_cls, out_err_file, out_non_comp_file)
314-
315-
def run_remove_outputs(self, all_jobs=False, error_jobs=False):
316-
process_tools_mod = 'perform_ard_process'
317-
process_tools_cls = 'PerformScnARD'
318-
self.remove_job_outputs(process_tools_mod, process_tools_cls, all_jobs, error_jobs)
319-
320299

321300
if __name__ == "__main__":
322301
py_script = os.path.abspath("perform_ard_process.py")
323302
#script_cmd = "singularity exec --bind /scratch/a.pfb:/scratch/a.pfb --bind /home/a.pfb:/home/a.pfb /scratch/a.pfb/sw_imgs/au-eoed-dev.sif python {}".format(py_script)
324303
script_cmd = "python {}".format(py_script)
325304

326-
create_tools = FindSen2ScnsGenDwnlds(cmd=script_cmd, sqlite_db_file="ard_ls_scns.db")
305+
process_tools_mod = 'perform_ard_process'
306+
process_tools_cls = 'PerformScnARD'
307+
308+
create_tools = FindSen2ScnsGenDwnlds(cmd=script_cmd, sqlite_db_file="ard_ls_scns.db"
309+
process_tools_mod=process_tools_mod, process_tools_cls=process_tools_cls)
327310
create_tools.parse_cmds()
328311

329312

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
# built documents.
6262
#
6363
# The short X.Y version.
64-
version = '1.4'
64+
version = '1.5'
6565
# The full version, including alpha/beta/rc tags.
66-
release = '1.4.0'
66+
release = '1.5.0'
6767

6868
# The language for content autogenerated by Sphinx. Refer to documentation
6969
# for a list of supported languages.

docs/source/getstarted.rst

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This python script has been saved in a file called ``perform_processing.py``::
4848

4949
def outputs_present(self, **kwargs):
5050
return True, dict()
51-
51+
5252
def remove_outputs(self, **kwargs):
5353
print("No outputs to remove")
5454

@@ -88,30 +88,19 @@ This python script has been saved in a file called ``gen_process_cmds.py``::
8888
self.pop_params_db()
8989
self.create_shell_exe("exe_analysis.sh", "cmds.sh", 4, db_info_file=None)
9090

91-
92-
def run_check_outputs(self):
93-
process_tools_mod = 'perform_processing'
94-
process_tools_cls = 'ProcessJob'
95-
time_sample_str = self.generate_readable_timestamp_str()
96-
out_err_file = 'processing_errs_{}.txt'.format(time_sample_str)
97-
out_non_comp_file = 'non_complete_errs_{}.txt'.format(time_sample_str)
98-
self.check_job_outputs(process_tools_mod, process_tools_cls, out_err_file, out_non_comp_file)
99-
100-
def run_remove_outputs(self, all_jobs=False, error_jobs=False):
101-
process_tools_mod = 'perform_processing'
102-
process_tools_cls = 'ProcessJob'
103-
self.remove_job_outputs(process_tools_mod, process_tools_cls, all_jobs, error_jobs)
104-
105-
10691
if __name__ == "__main__":
10792
py_script = os.path.abspath("perform_processing.py")
10893
script_cmd = "python {}".format(py_script)
10994

110-
create_tools = CreateTestCmds(cmd=script_cmd, sqlite_db_file="test_jobs.db")
95+
process_tools_mod = 'perform_processing'
96+
process_tools_cls = 'ProcessJob'
97+
98+
create_tools = CreateTestCmds(cmd=script_cmd, sqlite_db_file="test_jobs.db",
99+
process_tools_mod=process_tools_mod, process_tools_cls=process_tools_cls)
111100
create_tools.parse_cmds()
112101

113102

114-
This class generates the individual job parameters, in this case 100 jobs. The dict for each job has to be appended to the ``self.params`` list within the ``gen_command_info`` function. The ``run_gen_commands`` function needs to call the ``gen_command_info`` function but also specifies the output format (i.e., batch processing using GNU parallel on a local system or via slurm on a cluster). In this case it is via a GNU parallel and a shell script listing the commands. The ``run_check_outputs`` function is specifying the ``PBPTQProcessTool`` class name and module so it can be imported to check for job completion. Also the output files for the checking reports are specified. It is often useful to put a timestamp into the file name so files are not overwritten each time the outputs are checked.
103+
This class generates the individual job parameters, in this case 100 jobs. The dict for each job has to be appended to the ``self.params`` list within the ``gen_command_info`` function. The ``run_gen_commands`` function needs to call the ``gen_command_info`` function but also specifies the output format (i.e., batch processing using GNU parallel on a local system or via slurm on a cluster). In this case it is via a GNU parallel and a shell script listing the commands.
115104

116105
When the class ``CreateTestCmds`` is instantiated, the command to be executed for processing to occur (i.e., ``python perform_processing.py``) needs to be specified and the database file name and path is required.
117106

@@ -140,11 +129,11 @@ If you want the report outputted to a file run::
140129
python gen_process_cmds.py --check -o report.json
141130

142131
To remove outputs where an error occurred then you can use the following::
143-
132+
144133
python gen_process_cmds.py --rmouts --error
145134
146135
To remove outputs for all jobs then you can use the following::
147-
136+
148137
python gen_process_cmds.py --rmouts --all
149138

150139
Where you have had an error occur it can be useful to run a single task in isolation without the database recording any information and any exception being returned to the console rather than captured. This can be performed by calling the processing python file. For example, to process job 20, run the following command::

0 commit comments

Comments
 (0)