I am new to DocFx and I am trying to configure DocFx to filter out DataSet information from a project and no matter how I enter it - it just doesn't work.
The filterConfig.yml file has the following entries:
apiRules:
- exclude:
uidRegex: '^PhoenixControls\.Data\.AirStationDataSet'
- exclude
uidRegex: '^PhoenixControls\.Data\.ProductionOrderData'
- exclude:
uidRegex: '^PhoenixControls\.Data\.ReferenceDataSet'
Running docfx docfx.json --serve
Serves up the following error:
Error Message
If I remove two of the -excludes - It will not error out - but it doesn't remove the objects I am trying to filter out.
What is the magic I need to perform to get object to filter out of DocFx?
There is a missing trailing ':' in line 5.
apiRules:
- exclude:
uidRegex: '^PhoenixControls\.Data\.AirStationDataSet'
- exclude:
uidRegex: '^PhoenixControls\.Data\.ProductionOrderData'
- exclude:
uidRegex: '^PhoenixControls\.Data\.ReferenceDataSet'
Give VS Code with the YAML exension a try to edit YAML. It will highlight such mistakes:
Related
Here is my current config structure
hydra/
pipeline/
common/
feature.yaml
stage/
train.yaml
with the following files:
train.yaml
# #package _global_
defaults:
- _self_
- ../pipeline/common#train: feature
- ../pipeline/common#val: feature
train:
conf:
split: train
val:
conf:
split: val
pipeline:
- ${oc.dict.values: train.steps}
- ${oc.dict.values: val.steps}
feature.yaml
conf:
split: train
steps:
tabular:
name: "${conf.split}-tabular
class: FeatureGeneration
dataset:
datasources: [ "${conf.split}_split" ]
What I've accomplished:
I've been able to figure out how to use the config group multiple times utilizing the defaults in train.yaml.
What I'm stuck on:
I'm getting an error: InterpolationKeyError 'conf.split' not found
I do realize that imports are absolute. If I put #package common.feature at the beginning of feature.yaml I can import conf.split via common.feature.conf.split, but is there not a cleaner way? I tried relative imports but got the same error.
I can't seem to override conf.split from train.yaml. You can see where I set train.conf.split and val.conf.split but these do not get propagated. What I need to be able to do is have each instance of the config group utilize a different conf.split value. This is the biggest issue I'm facing.
What I've referenced so far:
The following resources have gotten me to where I am so far, but am still having trouble with what's listed above.
Hydra : how to assign config files from same group to two different fields
https://hydra.cc/docs/advanced/overriding_packages/
https://hydra.cc/docs/patterns/extending_configs/
Interpolation is not import and it's evaluated at when you access the config node. At that point your config is already composed so it should be straight forward to use either absolute interpolation (the default) or relative based on the structure of your final config.
Hard to be 100% sure, but I suspect this problem is because your defaults list has _self_ at the beginning. This means that the content of the config with containing the defaults list is overridden by what comes after in the defaults list.
Try to move _self_ to the end:
# #package _global_
defaults:
- ../pipeline/common#train: feature
- ../pipeline/common#val: feature
- _self_
#...
I've looked into the variables definition pages; unable to find a working example of using a dictionary in a template file.
The following error is shown when pressing run pipeline:
Encountered error(s) while parsing pipeline YAML:
/var.yaml (Line: 3, Col: 5): A mapping was not expected
This is what I'm looking to do.
# var.yaml file
variables:
appServicePlanObj:
planName: "name-goes-here"
skuName: S1
skuTier: Standard
skuSize: S1
skuFamily: S
skuCapacity: 1
# pipeline.yaml file
stages:
- stage: stage_Id
displayName: Stage Name
variables:
- template: "var.yaml"
jobs:
- deployment: deploymentId
Ideally, I want to create more complex objects with nested arrays and objects.
When I run lessc --source-map=styles.map assets/less/00_style.less dest/assets/prod.css in the command line, everything is working. The styles.map file ends in:
...AV2rEF;EAAiB,aAAA","file":"dest/assets/prod.css"}
However, when I run grunt less, the styles.map is missing the "file" part and just ends in:
...AV2rEF;EAAiB,aAAA"}
This stops the SourceMap from working. What could be going wrong? My less config is as follows:
less: {
dist: {
options: {
sourceMap: true,
sourceMapFilename: 'styles.map'
},
files: [{
src : 'assets/less/00_style.less',
dest: 'dest/assets/prod.css'
}]
}
}
Short answer:
Add the following additional option to your less Task in Gruntfile.js:
...
options: {
...
sourceMapURL: '../../styles.map'
},
...
Long answer:
When running the lessc command via the CLI, (as per your example), notice the the following comment is written to the resultant prod.css:
/*# sourceMappingURL=../../styles.map */
However, when running the grunt task, (using your current config), the following comment is written into the resultant prod.css:
/*# sourceMappingURL=styles.map */
Note the missing ../../ - therefore prod.css can't find styles.map
This is why your SourceMap isn't working and not so much to do with the "file:" missing in styles.map when run via grunt. The .css file ultimately points to the .map file - not vice versa.
Even after running the lessc command via the CLI then deleting the "file:" part from styles.map you will find that the SourceMap still works in the browser. Indicating that the "file:" part, whether included in the .map file or not, has no effect on preventing the SourceMap from working.
Besides, as noted in the most recent proposed SourceMap spec (v.3) the "file:" part is optional:
Line 3: An optional name of the generated code that this source map is associated with.
Explicitly defining the sourceMapURL in your grunt Task options will entail having to keep a flat folder structure inside the dest/assets/ directory if you intend on using multiple .less files. (I.e. You'll need to avoid saving any resultant .css files in subfolders)
I would like to use the following code in a LESS file -
.chevron_btn.[aria-expanded="true"]{
but it produces an error when compiled - is it possible to implement?
Remove the extra .:
.chevron_btn[aria-expanded="true"]{
I am new to the Grunt Task Runer. I'm trying to do some file matching in one of my configurations. With this file matching, I need ignore all of my test files, except for one. The one test file that I need to keep is named 'basic.test.js' In an attempt to do this, I currently have the following configuration:
files: [
'src/**/*.js',
'!src/**/*.test.js',
'src/root/basic.test.js'
]
At this time, I am still getting ALL of my tests. This means that my tests in the other test files are still being seen. I'm trying to confirm if I'm doing my globbing pattern correctly. Does my globbing pattern look correct for my scenario?
Thank you!
If you only want one test then there is no need to match and then unmatch all the others. Just include the one test:
files: [
'src/root/basic.test.js'
]