Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: push json to private project #118

Merged
merged 83 commits into from
Feb 20, 2024
Merged

chore: push json to private project #118

merged 83 commits into from
Feb 20, 2024

Conversation

VebjornG
Copy link
Contributor

@VebjornG VebjornG commented Feb 6, 2024

Description

This is a script that creates a json file with keys and values from the docstrings of the functions in InDSL and compares them to the source of truth in Locize. If any changes have been made they will be pushed to Locize, replacing the old ones. The script is used in the workflow push-locize.yaml which is run when translations are needed for widespread use of InDSL. We use e.g. ..._1_0 as versions for the versioned functions rather than "..._1.0" because Locize will treat any key name with a dot as an array an split the key name at the dot: locize/locize-cli#23. An example of from the raw output from Locize with _1.0 as the versioning number is:

"INDSL_DETECT_OUTLIERS_1": { "0_": "Outlier detection" },

Ticket

Copy link

github-actions bot commented Feb 6, 2024

Unit Test Results

    21 files  ±0      21 suites  ±0   48m 19s ⏱️ - 2m 47s
 1 092 tests ±0   1 092 ✅ ±0   0 💤 ±0  0 ❌ ±0 
15 432 runs  ±0  15 421 ✅ +1  11 💤  - 1  0 ❌ ±0 

Results for commit abd52cd. ± Comparison against base commit e856adc.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Merging #118 (abd52cd) into main (e856adc) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   91.32%   91.32%           
=======================================
  Files         105      105           
  Lines        3803     3803           
  Branches      821      821           
=======================================
  Hits         3473     3473           
  Misses        206      206           
  Partials      124      124           
Files Coverage Δ
indsl/create_translation_key.py 95.83% <100.00%> (ø)

@VebjornG VebjornG changed the title Vebjorn/test project chore: push json to private project Feb 6, 2024
@tuanng-cognite
Copy link
Contributor

With that limitation, I think we should change the key generation to exclude . character

@VebjornG VebjornG marked this pull request as ready for review February 15, 2024 09:42
@VebjornG
Copy link
Contributor Author

With that limitation, I think we should change the key generation to exclude . character

That is done already: version_str = f"_{_format_str(version.replace('.', '_'))}" if version else ""

@@ -18,6 +20,10 @@
TOOLBOX_NAME = "TOOLBOX_NAME"
COGNITE = "__cognite__"

LOCIZE_API_KEY = os.getenv("LOCIZE_API_KEY")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this working with github action secrets?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the action actually mounts the secret as environment variables. So it should work and is tested

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproject.toml Outdated
@@ -29,6 +29,7 @@ csaps = { version = "^1.1.0", optional = true }
statsmodels = { version = "^0.14.0", optional = true }
scikit-image = { version = "^0.21.0", optional = true }
scikit-learn = { version = "^1.3.0", optional = true }
requests = "^2.31.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont' need this I suppose.

tuanng-cognite
tuanng-cognite previously approved these changes Feb 20, 2024
Copy link
Contributor

@tuanng-cognite tuanng-cognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment. Otherwise, look good to me

@VebjornG VebjornG merged commit 4eec173 into main Feb 20, 2024
31 checks passed
@VebjornG VebjornG deleted the vebjorn/test-project branch February 20, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants