Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Fix linting, testing, CI, remove old backends and logs #32

Merged
merged 5 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[run]
branch = True
data_file = .coverage
source=xapi-db-load
source=xapi_db_load
omit =
tests
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run all tests & checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install development dependencies
run: make requirements

- name: Tests
run: tox
40 changes: 23 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
Scripts for generating and loading test xAPI events
===================================================
***************************************************

|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
|license-badge| |status-badge|


Purpose
*******
=======

Some test scripts to help make apples-to-apples comparisons of different
database backends for xAPI events. Supports direct database connections to
bmtcril marked this conversation as resolved.
Show resolved Hide resolved
ClickHouse, MongoDB, Citus PostgreSQL, and batch loading data to the Ralph
Learning Record Store with ClickHouse or MongoDB backends. It also can create
gzipped CSV files for bulk import to other databases.
ClickHouse, and batch loading data to the Ralph Learning Record Store with the
ClickHouse backend. It also can create gzipped CSV files for bulk import to
other databases.

xAPI events generated match the specifications of the Open edX
event-routing-backends package, but are not yet maintained to advance alongside
them.

Getting Started
***************
===============

Usage
=====
-----

Details of how to run the current version of the script can be found by executing:
Details of how to run the current version of the script can be found by
executing:

::

❯ xapi-db-load --help


Developing
==========
----------

One Time Setup
--------------
^^^^^^^^^^^^^^

.. code-block::

# Clone the repository
git clone [email protected]:openedx/xapi-db-load.git
cd xapi-db-load

# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
# Set up a virtualenv using virtualenvwrapper with the same name as the repo
# and activate it
mkvirtualenv -p python3.8 xapi-db-load


Every time you develop something in this repo
---------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block::

# Activate the virtualenv
Expand All @@ -60,7 +64,8 @@ Every time you develop something in this repo
# Install/update the dev requirements
make requirements

# Run the tests and quality checks (to verify the status before you make any changes)
# Run the tests and quality checks (to verify the status before you make any
# changes)
make validate

# Make a new branch for your changes
Expand All @@ -83,18 +88,18 @@ Every time you develop something in this repo


Getting Help
************
============

Documentation
=============
-------------

Start by going through `the documentation`_ (in progress!).

.. _the documentation: https://docs.openedx.org/projects/xapi-db-load


More Help
=========
---------

If you're having trouble, we have discussion forums at
https://discuss.openedx.org where you can connect with others in the
Expand Down Expand Up @@ -127,7 +132,8 @@ Contributing
************

Contributions are very welcome.
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for
details.

This project is currently accepting all types of contributions, bug fixes,
security fixes, maintenance work, or new features. However, please make sure
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ coverage:
patch:
default:
enabled: yes
target: 100%
target: 74%

comment: false
Loading