<commit_before># AACT2

## Getting Started

After you have cloned this repo, run this setup script to set up your machine
with the necessary dependencies to run and test this app:

    % ./bin/setup

It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up
your machine with [this script].

[this script]: https://github.com/thoughtbot/laptop

### Error tracking and monitoring

Log into [AppSignal](https://appsignal.com/) and create a new app. Follow the steps they provide and run the generator. Replace the hard coded API key with `ENV['APPSIGNAL_API_KEY']`. Add the key to `.env`.

### CI

Log into [CircleCI](https://circleci.com) and create a new project that points to the Github repo.

## Importing studies from clinicaltrials.gov

Start with opening `rails console`.

Call `client = ClinicalTrials::Client.new(search_term: 'your search term')`. To run without a search term, you can call `ClinicalTrials::Client.new`. This will download the ENTIRE clinicaltrials.gov database, and will take much longer (~1 hour).

Run `client.download_xml_files` to populate the database with the raw XML files from clinicaltrials.gov.

Run `client.populate_studies` to populate the database with studies and all their related records.

To determine the run time of the import, run `ClinicalTrials::LoadEvent.last(2)`. The first record will show the time it took to download the raw XML, the second record will show the time to populate the study records in the db.

## Guidelines

Use the following guides for getting things done, programming well, and
programming in style.

* [Protocol](http://github.com/thoughtbot/guides/blob/master/protocol)
* [Best Practices](http://github.com/thoughtbot/guides/blob/master/best-practices)
* [Style](http://github.com/thoughtbot/guides/blob/master/style)<commit_msg>Remove CI and error tracking from README.<commit_after># AACT2

## Getting Started

After you have cloned this repo, run this setup script to set up your machine
with the necessary dependencies to run and test this app:

    % ./bin/setup

It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up
your machine with [this script].

[this script]: https://github.com/thoughtbot/laptop

## Importing studies from clinicaltrials.gov

Start with opening `rails console`.

Call `client = ClinicalTrials::Client.new(search_term: 'your search term')`. To run without a search term, you can call `ClinicalTrials::Client.new`. This will download the ENTIRE clinicaltrials.gov database, and will take much longer (~1 hour).

Run `client.download_xml_files` to populate the database with the raw XML files from clinicaltrials.gov.

Run `client.populate_studies` to populate the database with studies and all their related records.

To determine the run time of the import, run `ClinicalTrials::LoadEvent.last(2)`. The first record will show the time it took to download the raw XML, the second record will show the time to populate the study records in the db.

## Guidelines

Use the following guides for getting things done, programming well, and
programming in style.

* [Protocol](http://github.com/thoughtbot/guides/blob/master/protocol)
* [Best Practices](http://github.com/thoughtbot/guides/blob/master/best-practices)
* [Style](http://github.com/thoughtbot/guides/blob/master/style)
{'fraction_non_alphanumeric': 0.08781954887218045, 'fraction_numerical': 0.0018045112781954887, 'mean_word_length': 4.714776632302406, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6282164', 'n_tokens_mistral': 943, 'n_tokens_neox': 901, 'n_words': 406}