Code Monkey home page Code Monkey logo

projecttime's Introduction

Project Time!

A tool that can be used to keep track of time spent on projects.

Build Status

Setup Notes

Recommended

  1. Install MiniConda.

  2. Open a terminal, ensuring the conda base environment is activated. If it is not activated:

    conda activate base

  3. Install Anaconda Project within the base environment:

    conda install anaconda-project

  4. Start the database:

    anaconda-project run postgres start

  5. Start the tool:

    anaconda-project run manage.py runserver

  6. Run tests:

    anaconda-project run manage.py test --parallel --failsafe

Alternative Setup (Advanced)

The tool can be set up to run manually without a conda environment.

  1. Open anaconda-project.yml and install the dependencies listed in env_specs in any choice of environment.
  2. Directly run command scripts described in the anaconda-project.yml commands in the environment of choice.

Development

Run anaconda-project run prepare --env-spec development to build a Conda environment with extra development tools such as a linter, code formatter, and interactive execution environment. To take advantage of these, configure your editor or IDE to use the development environment in the envs folder.

Development workflow is the typical workflow Django project. Django's django-admin and the project manage.py script are aliased as anaconda-project commands.

For example, to start the server:

anaconda-project run manage.py runserver

Or to make migrations on models:

anaconda-project run manage.py makemigrations

And to create a new Django app:

anaconda-project run django-admin startapp APP_NAME

In addition, the postgres script is aliased as an anaconda-project command.

For example, to start the database server:

anaconda-project run postgres

The anaconda-project run postgres command takes care of ensuring a database always exists, while the anaconda-project run manage.py commands take care of ensuring that the latest database migrations are always applied before the server is started. In addition, all Python scripts are run with deprecation warnings enabled.

The anaconda-project run ipython-kernel-create command prepares an IPython kernel that can be loaded into a Jupyter Notebook, allowing for execution of code in the development environment in an interactive notebook. Run anaconda-project run jupyter notebook development.ipynb to load a notebook that is templated with code to load the Django project.

Testing

Tests can be run with anaconda-project run manage.py test, consistent with how other management commands are run. A recommendation would be to append the --parallel --failfast switches to speed up running tests and verifying test behavior.

To measure code coverage when running tests, use anaconda-project run coverage. When running the coverage command this way with no command line arguments, it defaults to coverage run on the command manage.py test, with some extra switches to include/omit files relevant to coverage, measure branch coverage, and passing extra flag(s) to manage.py test to bail early if an error occurs). To generate a code coverage report afterwards, run anaconda-project run coverage report. An HTML report can be generated using anaconda-project run coverage html

projecttime's People

Contributors

gscoppino avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.