rawls_api's People
Forkers
jbuisinerawls_api's Issues
Build of path is not safe
In this code example: https://github.com/prise-3d/rawls_api/blob/devel/api.py#L41, the path construction is not safe.
Package os
gives the possibility to build path in a safe way.
Example:
import os
global_path = 'projects'
csv_path = os.path.join(global_path, 'data', 'csv_data')
This issue can be linked with issue #2.
Variable naming may be ambigous
In code function : https://github.com/prise-3d/rawls_api/blob/devel/api.py#L16-L31, CSV_file
variable has Class naming convention and can bring ambiguity.
It's better to always use same naming convention for variable and Classes:
class CSVFile():
pass
class MyClass():
pass
instance = MyClass()
csv_file_instance = CSVFile()
Constant variable may be used
From this code : https://github.com/prise-3d/rawls_api/blob/devel/api.py#L37
Folder path can be referenced in a constant variable in the top of the file.
String formatting using python `f` strings
From this code https://github.com/prise-3d/rawls_api/blob/devel/api.py#L22-L24, it is important to note it is not the best practise.
You can now use string formatting such as: https://realpython.com/python-f-strings/
Example:
a = 12.12
print(f'Float value is {a}')
Parameters should be documented
Functions' parameters does not have enough explanations, as in example : https://github.com/prise-3d/rawls_api/blob/devel/api.py#L152
If you later want to auto-generate API documentation, no description will be produced for parameters.
Add docker image for API
Need to encapsulate API using specific Docker image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.