Skip to content

Commit

Permalink
Added references (Abbreviations and Acronymns) pages. (#20)
Browse files Browse the repository at this point in the history
* Reference endpoint added to server

* Attempting to fix travis build

* Additional tweak to travis

* Added references (Acronyms and Abbreviations) to obtv web and test case to python code

* Stopped eslint from running
  • Loading branch information
joelebwf authored and shelcrow committed Dec 5, 2019
1 parent 80e7e8c commit fc8d3b4
Show file tree
Hide file tree
Showing 15 changed files with 965 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ matrix:
install:
- pip install -r requirements.txt
script:
- cd viewer
- export PYTHONPATH=`pwd`/viewer
- pytest
after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
oblib
flask
flask_cors
pytest
13 changes: 13 additions & 0 deletions viewer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__all__ = ['reference', 'viewer']
334 changes: 334 additions & 0 deletions viewer/reference.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
This is a temporary file to hold reference data until it can be incorporated into a more
permanent location (either pyoblib or solar-taxonomy).
"""

ACRONYMS = {
"AuthorityHavingJurisdiction": "AHJ",
"CaliforniaEnergyCommission": "CEC",
"EngineeringProcurementAndConstruction": "EPC",
"FederalEnergyRegulatoryCommission": "FERC",
"GeographicInformationSystems": "GIS",
"GroundCoverageRatio": "GCR",
"GroundFaultDetectorInterrupter": "GFDI",
"LimitedLiabilityCompany": "LLC",
"LimitedPartnership": "LP",
"BatteryManagementSystem": "BMS",
"EmailAddress": "Email",
"ModelNumber": "Model",
"NominalOperatingCellTemperature": "NOCT",
"UL1741SupplementA": "UL1741SA",
"SCADASystem": "SCADA",
"PowerPurchaseAgreement": "PPA",
"PreQualification": "PreQual",
"PerformanceBasedIncentive": "PBI",
"MonthlyOperatingReport": "OpRpt",
"OperatingTemperatureRange": "OTR",
"PermissionToOperate": "PTO",
"PlacedinService": "PIS",
"PreventativeMaintenance": "PM",
"PublicUtilitiesCommission": "PUC",
"RenewableEnergy": "RE",
"RenewableEnergyCertificates": "REC",
"RenewableEnergyCredit": "REC",
"TypicalMetMonth": "TMM",
"TypicalMetYear": "TMY",
"TypicalGHIYear": "TGY",
"TypicalGHIMonth": "TGM",
"TypicalDNIYear": "TDY",
"TypicalDNIMonth": "TDM",
"InsulatedGateBipolarTransistor": "IGBT",
"GlobalHorizontalIrradiance": "GHI",
"RelattiveHumidity": "RH",
"ReferenceCell": "RefCell",
"PowerFactor": "PF",
"StandardTestCondition": "STC",
"PowerFactor": "PF",
"IncidenceAngleModifier": "IAM",
"IndependentSystemOperator": "ISO",
"InternationalElectrotechnicalCommission": "IEC",
"LongTerm": "LngTrm",
"MaximumPowerPoint": "MPPT",
"MaximumPowerPointTracker": "MPPT",
"MaximumPowerPointTracking": "MPPT"
}

ABBREVIATIONS = {
"Accelerated": "Accel",
"Accumulated": "Accum",
"Address": "Addr",
"Address": "Addr",
"Administration": "Admin",
"Administrative": "Admin",
"Amortization": "Amort",
"Amount": "Amt",
"Approval": "Approv",
"Assignment": "Assign",
"Authority": "Auth",
"Automatic": "Auto",
"Availability": "Avail",
"Average": "Avg",
"Coefficient": "Coeff",
"Condition": "Cond",
"Configuration": "Config",
"Construction": "Constr",
"Contribution": "Contrib",
"Control": "Ctrl",
"Credits": "Cred",
"Curtailment": "Curtail",
"Degradation": "Degrad",
"Depreciation": "Deprec",
"Description": "Desc",
"Engineering": "Eng",
"Equipment": "Equip",
"Equivalent": "Equiv",
"Excluding": "Exclud",
"Expiration": "Exp",
"Facilities": "Facil",
"Features": "Feat",
"Frequency": "Freq",
"Hardware": "HW",
"Historical": "Hist",
"Identification": "ID",
"Identifier": "ID",
"Incentives": "Incent",
"Inception": "Incept",
"Including": "Incl",
"Information": "Info",
"Installation": "Install",
"Location": "Loc",
"Maintenance": "Maint",
"Management": "Mgmt",
"Manager": "Mgr",
"Manufacturer": "Mfr",
"Maximum": "Max",
"Account": "Acct",
"Acknowledgement": "Ack",
"Acquisition": "Acquis",
"Adjusted": "Adj",
"Agreement": "Agree",
"Agreements": "Agree",
"Ambient": "Amb",
"Analysis": "Anal",
"Application": "App",
"Application": "App",
"Archeological": "Archeol",
"Assessment": "Assess",
"Assessments": "Assess",
"Assumption": "Assump",
"Attribute": "Attr",
"Authorization": "Auth",
"Farenheit": "DegF",
"Celsius": "DegC",
"Certificate": "Cert",
"Certificates": "Cert",
"Certification": "Cert",
"Certifications": "Cert",
"Connection": "Connec",
"Continuing": "Cont",
"Continuous": "Cont",
"Continuous": "Cont",
"Contractor": "Contrct",
"Contribution": "Contrib",
"Control": "Ctrl",
"Counterparties": "Cntrparty",
"Counterparty": "Cntrparty",
"Decommissioning": "Decommiss",
"Document": "Doc",
"Documentation": "Doc",
"Documents": "Doc",
"Earnings": "Earn",
"Effective": "Effect",
"Commissioning": "Commiss",
"Communication": "Comm",
"Communications": "Comm",
"Company": "Co",
"Completion": "Compl",
"Component": "Cmpnt",
"Commercial": "Commerc",
"Estimate": "Est",
"Estimated": "Est",
"Estimates": "Est",
"European": "EU",
"Exception": "Except",
"Exceptions": "Except",
"Firmware": "FW",
"Formation": "Form",
"Electric": "Elec",
"Electrical": "Elec",
"Electronics": "Electr",
"Environmental": "Env",
"Expected": "Expect",
"Expire": "Exp",
"External": "Ext",
"Financial": "Fin",
"Financing": "Fin",
"Insurance": "Insur",
"Merchant": "Merch",
"Method": "Meth",
"Minimum": "Min",
"Monitoring": "Monitor",
"Mortgage": "Mortg",
"Municipal": "Muni",
"Nominal": "Nom",
"Noncurrent": "Noncurr",
"Nonoperating": "Nonop",
"Number": "Num",
"Parameters": "Param",
"Participant": "Partic",
"Password": "Pwd",
"January": "Jan",
"February": "Feb",
"March": "Mar",
"April": "Apr",
"May": "May",
"June": "Jun",
"July": "Jul",
"August": "Aug",
"September": "Sep",
"October": "Oct",
"November": "Nov",
"December": "Dec",
"Telecommunications": "Telecom",
"Temperature": "Temp",
"Temporary": "Tempor",
"Resolution": "Resol",
"Resource": "Resrc",
"Reliability": "Reliab",
"Remediation": "Remed",
"Rating": "Rtg",
"Precautionary": "Precaut",
"Prefunded": "Prefund",
"Performance": "Perf",
"Permission": "Permiss",
"Organization": "Org",
"Measures": "Meas",
"Mechanical": "Mech",
"Mechanism": "Mech",
"Member": "Mbr",
"Membership": "Mbrp",
"Month": "Mon",
"Monthly": "Mon",
"Months": "Mon",
"Obligation": "Oblig",
"Obligations": "Oblig",
"Operate": "Op",
"Operating": "Op",
"Operates": "Op",
"Operated": "Op",
"Operating": "Op",
"Operational": "Op",
"Operations": "Op",
"Operator": "Op",
"Opinion": "Opin",
"Optimal": "Opt",
"Optimization": "Opt",
"Optimized": "Opt",
"Option": "Opt",
"Options": "Opt",
"Original": "Orig",
"Origination": "Orig",
"Outstanding": "Outstng",
"Owned": "Own",
"Owner": "Own",
"Ownership": "Own",
"Payment": "Pmt",
"Payments": "Pmt",
"Percent": "Pct",
"Percentage": "Pct",
"Power": "Pwr",
"Preventative": "Prevent",
"Pricing": "Price",
"Procurement": "Procur",
"Product": "Prod",
"Production": "Prod",
"Project": "Proj",
"Projects": "Proj",
"Properties": "Props",
"Purchase": "Purch",
"Qualification": "Qualif",
"Qualifications": "Qualif",
"Qualifying": "Qualif",
"Quality": "Qual",
"Quantity": "Quant",
"Quarter": "Qtr",
"Quarterly": "Qtr",
"Receivable": "Recv",
"Receivables": "Recv",
"Receive": "Recv",
"Received": "Recv",
"Receiver": "Recv",
"Registration": "Regn",
"Regulatory": "Regl",
"Report": "Rpt",
"Reportable": "Rpt",
"Reported": "Rpt",
"Reporting": "Rpt",
"Request": "Req",
"Required": "Reqd",
"Requirements": "Reqrmnts",
"Resulting": "Rslt",
"Results": "Rslt",
"Return": "Rtn",
"Schedule": "Sched",
"Scheduling": "Sched",
"Service": "Serv",
"Services": "Serv",
"Software": "SW",
"Structural": "Struct",
"Structure": "Struct",
"Structures": "Struct",
"Subcontractor": "Subcon",
"Submission": "Submsn",
"Supplement": "Supl",
"Supplemental": "Supl",
"Supplementary": "Supl",
"Termination": "Term",
"Test": "Tst",
"Testing": "Tst",
"Tests": "Tst",
"Transaction": "Txn",
"Transmission": "Txm",
"Transportation": "Trans",
"Unavailability": "Unavail",
"Unavailable": "Unavail",
"Underwriting": "Undrwrtng",
"Warranties": "Warr",
"Warranty": "Warr",
"Emergency": "Emerg",
"Capacity": "Cap",
"Activities": "Activ",
"Accounts": "Acct",
"Attributable": "Attr",
"Funding": "Fund",
"Grounding": "Gnd",
"Independent": "Indep",
"Inspection": "Inspct",
"Instructions": "Instr",
"Interconnect": "Interconn",
"Interconnection": "Interconn",
"Internal": "Intrnl",
"Investing": "Invest",
"Investment": "Invest",
"Irradiance": "Irrad",
"Length": "Len",
"Liabilities": "Liab",
"Liability": "Liab",
"Market": "Mkt",
"Measure": "Meas",
"Measured": "Meas",
"Measurement": "Meas",
"Measurements": "Meas"
}
7 changes: 7 additions & 0 deletions viewer/tests/test_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ def test_units(self):
self.assertTrue("type" in data[0])
self.assertTrue("standard" in data[0])
self.assertTrue("definition" in data[0])

def test_references(self):
data = json.loads(viewer.references())
self.assertEqual(305, len(data))
self.assertTrue("type" in data[0])
self.assertTrue("code" in data[0])
self.assertTrue("definition" in data[0])
Loading

0 comments on commit fc8d3b4

Please sign in to comment.