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

Fixing qiita_db/data.py #1327

Merged
merged 2 commits into from
Jul 6, 2015
Merged

Conversation

josenavas
Copy link
Contributor

Fixes the objects under data.py

A couple of comments:

  • There was a lot of instance methods under the base class that were calling check_subclass. This is not needed as the base class cannot be instantiated, so I removed those calls.
  • RawData.create had a if filepaths as if they're optional, but it is actually a required parameter.

@josenavas josenavas added this to the Alpha 0.2 milestone Jul 5, 2015
@josenavas josenavas mentioned this pull request Jul 5, 2015
28 tasks
raw_data_count = TRN.execute_fetchlast()
if raw_data_count == 1 and RawData(raw_data_id).get_filepath_ids():
raise QiitaDBError(
"Raw data (%d) can't be remove because it has linked "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was like this before but ... remove->removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ElDeveloper
Copy link
Member

👍 Looks good, just one question!

(status, self._id))
with TRN:
if (status not in ('idle', 'linking', 'unlinking') and
not status.startswith('failed')):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why flake8 is not complaining about this one ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flake8 treats if statements differently for indentation, since the things in the if statement are already indented once. This means the next line of the if needs to be indented twice so you can tell the difference between lines in the if and the continuation of the if.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's is correct, flake 8 will fail if I indent back this line.

@antgonza
Copy link
Member

antgonza commented Jul 5, 2015

One minor comment.

@josenavas
Copy link
Contributor Author

I did not forget about this, I will address the reviews and finish the rest of the PR today 😄

@josenavas
Copy link
Contributor Author

@antgonza @ElDeveloper comments addressed

ElDeveloper added a commit that referenced this pull request Jul 6, 2015
@ElDeveloper ElDeveloper merged commit d5c16d5 into qiita-spots:transaction Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants