-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
For e-mission-common to function as both a JS and Python package (compatible with npm and pip respectively), there need to be a few changes. First, the directory that contains __init__.js needs to be the name of the Python package. We will call it `emcommon` and rename the directory accordingly. Second, it's simpler and easier to just have the npm package at the same level as the Python package. So instead of tucking it away under the /js directory, we can keep package.json at the root level. The compiled JS files can go under a directory called `emcommon_translated_js`. Moved all these files, updated imports, updated compile_to_js.sh, updated README.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
transcrypt --nomin --ecom ./src/__init__.py -od ../js/__translated_src__ | ||
transcrypt --nomin --ecom ./emcommon/__init__.py -od ../emcommon_translated_js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import logger as Logger | ||
import metrics.metrics_summaries as MetricsSummaries | ||
import src.metrics.surveys.surveys_summary as SurveysSummary | ||
import metrics.surveys.surveys_summary as SurveysSummary | ||
import metrics.carbon.carbon_calculations as CarbonCalculations | ||
import metrics.active_travel.active_travel_calculations as ActiveTravelCalculations |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"options": {"source": "./emcommon/__init__.py", "anno": false, "alimod": false, "build": false, "complex": false, "docat": false, "dassert": false, "dcheck": false, "dextex": false, "dlog": false, "dmap": false, "dnostrip": false, "dstat": false, "dtree": false, "esv": null, "ecom": true, "fcall": false, "gen": false, "iconv": false, "jscall": false, "jskeys": false, "jsmod": false, "kwargs": false, "keycheck": false, "license": false, "map": false, "nomin": true, "opov": false, "outdir": "../emcommon_translated_js", "parent": null, "run": false, "symbols": null, "sform": false, "tconv": false, "unit": null, "verbose": false, "x": null, "xreex": false, "xglobs": false, "xpath": null, "xtiny": false, "star": false}, "modules": [{"source": "/Users/jgreenle/miniconda3/lib/python3.11/site-packages/transcrypt/modules/org/transcrypt/__runtime__.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/org.transcrypt.__runtime__.js"}, {"source": "./emcommon/__init__.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/__init__.js"}, {"source": "./emcommon/metrics/active_travel/active_travel_calculations.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/metrics.active_travel.active_travel_calculations.js"}, {"source": "./emcommon/metrics/active_travel/standard_met_mode_map.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/metrics.active_travel.standard_met_mode_map.js"}, {"source": "./emcommon/logger.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/logger.js"}, {"source": "./emcommon/metrics/carbon/carbon_calculations.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/metrics.carbon.carbon_calculations.js"}, {"source": "./emcommon/metrics/surveys/surveys_summary.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/metrics.surveys.surveys_summary.js"}, {"source": "./emcommon/survey/conditional_surveys.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/survey.conditional_surveys.js"}, {"source": "./emcommon/metrics/metrics_summaries.py", "target": "/Users/jgreenle/openpath/e-mission-common/emcommon/../emcommon_translated_js/metrics.metrics_summaries.js"}]} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.