Astro-Constants

 view release on metacpan or  search on metacpan

AUTHOR_NOTES.md  view on Meta::CPAN

Look in ```data/old_versions/constants_YEAR_VERSION.xml```
As a change is made, make copy of PhysicalConstants.xml  to the year and 
upcoming release version of Astro::Constants


## Adding a Constant

There is a script that will add a number of constants to the Constants file
 script/add_constants.pl
assumes the following:
* value in units of MKS
* the uncertainty or precision is given relative to the value

## Modifying a Constant

For now I edit the XML with XML Copy Editor.
Rather than building an editor, I should have a validator.

## Deprecating a Constant

One step per version.  No faster.

* if changing name, move name to alternateName
* add to alternate tag
* announce decision to deprecate in upcoming version
* add deprecated tag
 * emit warning on using (in Constants.pm)
 * removed from long
* add notice of deprecation in ChangeLog

### Changing a Name

* add notice to change name to ChangeLog and POD
 * add new name to alternateName type="newName".  old name available in :long
* put new name as Name, old name as alternateName type="oldName".  old name available in :long and :alternate
* change type to ????.  old name available in :alternate
* change type to deprecated, add version attribute.  
 * use of constant emits warning (carp?)  old name available in :deprecated
 * add notice to description tag
 * note deprecation in ChangeLog
* wait minimum of 2 versions and 2 years
* remove deprecated alternateName from PhysicalConstants file
 * note removal in ChangeLog

### Removing a constant

* add notice to change name to ChangeLog and POD
* add deprecated tag, with date and version attributes.  
 * add notice to description tag
 * use of constant emits warning (carp?)  constant available in :deprecated
 * note deprecation in ChangeLog
* wait minimum of 2 versions and 2 years
* remove constant from PhysicalConstants file (to RemovedConstants.xml?)
 * note removal in ChangeLog

## Add *symbol* to PhysicalConstants.xml schema

* adding entity "symbol" to schema
  * no type attribute required if constant is a Latin character
  * otherwise
    * unicode
    * description, usually the unicode description of the character(s)
    * latex and html are the representations to produce the symbol
      * need to find the XML representation of & so that I can produce π in valid XML
    * ascii - how symbol is traditionally rendered in ascii format
* take a look a the diff between PhysicalConstants.xml and PhysicalConstants_with_symbols.xml


# Design decisions

## PhysicalConstants

I chose to keep the Constant definitions in XML for its language independance and validation tools.
Other people have the ability to edit the file and I'd like a way of verifying that the definition
file is correct before the processing tools get blown out of the water.

# Packaging for Distros

## Fedora

Looking at [Fedora's 2024 instructions](https://docs.fedoraproject.org/en-US/package-maintainers/Installing_Packager_Tools/)
I installed `fedora-packager` and  `fedora-review`.



( run in 0.919 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )