![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
stats_package_syntax_file_generator
Advanced tools
This gem produces statistical package syntax files for fixed-column data files.
SAS
SPSS
Stata
Stat/Transfer STS metadata files
R (via the ipumsr package which depends on IPUMS DDIs)
Metadata can be supplied to the Controller in two general ways:
- Programmatically, using the API provided by the Controller class.
- Via one or more YAML files -- typically just one YAML file, but the
Controller will accept multiple files and merge their content.
Basic usage:
require 'stats_package_syntax_file_generator'
# Supply metadata via one YAML file.
sfc = SyntaxFile::Controller.new(:yaml_files => 'metadata.yaml')
# Or via multiple YAML files.
sfc = SyntaxFile::Controller.new(:yaml_files => ['md1.yaml', 'md2.yaml'])
# Or programmatically.
# For a working example, see devel/api_example.rb.
# Generate all syntax files.
sfc.generate_syntax_files
# Generate a syntax file of a specific TYPE (spss, sas, stata).
sfc.generate_syntax_file('TYPE')
# Ditto, but get the syntax as a list of strings rather than writing a file.
syntax_lines = sfc.syntax('TYPE')
Running tests:
devel/run_all_checks.sh
Project structure:
devel/
# Developer area.
# Various scripts, plus the following:
input/
# YAML metadata used during development
# and in end-to-end acceptance testing.
output_expected/
# Acceptance testing: expected output.
output_result/
# Acceptance testing: directory where new output
# is written. This output is not included in Git.
lib/ # The syntax file utility itself.
tests/ # Unit test scripts and their YAML metadata.
Class overview:
Controller
- The API for the gem. Users of the gem should not need to interact with
other classes.
- Serves as a container for the metadata needed to generate syntax files.
- Holds various attributes specifying the type of syntax files to
generate, the structure of the data files, and so forth.
Variable
Value
- Metadata classes holding information about variables in the data file.
- A Controller contains 1+ Variable objects.
- A Variable contains 0+ Value objects.
Maker
Maker_SAS
Maker_SPSS
Maker_STATA
Maker_STS
Maker_RDDI
- Classes responsible for creating syntax.
- Maker provides methods that all classes have in common.
- The other classes inherit from Maker, overriding behavior as needed.
General behavior of the specific Maker classes:
- The classes all define a primary method: syntax().
- The syntax() method consists of calls to various other methods responsible
for generating sections of the syntax.
- Methods that generate sub-sections of syntax have names beginning with 'syn_'.
- All of the syntax-generating methods return a list of strings.
Notes on STS files:
1. Hierchical data.
Stat/Transfer does not directly support hierarchical data structures. The
workaround is to perform multiple invocations of Stat/Transfer, once per record
type. Each invocation must instruct Stat/Transfer to perform case selection to
filter the records such that a single record type is in scope, and must request
the variables appropriate for that record type.
2. Variable and value labels with quotes.
Stat/Transfer does not support escaping quotes within value labels. Therefore,
double quotes are represented by a pair of single quotes.
3. Only alphanumeric values are permitted for value labels.
Nonconforming values are skipped, with a comment added to the STS file that
documents this action.
FAQs
Unknown package
We found that stats_package_syntax_file_generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.