cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Improve the version detection when making a release #118

Closed jsturdy closed 6 years ago

jsturdy commented 6 years ago

Description

Updates the gembuild pointer to the latest version for extraction of build information based on the closest tag

Types of changes

Motivation and Context

Allows the releases to always be sequential in their machine understood versioning, such that a new RPM can be installed in the case that the version number hasn't changed (testing releases)

How Has This Been Tested?

Installed at P5 on top of current RPMs

lmoureaux commented 6 years ago

The version is also hard-coded in the docs configuration doc/conf.py, it would be good if it could always be in sync with the package version.

jsturdy commented 6 years ago

Agreed, though this can probably be worked around using the setuptools build_sphinx target, instead of the make doc target in the mfSphinx.mk, though I'm not sure... Doing it in the setuptools ecosystem is the "right" way, as the rest of the build is driven in that manner, however, @mexanick has potential reservations about this for cases where we couple sphinx and Doxygen docs for packages with mixed python and c/c++ parts, where we plan to use breathe to fuse them together coherently

mexanick commented 6 years ago

I believe sed-ing the correct version in doc/conf.py should be the way to go. This can be implemented in mfSphinx.mk similar to this: https://github.com/cms-gem-daq-project/gembuild/blob/4e5184ea9306a1e5ee10920e6b5e3d44dc072f4d/mfRPMRules.mk#L31

jsturdy commented 6 years ago

adding:

[build_sphinx]
version = ___version___
release = ___release___

to setup.cfg (values there aren't the most appropriate for the sphinx options, but just a proof of principle) results in a current output of a setuptools build_sphinx run

python setup.py build_sphinx -a -s ../doc --build-dir=compiled-docs -c ../doc -E
running build_sphinx
Running Sphinx v1.7.5
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 5 added, 0 changed, 0 removed
Usage: setup.py [options] macros                                                                                                                                                                                                                                                  

setup.py: error: no such option: -a
Usage: setup.py [options]

setup.py: error: no such option: -a
Usage: setup.py [options]

setup.py: error: no such option: -a
Usage: setup.py [options]

setup.py: error: option -s: invalid integer value: '../doc'
reading sources... [100%] utils                                                                                                                                                                                                                                                   
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/fitting/fitScanData.py:docstring of gempython.gemplotting.fitting.fitScanData.ScanDataFitter.fit:3: WARNING: Unexpected indentation.
WARNING: autodoc: failed to import module u'anaUltraLatency'; the module executes module level statement and it might call sys.exit().
/data/bigdisk/users/sturdy/software/gem-plotting-tools/anaUltraScurve.py:docstring of anaUltraScurve.fill2DScurveSummaryPlots:7: WARNING: Definition list ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/anaUltraScurve.py:docstring of anaUltraScurve.fill2DScurveSummaryPlots:9: WARNING: Unexpected indentation.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/anaUltraScurve.py:docstring of anaUltraScurve.fill2DScurveSummaryPlots:10: WARNING: Block quote ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/anaUltraScurve.py:docstring of anaUltraScurve.fill2DScurveSummaryPlots:15: WARNING: Definition list ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/anaUltraScurve.py:docstring of anaUltraScurve.plotAllSCurvesOnCanvas:5: WARNING: Definition list ends without a blank line; unexpected unindent.
WARNING: autodoc: failed to import module u'anaUltraThreshold'; the module executes module level statement and it might call sys.exit().
/data/bigdisk/users/sturdy/software/gem-plotting-tools/macros/clusterAnaScurve.py:docstring of clusterAnaScurve:1: WARNING: Duplicate ID: "module-clusterAnaScurve".
/data/bigdisk/users/sturdy/software/gem-plotting-tools/packageFiles4Docker.py:docstring of packageFiles4Docker.getListOfCmdTuples:6: WARNING: Definition list ends without a blank line; unexpected unindent.
WARNING: autodoc: failed to import module u'plot_scurves_by_thresh'; the module executes module level statement and it might call sys.exit().
WARNING: autodoc: failed to import module u'summary_plots'; the module executes module level statement and it might call sys.exit().
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.makeListOfScanDatesFile:7: WARNING: Unexpected indentation.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.makeListOfScanDatesFile:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.makeListOfScanDatesFile:10: WARNING: Definition list ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummary:7: WARNING: Definition list ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummary:9: WARNING: Unexpected indentation.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummary:10: WARNING: Block quote ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummaryByiEta:5: WARNING: Definition list ends without a blank line; unexpected unindent.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummaryByiEta:7: WARNING: Unexpected indentation.
/data/bigdisk/users/sturdy/software/gem-plotting-tools/rpm/gempython/gemplotting/utils/anautilities.py:docstring of gempython.gemplotting.utils.anautilities.saveSummaryByiEta:8: WARNING: Block quote ends without a blank line; unexpected unindent.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] utils                                                                                                                                                                                                                                                    
generating indices... genindex py-modindex
highlighting module code... [100%] scurvePlottingUtitilities                                                                                                                                                                                                                      
writing additional pages... search
copying static files... WARNING: html_static_path entry u'/data/bigdisk/users/sturdy/software/gem-plotting-tools/doc/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 22 warnings.

The HTML pages are in compiled-docs/html.

Produces: gemplotting sphinx

bdorney commented 6 years ago

Branch is out of date with base branch but changes look fine. Probably just needs a rebase.

bdorney commented 6 years ago

@jsturdy is a simple "update branch" and merge all that's necessary here? Or is there something else that is needed?