flask-rest-boilerplate's Issues
Add MIT License
Add `run_server` option to `app.sh`
- Add an option to run the server to the
app.sh
script.-r or --run
- Include sub-option for the environment
dev/prod
, should default todev
- Before running the server, it should build/update conda environment then activate it
Generate test reports on running tests
We need to provide reports on the result of running tests, particularly on deployment, so that each "build" can show what tests were run and their status.
This can be achieved by creating a custom Python Unittest Test Runner.
- Copy 'object_test_runner.py' from the ROEC API into
app/test
- Get License from the original repo and add it to the header under the attribution. Also specify that alterations from the original have been made.
- Use ObjectTestRunner to run tests from the
manage.py:test
command instead of the base TextTestRunner. - Create
report.py
inapp/test
with a Report class that is initialized the resulting object from ObjectTestRunner. - Add
generate_json_report
inreport.py
as part of the Report class that converts the object from ObjectTestRunner as necessary and saves to a JSON file in thereports
directory. - Add
generate_markdown_report
inreport.py
as part of the Report class that converts the object from ObjectTestRunner as necessary and saves to a markdown file in thereports
directory.
For the last two, see generate_json_report
in helpers.run.tests.py
from the ROEC API.
Verify packages
- Verify that all included packages are included in the list of approved packages and versions.
- Update any dependencies accordingly.
- Update
environment.yml
to only allow packages from the approved package repositories.
Create a Jenkinsfile to run through a CI pipeline with Jenkins
Add attribution file
- Itemize different licenses used by the project dependencies.
- List dependencies under each license.
See the https://github.com/DSD-ESDC-EDSC/dynamic-org-chart/blob/master/ATTRIBUTION.md as an example. (Note as of publishing this issue, there are changes coming to that file)
Set up simple CI pipeline
Simple CI pipeline using GitHub Actions to run code linter/tests.
Auto generate version file
The version file is used to help track the latest release of the application and the git commit that was used to created it. It could be used in a couple of different contexts:
- Identifies the version info for a release package in case we need to provide the code for an individual release.
- Add application version information to log file.
- Add a script that will auto-generate a
version.json
file. - Use
git describe
to get the current release tag. - Use
git rev-parse HEAD
to get the latest commit tag for the current branch. - Output the results to a
version.json
file which should look like:
{
"version": "1.1.3",
"git_commit": "90jdf09u029jdjsf093j209jdksljfs"
}
Example bash script can be found in the ROEC API repo. However, it may be beneficial to flask_script Command and make it available via manage.py
.
Add waitress wsgi server for production environments
- Install waitress
- Update run command in
manage.py
to run viaserve(app)
instead ofapp.run()
(serve is imported from waitress) - Add
run_dev
command tomanage.py
and change the main to callrun_dev
- Verify app is run on host and port specified in the config
Add logger
- ECS logger needs to first become a GitHub repository. Once created, we will install it from GitHub as a package via pip so that it can be used in this project.
- Initialize a logger instance each controller.
- Provide examples of creating a log entry (some info and some error). Should have one for each endpoint.
Run tests in separate console
Tests may be dependent on the server running.
Because of this, we should:
- run the server in another window.
- make sure a server is run.
Create Dockerfile to build a Docker image of the flask-api-boilerplate
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.