mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Fix meta defaults and error in package command
This commit is contained in:
		
							parent
							
								
									94705c21c8
								
							
						
					
					
						commit
						b89f6fa011
					
				|  | @ -77,7 +77,9 @@ def package( | ||||||
|         meta = generate_meta(meta, msg) |         meta = generate_meta(meta, msg) | ||||||
|     errors = validate(ModelMetaSchema, meta) |     errors = validate(ModelMetaSchema, meta) | ||||||
|     if errors: |     if errors: | ||||||
|         msg.fail("Invalid model meta.json", "\n".join(errors), exits=1) |         msg.fail("Invalid model meta.json") | ||||||
|  |         print("\n".join(errors)) | ||||||
|  |         sys.exit(1) | ||||||
|     model_name = meta["lang"] + "_" + meta["name"] |     model_name = meta["lang"] + "_" + meta["name"] | ||||||
|     model_name_v = model_name + "-" + meta["version"] |     model_name_v = model_name + "-" + meta["version"] | ||||||
|     main_path = output_dir / model_name_v |     main_path = output_dir / model_name_v | ||||||
|  | @ -118,10 +120,10 @@ def get_meta( | ||||||
|         "lang": "en", |         "lang": "en", | ||||||
|         "name": "model", |         "name": "model", | ||||||
|         "version": "0.0.0", |         "version": "0.0.0", | ||||||
|         "description": None, |         "description": "", | ||||||
|         "author": None, |         "author": "", | ||||||
|         "email": None, |         "email": "", | ||||||
|         "url": None, |         "url": "", | ||||||
|         "license": "MIT", |         "license": "MIT", | ||||||
|     } |     } | ||||||
|     meta.update(existing_meta) |     meta.update(existing_meta) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user