diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 13ee3e1..9fedafe 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.1 +current_version = 0.9.0 tag = False [bumpversion:file:soam/__init__.py] diff --git a/CHANGELOG.md b/CHANGELOG.md index d3fb0f3..63d5369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.0 - 2021-08-09] + +### Removed +- Cookiecutter logic. + ## [0.8.1 - 2021-08-06] ### Added diff --git a/README.md b/README.md index 4ce7726..e2acc70 100644 --- a/README.md +++ b/README.md @@ -109,13 +109,7 @@ _Note_: The `pdf_report` extra might need to run the following command before in [Here](quickstart.ipynb) is an example for a quick start into SoaM. In it a time series with AAPL stock prices is loaded, processed and forecasted. As well, there's [other example](soamflowrun.ipynb) with the same steps, but exploding the power of flows. ## Usage -For further info check our **[end to end](end2end.md)** example where we explained how SoaM will interact with Airflow and Cookiecutter on a generic project. - -## SoaM CLI -After installing SoaM locally, there are some commands available: - -* `soam init --output`, scaffolding for a project ready to use SoaM. `cookiecutter` will then ask for parameters via prompt. -[//comment]: # (TODO: Add further info about directories and their functionalities created by cookiecutter. Maybe in end2end.md?) +For further info check our [end to end](end2end.md) example where we explained how SoaM will interact with Airflow on a generic project. ## Database management For database storing there are complementary tools: diff --git a/documentation/source/project_structure.md b/documentation/source/project_structure.md index daba099..ea5730a 100644 --- a/documentation/source/project_structure.md +++ b/documentation/source/project_structure.md @@ -50,9 +50,6 @@ This directory contains the migrations for the database that stores the data and ### [alembic.ini](../../soam/alembic.ini) Configures the alembic library to manage the migrations for the DBSaver. -### templates -Contains the directory structure that cookiecutter is going to generate. - ### resources Files that will be used in the pipeline, like a template for an email report in a postprocess step. diff --git a/documentation/source/references.md b/documentation/source/references.md index 0083acc..34e570f 100644 --- a/documentation/source/references.md +++ b/documentation/source/references.md @@ -4,9 +4,7 @@ This is the priority order to understand the dependencies: 1. prefect 2. alembic 3. sqlalchemy - 4. jinja? - 5. cookiecuter - 6. darts + 4. jinja @@ -85,12 +83,6 @@ Used in: console.py [click docs](https://click.palletsprojects.com/en/7.x/) -## cookiecutter -Used in: console.py - -[cookiecutter docs](https://cookiecutter.readthedocs.io/en/latest/) - - ## datetime Used in: constants.py, helpers.py, plot_utils.py, runner.py diff --git a/documentation/source/soam.rst b/documentation/source/soam.rst index c492036..d81f525 100644 --- a/documentation/source/soam.rst +++ b/documentation/source/soam.rst @@ -26,14 +26,6 @@ soam.cfg module :undoc-members: :show-inheritance: -soam.console module -------------------- - -.. automodule:: soam.console - :members: - :undoc-members: - :show-inheritance: - soam.constants module --------------------- diff --git a/end2end.md b/end2end.md index 8aef7cd..837e79e 100644 --- a/end2end.md +++ b/end2end.md @@ -1,14 +1,12 @@ # End to End data product with SoaM: -The purpose of this document is to show how a generic end to end data product would look line using SoaM, [Cookiecutter](https://cookiecutter.readthedocs.io/en/) and [Airflow](http://airflow.apache.org/). +The purpose of this document is to show how a generic end to end data product would look line using SoaM and [Airflow](http://airflow.apache.org/). Let's imagine you need to run a process everyday that consists on loading the daily ABT, querying your database, transforming some datapoints, forecasting on a desired timeframe, plotting the results and sharing it by slack with your workteam. After that, promote results to the production environment. The diagram bellow show this process: ```mermaid flowchart LR; - soma_main_repo[/SoaM Main Repo/]--->|defines|cookiecutter[/Cookiecutter/]; raw_data[(Raw Data)]-->load_daily_abt - cookiecutter--generates-->soam_instance; subgraph DAG soam_instance-->promote_to_prod[Promote Results to Production]; load_daily_abt[Prepare new data in analytics DB]-->soam_instance[SoaM Instance]; @@ -27,21 +25,6 @@ In this case, SoaM and Airflow will be interacting elbow to elbow to get this ru See the following sections where we double click on this so that it's clearer for you. - -## Cookiecutter strucutre - -[Cookiecutter](https://medium.com/worldsensing-techblog/project-templates-and-cookiecutter-6d8f99a06374) is a CLI tool (Command Line Interface) to create an application boilerplate from a template. It uses a templating system β€” [Jinja](https://jinja.palletsprojects.com/) β€” to replace or customize folder and file names, as well as file content. - -We use Cookiecutter to save time constructing a new repository, to avoid forgetting mandatory files like Readme or Changelog; and to lower the entry level to new collaborators β€” new team members, freelancers, partners. - -After installing SoaM locally, you can run the following command: - -```bash -$ soam init --output -``` - -To generate a project structure ready to use SoaM based on Cookiecutter. After executing that command, cookiecutter will ask you for parameters via prompt. - ## Airflow We use **Apache Airflow** to create the DAG that schedules the following pipeline: diff --git a/setup.py b/setup.py index 943fc95..ef094c6 100644 --- a/setup.py +++ b/setup.py @@ -94,7 +94,6 @@ "prefect==0.14.17", "filelock", "click", - "cookiecutter", "wheel", "muttlib>=1.1.2,<2", "numpy>=1.19,<1.20", diff --git a/soam/__init__.py b/soam/__init__.py index 3ef43f9..8a5b632 100644 --- a/soam/__init__.py +++ b/soam/__init__.py @@ -1,3 +1,3 @@ """Version.""" -__version__ = '0.8.1' +__version__ = '0.9.0' diff --git a/soam/console.py b/soam/console.py deleted file mode 100644 index dc49582..0000000 --- a/soam/console.py +++ /dev/null @@ -1,55 +0,0 @@ -# console.py -""" -Console ----------- -Console commands and utilities. It uses click library to run the app in a -command line interface. -It has a hook inside setup.py: -"entry_points={'console_scripts': ['soam = soam.console:cli']}" -""" -# from sys import argv -from typing import NoReturn - -import click -from cookiecutter.main import cookiecutter -from pkg_resources import resource_filename - -from soam.cfg import INIT_TEMPLATE_DIR - - -@click.group() -def cli() -> NoReturn: - """ - TODO: review why we are using this. - https://click.palletsprojects.com/en/7.x/commands/#callback-invocation - """ - - -@cli.command() -@click.option('--output', help='Output directory', default='.') -def init(output: str) -> str: - """Create a sample project structure ready to use SoaM - - To create the sample project it will prompt the user for the following - configurations: package_display_name, project_name, package_name, - author_name, description. - - Parameters - ---------- - output : str - The path to make the scaffolding. - - Returns - ------- - dict - Returns the root of the sample project: "output/package_name". - """ - return cookiecutter( - resource_filename(__name__, INIT_TEMPLATE_DIR), output_dir=output, - ) - - -# TODO: include __main__ for debugging purposes -# if __name__ == "__main__": -# assert len(argv) == 2 -# dd = init(['--output', argv[1]]) diff --git a/soam/templates/init/cookiecutter.json b/soam/templates/init/cookiecutter.json deleted file mode 100644 index 0245e61..0000000 --- a/soam/templates/init/cookiecutter.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "package_display_name": "Package-Name", - "project_name": "project_name", - "package_name": "{{cookiecutter.package_display_name.lower().replace(' ', '_').replace('-', '_')}}", - "author_name": "Mutt Data", - "description": "A short description of the project." -} \ No newline at end of file diff --git a/soam/templates/init/hooks/post_gen_project.py b/soam/templates/init/hooks/post_gen_project.py deleted file mode 100644 index 429e294..0000000 --- a/soam/templates/init/hooks/post_gen_project.py +++ /dev/null @@ -1,13 +0,0 @@ -import shutil - -from pkg_resources import resource_filename - -package_name = "{{cookiecutter.package_name}}" -project_name = "{{cookiecutter.project_name}}" - -PROJECT_NAME = "soam" -DB_MIGRATIONS = "db_migrations" - -shutil.copytree( - resource_filename(PROJECT_NAME, DB_MIGRATIONS), f"{project_name}/{DB_MIGRATIONS}", -) diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.bump b/soam/templates/init/{{ cookiecutter.package_name }}/.bump deleted file mode 100644 index 19c16c4..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.bump +++ /dev/null @@ -1,2 +0,0 @@ -[bump] -input = {{ cookiecutter.package_name }}/__init__.py diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.coveragerc b/soam/templates/init/{{ cookiecutter.package_name }}/.coveragerc deleted file mode 100644 index c712d25..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.coveragerc +++ /dev/null @@ -1,2 +0,0 @@ -[run] -omit = tests/* diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.dockerignore b/soam/templates/init/{{ cookiecutter.package_name }}/.dockerignore deleted file mode 100644 index e69de29..0000000 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.flake8 b/soam/templates/init/{{ cookiecutter.package_name }}/.flake8 deleted file mode 100644 index 7c55cdc..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.flake8 +++ /dev/null @@ -1,21 +0,0 @@ -[flake8] - -per-file-ignores = - tests/*.py:D103, D100 - -ignore = - E203, # Whitespace before ':' - E402, # Import not at top of file - E501, # Line too long - W503, # Line break before binary operator - B006, # Mutable data structures in argument defaults - D107, # Missing docstring in init -select = - C, # McCabe complexity - E, # pep8 errors - F, # pyflakes - W, # pep8 warnings - B, # Bugbear plugin - B950, - D, # pydocstyle plugin -max-line-length = 88 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.gitignore b/soam/templates/init/{{ cookiecutter.package_name }}/.gitignore deleted file mode 100644 index 4fbd9ca..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.gitignore +++ /dev/null @@ -1,145 +0,0 @@ -settings.ini - -# gitlab-runner local dirs -builds/ - -# Coverage report -cov_html/ - -# Created by https://www.gitignore.io/api/python -# Edit at https://www.gitignore.io/?templates=python - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# Pipfiles - -Pipfile* - -### Python Patch ### -.venv/ - -# End of https://www.gitignore.io/api/python - -### Vim ### -**/*.swp diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.gitlab-ci.yml b/soam/templates/init/{{ cookiecutter.package_name }}/.gitlab-ci.yml deleted file mode 100644 index 963e49d..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.gitlab-ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: python:3.7 - -before_script: - - apt-get update - -test: - script: - - pip install . - - pip install nox - - nox --sessions tests - - -lint: - script: - - pip install nox - - nox --sessions cop - - -bandit: - script: - - pip install nox - - nox --sessions bandit - - -pages: - stage: deploy - script: - - pip install .[dev] - - cd docs - - make html - - cd .. - - mv docs/build/html/ public/ - artifacts: - paths: - - public - only: - - master diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/.pre-commit-config.yaml b/soam/templates/init/{{ cookiecutter.package_name }}/.pre-commit-config.yaml deleted file mode 100644 index ca659b3..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/.pre-commit-config.yaml +++ /dev/null @@ -1,67 +0,0 @@ -repos: -- repo: https://github.com/psf/black - rev: 19.10b0 - hooks: - - id: black - name: black - entry: black - language: system - types: [python] - args: [--skip-string-normalization] - exclude: docs/* -- repo: git://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 - hooks: - - id: trailing-whitespace - - id: requirements-txt-fixer - #- id: flake8 - # name: flake8 - # entry: flake8 - # language: system - # types: [python] - # args: [--max-line-length=88] - # exclude: docs/* -- repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.770 - hooks: - - id: mypy - name: mypy - entry: mypy - language: system - types: [python] - exclude: docs/* - #- repo: https://github.com/pre-commit/mirrors-pylint - # rev: v2.4.4 - # hooks: - # - id: pylint - # name: pylint - # entry: pylint - # - id: pylint - # name: pylint - # entry: pylint - # language: system - # types: [python] - # exclude: docs/* -- repo: local - hooks: - - id: pytest - name: pytest - language: system - entry: nox --session tests - types: [python] - stages: [push] - pass_filenames: false - - id: linter - name: linter - language: system - entry: nox --session cop - types: [python] - stages: [push] - pass_filenames: false - - id: bandit - name: bandit - language: system - entry: nox --session bandit - types: [python] - stages: [push] - pass_filenames: false diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/CHANGELOG.md b/soam/templates/init/{{ cookiecutter.package_name }}/CHANGELOG.md deleted file mode 100644 index b78e638..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -## [0.0.0] - 1995-09-15 - -### Added - -- This CHANGELOG file. - -### Changed - -- Ipsum lorem. diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/CONTRIBUTING.md b/soam/templates/init/{{ cookiecutter.package_name }}/CONTRIBUTING.md deleted file mode 100644 index d0a351b..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/CONTRIBUTING.md +++ /dev/null @@ -1,138 +0,0 @@ -# Contributing to {{cookiecutter.package_display_name}} - -Thanks for your interest in contributing to {{cookiecutter.package_display_name}} πŸŽ‰ These are the guidelines for contributions. Reading them will help you get started on how to make useful contributions. - -## Foreword -This guide is not final. It will evolve over time, as we learn and add new voices to the project. Check it from time to time and feel free to make suggestions πŸ˜ƒ - -## Code of conduct - -One of our core values at Mutt is that **we are an open team**. We all make mistakes and need help fixing them. We foster psychological safety. We clearly express it when we don’t know something and ask for advice. - -We expect everyone contributing to {{cookiecutter.package_display_name}} to follow this principle. Be kind, don't be rude, keep it friendly; learn, teach, ask, help. - -## Issues - -### Feature requests -To ask for new functionalities or improvements on {{cookiecutter.package_display_name}}, please head over to the [issues tracker](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}/issues) and open a new issue with the label `feature-request` attached to it. - -A brief description of the desired functionality should be included; use cases and examples are welcome too, for a better understanding of the request. - -Feel free to [open a new MR](#mrs) for it! - - -### Bug reporting -To report a bug, please check there is no previous related issue on the [issues tracker](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}/issues) and then open a new issue with the `bug` label attached to it if there were none which addressed it. - -A MWE example of the bug should be provided to allow the person working on fixing it to save time reproducing and debugging it. Also, it should act as a test to check if whichever changes are made do effectively fix it. [MRs are welcome](#mrs) to fix them! - - -#### Security issues - -If you find a security related bug or any kind of security rellated issue, **please DO NOT file a public issue**. Sensitive security-related issues should be reported to privately to the repo owner along with a PoC if possible. You can [send us an email](mailto:security@muttdata.ai) and we'll go from there. -## Contributing - -### Dev install -Start by cloning the repo -```bash -git clone git@gitlab.com:mutt_data/{{cookiecutter.package_display_name}}.git -``` - -Then install all `dev` dependencies: -```bash -cd {{cookiecutter.package_display_name}} -pip install .[dev] -``` - -#### pre-commit -We use [pre-commit](https://pre-commit.com) to run several code scans and hooks that make the development cycle easier. To install pre-commit hooks run -```bash -pre-commit install -pre-commit install -t push -``` - -### Style guide -{{cookiecutter.package_display_name}} follows [PEP8](https://www.python.org/dev/peps/pep-0008/). - -If you installed the [pre-commit hooks](#pre-commit) you shouldn't worry too much about style, since they will fix it for you or warn you about styling errors. We use the following hooks: - -- [black](https://github.com/psf/black): An opinionated code formatting tool that ensures consistency across all projects using it -- [flake8](https://github.com/PyCQA/flake8): a tool to enforce style guide -- [mypy](https://github.com/python/mypy): a static type checker for Python -- [pylint](https://github.com/PyCQA/pylint): a source code, bug and quality checker - -#### Docstrings -We use either [numpy style](https://numpydoc.readthedocs.io/en/latest/format.html) or [google style](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings) docstring formatting. It's usually good to include the following docstrings: -- module level docstring giving a general overview of what it does. - - it may include TODOs - - it may include examples -- class dosctrings explaining what it is -- method/functions to explain what it does and what it's parameters are - -### Testing -We use the [pytest framework](https://docs.pytest.org/en/latest/) to test {{cookiecutter.package_display_name}}. Check the [readme](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}#testing) on how to run tests. - -### Docs -Docs are generated with [Sphinx](https://www.sphinx-doc.org/en/master/) with gitlab CI. Docs for master are available [here](https://mutt_data.gitlab.io/{{cookiecutter.package_display_name}}/). - -The docs are automatically built from [docstrings](#docstrings). Check the [style guide](#style-guide) section for notes on docstrings. - -### Versioning -We use [SemVer](https://semver.org). To keep things easy, we've included [bump](https://pypi.org/project/bump/) as a dev dependency. Running `bump` will bump the patch version. To bump minor/major versions: -```bash -bump --minor -bump --major -bump --patch -``` - -Please remember to bump the version when submitting your MR! - -### Deprecation -Before fully deprecating a feature or making a breaking change, give users a warning and enough time for them to migrate their code. State when the EOL will be. Then, in the pertaining release, it can be included. - -### MRs -{{cookiecutter.package_display_name}} development follows a simple workflow: -- assign yourself an issue - - if there's none, [create it](#issues) - - if you can't assign it yourself, ask someone to do it for you -- create a new branch with a descriptive name -- push to the remote - - open a [WIP](#WIP) MR to allow discussion and let others know where you're at with the issue -- work on it πŸ€“ -- when ready change the MR to [RFC](#RFC) -- you'll need at least one approval to merge - - merge will be disabled if the [CI/CD pipelines are failing](#cicd-jobs) - - if you can't merge it yourself, ask your last approver to merge it - - please squash the commits and delete the branch -- congrats and thanks for your contribution πŸŽ‰ - -Please keep MRs minimal. Try to keep the modified files to the bare needed for the issue you are working on. This will make the MR's changes more readable and allow for a quicker interaction with reviewers. - -#### WIP -WIP stands for **W**ork **i**n **P**rogress. WIP MRs are not yet ready to be merged. They allow for: -- other project members to know you are working on something -- early feedback, e.g. if you are doing something wrong or they see a problem down the road with your approach - -You can tag a MR as WIP using the `WIP:` prefix on you MR title. - -#### RFC -RFC stands for **R**equest **f**or **C**omments. It means you consider the issue is solved by the code in the MR and are asking people to review your changes. - -### CI/CD jobs -Gitlab CI/CD jobs are configured on [.gitlab-ci.yml](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}/-/blob/master/.gitlab-ci.yml). An overview of current jobs: - -#### Test -[Regression testing](https://en.wikipedia.org/wiki/Regression_testing) to ensure new changes have not broken previously working features - -### README -Relevant changes (e.g. new modules) should be included in the README. - -## Misc - -### Issue labels - -| label name | description | issues | -| ---------- | ----------- | ------ | -| bug | Bugs report or suspected bugs | [search](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}/issues?scope=all&utf8=βœ“&state=opened&label_name[]=bug)| -|feature-request|Request for new features to add to {{cookiecutter.package_display_name}}|[search](https://gitlab.com/mutt_data/{{cookiecutter.package_display_name}}/issues?scope=all&utf8=βœ“&state=opened&label_name[]=feature-request)| - diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/Dockerfile b/soam/templates/init/{{ cookiecutter.package_name }}/Dockerfile deleted file mode 100644 index c8976f5..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3.8 - -COPY ./requirements.txt requirements.txt -RUN pip install -r requirements.txt - -COPY . src -WORKDIR src diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/README.md b/soam/templates/init/{{ cookiecutter.package_name }}/README.md deleted file mode 100644 index 0f70c85..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/README.md +++ /dev/null @@ -1,57 +0,0 @@ - -# {{ cookiecutter.project_name }} by {{ cookiecutter.author_name }} - -{{ cookiecutter.description }} - -# Directory structure of generated projects - -``` -β”œβ”€β”€ bandit.yaml # Bandit security linter config file. -β”œβ”€β”€ .bump # Version bump file. -β”œβ”€β”€ CHANGELOG.md # Documentation of notables changed made to the project. -β”œβ”€β”€ CONTRIBUTING.md # Contributing guidelines. -β”œβ”€β”€ {{ cookiecutter.project_name }} # Source code directory. -β”‚Β Β  β”œβ”€β”€ alembic.ini # Alembic database migration config file. -β”‚Β Β  β”œβ”€β”€ cfg.py # Parses/loads the `settings.ini` file, defaults to `constants.py` -β”‚Β Β  β”œβ”€β”€ constants.py # Constant values and defaults used in multiple modules. -β”‚Β Β  β”œβ”€β”€ dags # Dir for Airflow DAGs. -β”‚Β Β  β”‚Β Β  └── main_dag.py # Main DAG to run the project. -β”‚Β Β  β”œβ”€β”€ db_models.py # Database models. -β”‚Β Β  β”œβ”€β”€ helpers.py # Project dependant helper code. -β”‚Β Β  β”œβ”€β”€ main.py # Main entry-point for the project. -β”‚Β Β  β”œβ”€β”€ resources # Dir for .j2, .sql and other non Python files used mostly inside Python. -. -β”‚Β Β  β”œβ”€β”€ settings_sample.ini # Sample settings file, should be copied into settings.ini and NEVER pushed! -. -β”‚Β Β  └── utils.py # Project agnostic helper functions that could be migrated to and external lib. -β”œβ”€β”€ .coveragerc # Code coverage config file. -β”œβ”€β”€ Dockerfile # Build the project's main image. -β”œβ”€β”€ docs # Folder for storing the project's documentation. -β”‚Β Β  └── ... -β”œβ”€β”€ .flake8 # Flake8 sample config file. -β”œβ”€β”€ .gitignore # .gitignore with sensible defaults -β”œβ”€β”€ .gitlab-ci.yml # .gitlab-ci.yml, for running tests on Gitlab CI/CD -β”œβ”€β”€ mypy.ini # mypy config file -β”œβ”€β”€ notebooks # Directory for storing Jupyter-Notebooks -β”‚Β Β  └── ... # -β”œβ”€β”€ noxfile.py # Noxfile config file. -β”œβ”€β”€ .pre-commit-config.yaml # Pre-Commit hooks. -β”œβ”€β”€ pylintrc # Pylint config file. -β”œβ”€β”€ pyproject.toml # pyproject config file, with settings for build and black. -β”œβ”€β”€ README.md # This file. -β”œβ”€β”€ requirements.txt # Requirements for building this project. -β”œβ”€β”€ setup.cfg # Setup config. -└── tests # Directory for storing tests. -``` - -# Running the project - -*TODO* - -# Docker stuff - -Build main image. - -``` -docker build . -t {{ cookiecutter.project_name }} -``` diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/bandit.yaml b/soam/templates/init/{{ cookiecutter.package_name }}/bandit.yaml deleted file mode 100644 index 90e73c0..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/bandit.yaml +++ /dev/null @@ -1,397 +0,0 @@ - -### Bandit config file generated from: -# '/home/nox/repos/venv/bin/bandit-config-generator -s B322 -o bandit.yaml' - -### This config may optionally select a subset of tests to run or skip by -### filling out the 'tests' and 'skips' lists given below. If no tests are -### specified for inclusion then it is assumed all tests are desired. The skips -### set will remove specific tests from the include set. This can be controlled -### using the -t/-s CLI options. Note that the same test ID should not appear -### in both 'tests' and 'skips', this would be nonsensical and is detected by -### Bandit at runtime. - -# Available tests: -# B101 : assert_used -# B102 : exec_used -# B103 : set_bad_file_permissions -# B104 : hardcoded_bind_all_interfaces -# B105 : hardcoded_password_string -# B106 : hardcoded_password_funcarg -# B107 : hardcoded_password_default -# B108 : hardcoded_tmp_directory -# B110 : try_except_pass -# B112 : try_except_continue -# B201 : flask_debug_true -# B301 : pickle -# B302 : marshal -# B303 : md5 -# B304 : ciphers -# B305 : cipher_modes -# B306 : mktemp_q -# B307 : eval -# B308 : mark_safe -# B309 : httpsconnection -# B310 : urllib_urlopen -# B311 : random -# B312 : telnetlib -# B313 : xml_bad_cElementTree -# B314 : xml_bad_ElementTree -# B315 : xml_bad_expatreader -# B316 : xml_bad_expatbuilder -# B317 : xml_bad_sax -# B318 : xml_bad_minidom -# B319 : xml_bad_pulldom -# B320 : xml_bad_etree -# B321 : ftplib -# B322 : input -# B323 : unverified_context -# B324 : hashlib_new_insecure_functions -# B325 : tempnam -# B401 : import_telnetlib -# B402 : import_ftplib -# B403 : import_pickle -# B404 : import_subprocess -# B405 : import_xml_etree -# B406 : import_xml_sax -# B407 : import_xml_expat -# B408 : import_xml_minidom -# B409 : import_xml_pulldom -# B410 : import_lxml -# B411 : import_xmlrpclib -# B412 : import_httpoxy -# B413 : import_pycrypto -# B501 : request_with_no_cert_validation -# B502 : ssl_with_bad_version -# B503 : ssl_with_bad_defaults -# B504 : ssl_with_no_version -# B505 : weak_cryptographic_key -# B506 : yaml_load -# B507 : ssh_no_host_key_verification -# B601 : paramiko_calls -# B602 : subprocess_popen_with_shell_equals_true -# B603 : subprocess_without_shell_equals_true -# B604 : any_other_function_with_shell_equals_true -# B605 : start_process_with_a_shell -# B606 : start_process_with_no_shell -# B607 : start_process_with_partial_path -# B608 : hardcoded_sql_expressions -# B609 : linux_commands_wildcard_injection -# B610 : django_extra_used -# B611 : django_rawsql_used -# B701 : jinja2_autoescape_false -# B702 : use_of_mako_templates -# B703 : django_mark_safe - -# (optional) list included test IDs here, eg '[B101, B406]': -tests: - -# (optional) list skipped test IDs here, eg '[B101, B406]': -skips: ['B322'] - -### (optional) plugin settings - some test plugins require configuration data -### that may be given here, per-plugin. All bandit test plugins have a built in -### set of sensible defaults and these will be used if no configuration is -### provided. It is not necessary to provide settings for every (or any) plugin -### if the defaults are acceptable. - -any_other_function_with_shell_equals_true: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -hardcoded_tmp_directory: - tmp_dirs: - - /tmp - - /var/tmp - - /dev/shm -linux_commands_wildcard_injection: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -ssl_with_bad_defaults: - bad_protocol_versions: - - PROTOCOL_SSLv2 - - SSLv2_METHOD - - SSLv23_METHOD - - PROTOCOL_SSLv3 - - PROTOCOL_TLSv1 - - SSLv3_METHOD - - TLSv1_METHOD -ssl_with_bad_version: - bad_protocol_versions: - - PROTOCOL_SSLv2 - - SSLv2_METHOD - - SSLv23_METHOD - - PROTOCOL_SSLv3 - - PROTOCOL_TLSv1 - - SSLv3_METHOD - - TLSv1_METHOD -start_process_with_a_shell: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -start_process_with_no_shell: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -start_process_with_partial_path: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -subprocess_popen_with_shell_equals_true: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -subprocess_without_shell_equals_true: - no_shell: - - os.execl - - os.execle - - os.execlp - - os.execlpe - - os.execv - - os.execve - - os.execvp - - os.execvpe - - os.spawnl - - os.spawnle - - os.spawnlp - - os.spawnlpe - - os.spawnv - - os.spawnve - - os.spawnvp - - os.spawnvpe - - os.startfile - shell: - - os.system - - os.popen - - os.popen2 - - os.popen3 - - os.popen4 - - popen2.popen2 - - popen2.popen3 - - popen2.popen4 - - popen2.Popen3 - - popen2.Popen4 - - commands.getoutput - - commands.getstatusoutput - subprocess: - - subprocess.Popen - - subprocess.call - - subprocess.check_call - - subprocess.check_output - - subprocess.run -try_except_continue: - check_typed_exception: false -try_except_pass: - check_typed_exception: false -weak_cryptographic_key: - weak_key_size_dsa_high: 1024 - weak_key_size_dsa_medium: 2048 - weak_key_size_ec_high: 160 - weak_key_size_ec_medium: 224 - weak_key_size_rsa_high: 1024 - weak_key_size_rsa_medium: 2048 - diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/docs/.gitkeep b/soam/templates/init/{{ cookiecutter.package_name }}/docs/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/mypy.ini b/soam/templates/init/{{ cookiecutter.package_name }}/mypy.ini deleted file mode 100644 index 461b55e..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/mypy.ini +++ /dev/null @@ -1,4 +0,0 @@ -[mypy] - -ignore_missing_imports = True -follow_imports = skip diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/notebooks/.gitkeep b/soam/templates/init/{{ cookiecutter.package_name }}/notebooks/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/noxfile.py b/soam/templates/init/{{ cookiecutter.package_name }}/noxfile.py deleted file mode 100644 index 75026f1..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/noxfile.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Entrypoint for nox.""" - -import nox - - -@nox.session(reuse_venv=True) -def tests(session): - """Run all tests.""" - session.install(".") - session.install(".[test,forecast,gdrive]") - - cmd = ["pytest", "-n", "auto"] - - if session.posargs: - cmd.extend(session.posargs) - - session.run(*cmd) - - -@nox.session(reuse_venv=True) -def cop(session): - """Run all pre-commit hooks.""" - session.install(".") - session.install(".[dev]") - session.install(".[test]") - - session.run("pre-commit", "install") - session.run("pre-commit", "run", "--show-diff-on-failure", "--all-files") - - -@nox.session(reuse_venv=True) -def bandit(session): - """Run all pre-commit hooks.""" - session.install("bandit") - - session.run( - "bandit", "-r", "{{cookiecutter.package_name}}/", "-ll", "-c", "bandit.yaml" - ) diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/pylintrc b/soam/templates/init/{{ cookiecutter.package_name }}/pylintrc deleted file mode 100644 index cda7edd..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/pylintrc +++ /dev/null @@ -1,25 +0,0 @@ -[MASTER] - -jobs = 0 - -[MESSAGES CONTROL] - -disable = - # Disable conventions and refactors warnings - C, - R, - # Errors - import-error, - no-name-in-module, - # Warnings: - broad-except, - dangerous-default-value, - fixme, - logging-format-interpolation, - logging-fstring-interpolation, - lost-exception, - using-constant-test, - -[FORMAT] - -max-line-length = 88 # as in black diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/pyproject.toml b/soam/templates/init/{{ cookiecutter.package_name }}/pyproject.toml deleted file mode 100644 index 731af0a..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/pyproject.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tool.black] -line-length = 88 -skip-string-normalization = true - -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/requirements.txt b/soam/templates/init/{{ cookiecutter.package_name }}/requirements.txt deleted file mode 100644 index f1de339..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -muttlib>=1.0,<2 -pandas -python-decouple -scikit-learn -soam -u8darts diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/setup.cfg b/soam/templates/init/{{ cookiecutter.package_name }}/setup.cfg deleted file mode 100644 index 4a55e5d..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/setup.cfg +++ /dev/null @@ -1,63 +0,0 @@ -# Some ideas from https://github.com/pandas-dev/pandas/blob/master/setup.cfg -# Others from https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files -[aliases] -test=pytest - - -[bdist_wheel] -universal = true - -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[flake8] -max-line-length = 88 -exclude = - doc/sphinxext/*.py, - doc/build/*.py, - doc/temp/*.py, - .eggs/*.py, - versioneer.py, - env # exclude asv benchmark environments from linting - .git - __pycache__ - build/ - dist/ - -[tool.black] -line-length = 88 -skip-string-normalization = true - -[flake8-rst] -bootstrap = - import numpy as np - import pandas as pd - np # avoiding error when importing again numpy or pandas - pd # (in some cases we want to do it to show users) - -[tool:pytest] -minversion = 4.0.2 -testpaths = tests -markers = - single: mark a test as single cpu only - slow: mark a test as slow - network: mark a test as network - db: tests requiring a database (mysql or postgres) - high_memory: mark a test as a high-memory only -doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL -xfail_strict = True -filterwarnings = - error:Sparse:FutureWarning - error:The SparseArray:FutureWarning -addopts = --cov={{cookiecutter.package_name}} - - -# To be kept consistent with "Import Formatting" section in contributing.rst -[isort] -known_third_party=Cython,numpy,dateutil,matplotlib,python-dateutil,pytz,pyarrow,pytest, pandas -multi_line_output=3 -line_length=88 -force_grid_wrap=0 -combine_as_imports=True -force_sort_within_sections=True \ No newline at end of file diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/tests/__init__.py b/soam/templates/init/{{ cookiecutter.package_name }}/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/__init__.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/__init__.py deleted file mode 100644 index 33c3d39..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Version.""" - -__version__ = "0.0.1" diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/alembic.ini b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/alembic.ini deleted file mode 100644 index 47f5d28..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/alembic.ini +++ /dev/null @@ -1,68 +0,0 @@ -# A generic, single database configuration. - -[alembic] -# path to migration scripts -script_location = db_migrations - -# template used to generate migration files -# file_template = %%(rev)s_%%(slug)s - -# max length of characters to apply to the -# "slug" field -#truncate_slug_length = 40 - -# set to 'true' to run the environment during -# the 'revision' command, regardless of autogenerate -# revision_environment = false - -# set to 'true' to allow .pyc and .pyo files without -# a source .py file to be detected as revisions in the -# versions/ directory -# sourceless = false - -# version location specification; this defaults -# to db/versions. When using multiple version -# directories, initial revisions must be specified with --version-path -# version_locations = %(here)s/bar %(here)s/bat db/versions - -# the output encoding used when revision files -# are written from script.py.mako -# output_encoding = utf-8 - -# sqlalchemy.url = postgresql://fabian:fabian@localhost/mutt - -# Logging configuration -[loggers] -keys = root,sqlalchemy,alembic - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = WARN -handlers = console -qualname = - -[logger_sqlalchemy] -level = WARN -handlers = -qualname = sqlalchemy.engine - -[logger_alembic] -level = INFO -handlers = -qualname = alembic - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(levelname)-5.5s [%(name)s] %(message)s -datefmt = %H:%M:%S - diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/cfg.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/cfg.py deleted file mode 100644 index a586991..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/cfg.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Project configurations. -""" - -# from decouple import config # pylint: disable=unused-import diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/constants.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/constants.py deleted file mode 100644 index 69e68fa..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/constants.py +++ /dev/null @@ -1,2 +0,0 @@ -"""Constant values and defaults used in multiple modules. -""" diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/dags/main_dag.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/dags/main_dag.py deleted file mode 100644 index 314ef60..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/dags/main_dag.py +++ /dev/null @@ -1,7 +0,0 @@ -from airflow import DAG -from airflow.operators.docker_operator import DockerOperator - -dag_version = "0.1" - -with DAG(dag_id=f"main_{dag_version}") as dag: - main_task = DockerOperator(task_id="main_task", command="python main.py",) diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/db_models.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/db_models.py deleted file mode 100644 index 629374f..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/db_models.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Database models. -""" - -from sqlalchemy.ext.declarative import declarative_base - -Base = declarative_base() diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/helpers.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/helpers.py deleted file mode 100644 index ab02ef5..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/helpers.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -Project dependant helper code used in multiple files. -""" diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/main.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/main.py deleted file mode 100644 index 60e5f2b..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/main.py +++ /dev/null @@ -1,19 +0,0 @@ -"""main""" -#!/usr/bin/env python3 - -from darts import models -import pandas as pd -from soam.forecaster import Forecaster - - -def main(): - url = "https://raw.githubusercontent.com/facebook/prophet/master/examples/example_retail_sales.csv" - df = pd.read_csv(url) - my_model = models.Prophet(weekly_seasonality=False, daily_seasonality=False) - forecaster = Forecaster(my_model) - predictions = forecaster.run(raw_series=df, output_length=7) - print(predictions) - - -if __name__ == "__main__": - main() diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/resources/.gitkeep b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/resources/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/settings_sample.ini b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/settings_sample.ini deleted file mode 100644 index 064bd65..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/settings_sample.ini +++ /dev/null @@ -1,17 +0,0 @@ -[settings] -DB_USER=mutt -DB_PASSWORD=mutt -DB_NAME=/tmp/soam.db -DB_PORT= -DB_IP= -DB_DIALECT=sqlite - -SLACK_TOKEN = token - -SMTP_USER=mutt@mutt.com -SMTP_PASS=pass -SMTP_FROM=SoaM Reporter -SMTP_HOST=smtp.gmail.com -SMTP_PORT=587 - -# Don't change the variable names!!! \ No newline at end of file diff --git a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/utils.py b/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/utils.py deleted file mode 100644 index d8242e7..0000000 --- a/soam/templates/init/{{ cookiecutter.package_name }}/{{ cookiecutter.project_name }}/utils.py +++ /dev/null @@ -1,2 +0,0 @@ -"""Project agnostic helper functions that could be migrated to and external lib. -"""